changeset 503:7f2cb85288d0

Move printlasterror into logging
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 28 Apr 2014 09:18:55 +0000
parents e551de11d8b6
children 3cf72c5282e8
files cinst/nssstore_win.c common/logging.h
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/cinst/nssstore_win.c	Mon Apr 28 09:18:07 2014 +0000
+++ b/cinst/nssstore_win.c	Mon Apr 28 09:18:55 2014 +0000
@@ -61,15 +61,6 @@
 
 #define PROCESS_TIMEOUT 30000
 
-#define PRINTLASTERROR(msg) \
-  char *my_error = getLastErrorMsg(); \
-      if (my_error) { \
-        DEBUGPRINTF(msg " : %s\n", my_error); \
-        ERRORPRINTF(msg" : %s\n", my_error); \
-        free (my_error); \
-      } \
-  DEBUGPRINTF ("Failed to get error information\n");
-
 /**@brief Write strv of instructions to a handle
 *
 * Writes the null terminated list of instructions to
--- a/common/logging.h	Mon Apr 28 09:18:07 2014 +0000
+++ b/common/logging.h	Mon Apr 28 09:18:55 2014 +0000
@@ -17,6 +17,8 @@
  * @brief Logging and debugging functions
  */
 
+#include <stdio.h>
+
 #ifdef WIN32
 
 #include <windows.h>
@@ -81,6 +83,13 @@
  */
 #define ERRORPRINTF(fmt, ...) fprintf(stderr, DEBUGPREFIX "ERROR: " fmt, ##__VA_ARGS__);
 
+#define PRINTLASTERROR(msg) \
+  char *my_error = getLastErrorMsg(); \
+      if (my_error) { \
+        ERRORPRINTF(msg" : %s\n", my_error); \
+        free (my_error); \
+      } \
+  ERRORPRINTF ("Failed to get error information\n");
 
 
 #ifdef __cplusplus

http://wald.intevation.org/projects/trustbridge/