]> granicus.if.org Git - graphviz/commitdiff
Resolved "macro redefinition" warnings.
authorErwin Janssen <erwinjanssen@outlook.com>
Mon, 29 Aug 2016 20:16:59 +0000 (22:16 +0200)
committerErwin Janssen <erwinjanssen@outlook.com>
Wed, 7 Sep 2016 10:59:12 +0000 (12:59 +0200)
On Windows, the Linux build does not throw this warning, the warning C4005
"macro redefinition" is thrown several hundered times. Most of these could
be prepended by an `#undef`, this resolves the warning.

lib/cdt/cdt.h
lib/common/pointset.h
lib/gvc/gvc.h
lib/gvc/gvio.h
lib/vmalloc/vmalloc.h
windows/include/FEATURE/vmalloc
windows/include/ast_common.h
windows/include/config.h

index 2829f6879888fb21e55f0224ea2df4a4300765f4..fa3111cc1ed91e1918ed19f6d1ebace669d10fdc 100644 (file)
@@ -27,6 +27,8 @@
 #endif
 
 #ifdef WIN32
+#undef __EXPORT__
+#undef __IMPORT__
 #define __EXPORT__  __declspec (dllexport)
 #define __IMPORT__     __declspec (dllimport)
 #endif
index 701a354b4124710c1bc038688805decbe4ead824..1e9f9045f13800e14bb87ba6d2b7bf81d5826aff 100644 (file)
@@ -32,6 +32,7 @@ extern "C" {
 /*visual studio*/
 #ifdef WIN32
 #ifndef GVC_EXPORTS
+#undef extern
 #define extern __declspec(dllimport)
 #endif
 #endif
index 5e08e96e1c4033e1b93e4c2758ae3430c35b6c18..c1a08a4881b27217dc98b5a8c245b2cf04dd52bc 100644 (file)
@@ -30,6 +30,7 @@ extern "C" {
 /*visual studio*/
 #ifdef WIN32
 #ifndef GVC_EXPORTS
+#undef extern
 #define extern __declspec(dllimport)
 #endif
 #endif
index 9620d51026d04c9144d77758e0fb1722a21b8b4a..b6d1258318c88dee2e592ff7d4c6547c12faa153 100644 (file)
@@ -29,6 +29,7 @@ extern "C" {
 /*visual studio*/
 #ifdef WIN32
 #ifndef GVC_EXPORTS
+#undef extern
 #define extern __declspec(dllimport)
 #endif
 #endif
index d0fc27b424ad48c2ee37363c701946d0b60f5536..9295f253c9722268b7f2c231400b8e733905d392 100644 (file)
@@ -111,6 +111,7 @@ extern "C" {
 
 /*visual studio*/
 #ifdef WIN32
+#undef extern
 #ifndef VMALLOC_EXPORTS
 #define extern __declspec(dllimport)
 #else
index 4b34f26e61638ba65d8c23e13b258ada99c37638..abfa84d78ba7bdd472299698ab8eb364d17973b1 100644 (file)
@@ -1,17 +1,43 @@
 /* : : generated from ../../lib/vmalloc/features/vmalloc by iffe version 2004-08-11 : : */
 #ifndef _def_atexit_vmalloc
 #define _def_atexit_vmalloc    1
+
+#undef _sys_types
 #define _sys_types     1       /* #include <sys/types.h> ok */
+
+#undef _lib_atexit
 #define _lib_atexit    1       /* atexit() in default lib(s) */
+
+#undef _lib_getpagesize
 #define _lib_getpagesize       0       /* getpagesize() in default lib(s) */
+
+#undef _hdr_stdlib
 #define _hdr_stdlib    1       /* #include <stdlib.h> ok */
+
+#undef _sys_stat
 #define _sys_stat      1       /* #include <sys/stat.h> ok */
+
+#undef _hdr_time
 #define _hdr_time      1       /* #include <time.h> ok */
+
+#undef _sys_time
 #define _sys_time      1       /* #include <sys/time.h> ok */
+
+#undef _hdr_stddef
 #define _hdr_stddef    1       /* #include <stddef.h> ok */
+
+#undef _typ_ssize_t
 #define _typ_ssize_t   1       /* ssize_t is a type */
+
+#undef _hdr_malloc
 #define _hdr_malloc    1       /* #include <malloc.h> ok */
+
+#undef _hdr_malloc
 #define _lib_alloca    1       /* alloca exists */
+
+#undef _mal_alloca
 #define _mal_alloca    1       /* alloca is based on malloc() */
+
+#undef _stk_down
 #define _stk_down      1       /* stack grows downward */
 #endif
index 43a88e45d1aa282201e4dc309cb7f7c33658bcb1..0c891a761d39af20fed176bb9862babed183ae82 100644 (file)
 /* : : generated from features/common by iffe version 1999-08-11 : : */
 #ifndef _AST_COMMON_H
 #define _AST_COMMON_H  1
+
+#undef _hdr_pthread
 #define _hdr_pthread   1       /* #include <pthread.h> ok */
+
+#undef _hdr_stddef
 #define _hdr_stddef    1       /* #include <stddef.h> ok */
+
+#undef _sys_types
 #define _sys_types     1       /* #include <sys/types.h> ok */
+
+#undef _hdr_time
 #define _hdr_time      1       /* #include <time.h> ok */
+
+#undef _sys_time
 #define _sys_time      0       /* #include <sys/time.h> ok */
+
+#undef _sys_times
 #define _sys_times     0       /* #include <sys/times.h> ok */
+
+#undef _hdr_stdlib
 #define _hdr_stdlib    0       /* #include <stdlib.h> ok */
+
+#undef _typ_size_t
 #define _typ_size_t    1       /* size_t is a type */
+
+#undef _typ_ssize_t
 #define _typ_ssize_t   0       /* ssize_t is a type */
+
+#undef _typ_long_double
 #define _typ_long_double       1       /* long double is a type */
+
+#undef _proto_stdc
 #define _proto_stdc    1       /* Standard-C prototypes ok */
 
 /* __STD_C indicates that the language is ANSI-C or C++ */
 #      endif
 #endif
 #if !_typ_size_t
+#   undef _typ_size_t
 #      define _typ_size_t      1
 typedef int size_t;
 #endif
 #if !_typ_ssize_t
+#   undef _typ_ssize_t
 #      define _typ_ssize_t     1
 typedef int ssize_t;
 #endif
index 93819a1d233dfc865480013e73dd57acbf03f42e..92aa6bf1e8c00b08ab5200b2ddea4019d92ccf27 100644 (file)
 #define HAVE_GTKGLEXT 1
 
 /* Define if you have the gts library */
+#undef HAVE_GTS
 #define HAVE_GTS 0
 
 /* Define if you have the iconv() function. */