From 38966cb2fbed780bddc344c10d52155167e2f817 Mon Sep 17 00:00:00 2001
From: Philippe Teuwen <yobibe@gmail.com>
Date: Sat, 9 Mar 2013 10:56:51 +0100
Subject: [PATCH] Forgot to commit new log internal header file

---
 libnfc/Makefile.am    |  2 +-
 libnfc/log-internal.h | 33 +++++++++++++++++++++++++++++++++
 libnfc/log.c          |  2 +-
 libnfc/log.h          |  3 ---
 libnfc/log_posix.c    |  2 +-
 libnfc/log_win32.c    |  2 +-
 6 files changed, 37 insertions(+), 7 deletions(-)
 create mode 100644 libnfc/log-internal.h

diff --git a/libnfc/Makefile.am b/libnfc/Makefile.am
index 937350e..5d02b77 100644
--- a/libnfc/Makefile.am
+++ b/libnfc/Makefile.am
@@ -18,7 +18,7 @@ libnfc_la_SOURCES = \
 		    drivers.h \
 		    iso7816.h \
 		    log.h \
-		    log_internal.h \
+		    log-internal.h \
 		    mirror-subr.h \
 		    nfc-internal.h \
 		    target-subr.h
diff --git a/libnfc/log-internal.h b/libnfc/log-internal.h
new file mode 100644
index 0000000..f8bcb2d
--- /dev/null
+++ b/libnfc/log-internal.h
@@ -0,0 +1,33 @@
+/*-
+ * Copyright (C) 2013 Romuald Conty
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>
+ */
+
+#ifndef __LOG_INTERNAL_H__
+#define __LOG_INTERNAL_H__
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif // HAVE_CONFIG_H
+
+#include <stdarg.h>
+
+// Internal methods so different platforms can route the logging
+// Offering both forms of the variadic function
+// These are implemented in the log_<platform> specific file
+void log_put_internal(const char *format, ...);
+void log_vput_internal(const char *format, va_list args);
+
+#endif // __LOG_INTERNAL_H__
diff --git a/libnfc/log.c b/libnfc/log.c
index 6f12491..66556ef 100644
--- a/libnfc/log.c
+++ b/libnfc/log.c
@@ -74,7 +74,7 @@ log_priority_to_str(const int priority)
 
 #ifdef LOG
 
-#include "log_internal.h"
+#include "log-internal.h"
 
 void
 log_init(const nfc_context *context)
diff --git a/libnfc/log.h b/libnfc/log.h
index 05c3f34..64228f2 100644
--- a/libnfc/log.h
+++ b/libnfc/log.h
@@ -70,9 +70,6 @@ void log_put(const uint8_t group, const char *category, const uint8_t priority,
 __attribute__((format(printf, 4, 5)))
 #  endif
 ;
-void log_put_internal(const char *format, ...);
-void log_vput_internal(const char *format, va_list args);
-
 #else
 // No logging
 #define log_init(nfc_context) ((void) 0)
diff --git a/libnfc/log_posix.c b/libnfc/log_posix.c
index 3f483dd..b7c4371 100644
--- a/libnfc/log_posix.c
+++ b/libnfc/log_posix.c
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>
  */
 
-#include "log_internal.h"
+#include "log-internal.h"
 
 #include <stdio.h>
 #include <stdarg.h>
diff --git a/libnfc/log_win32.c b/libnfc/log_win32.c
index adeb729..a302097 100644
--- a/libnfc/log_win32.c
+++ b/libnfc/log_win32.c
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>
  */
 
-#include "log_internal.h"
+#include "log-internal.h"
 
 #include <stdio.h>
 #include <stdarg.h>