Prevent macro error
authorJaehong Jo <jaehong.jo@samsung.com>
Fri, 26 Feb 2016 01:31:26 +0000 (10:31 +0900)
committerJon A. Cruz <jonc@osg.samsung.com>
Fri, 26 Feb 2016 06:02:44 +0000 (06:02 +0000)
Change-Id: I8a08cf76a18663b6086a5aa84779587c3049b0b1
error: macro names must be identifiers
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5207
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/csdk/connectivity/src/tcp_adapter/catcpadapter.c
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/include/payload_logging.h
resource/csdk/stack/src/ocstack.c

index ae7fc4c..5c4c581 100644 (file)
@@ -23,7 +23,9 @@
 #include <string.h>
 #include <stdint.h>
 
+#ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS
+#endif
 #include <inttypes.h>
 
 #include "cainterface.h"
index b42d61f..80354f7 100755 (executable)
 #ifndef OCPAYLOAD_H_
 #define OCPAYLOAD_H_
 
+#ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS
+#endif
+#ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS
+#endif
 #include <stdbool.h>
 #include <inttypes.h>
 #include "octypes.h"
index 4ce5770..6a6bb24 100644 (file)
 #include <dlog.h>
 #endif
 
+#ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS
+#endif
+#ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS
+#endif
 #include <inttypes.h>
 #include "rdpayload.h"
 
index 0dda57c..b82065c 100755 (executable)
 // For POSIX.1-2001 base specification,
 // Refer http://pubs.opengroup.org/onlinepubs/009695399/
 #define _POSIX_C_SOURCE 200112L
+#ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS
+#endif
+#ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS
+#endif
 #include <inttypes.h>
 #include <string.h>
 #include <ctype.h>