]> granicus.if.org Git - graphviz/commitdiff
Replace last usage of _BEGIN/END_EXTERNS_
authorErwin Janssen <erwinjanssen@outlook.com>
Sun, 18 Dec 2016 14:49:15 +0000 (15:49 +0100)
committerErwin Janssen <erwinjanssen@outlook.com>
Wed, 21 Dec 2016 13:54:26 +0000 (14:54 +0100)
The last occurence of the defines _BEGIN_EXTERNS_ and _END_EXTERNS_ in the
code was in lib/sfio/sfsetbuf.h, this is now replaced with the standard
`extern "C"` define and check. Because of this, the definition of
_BEGIN_EXTERNS_ and _END_EXTERNS_ can be removed from ast_common.h

ast_common.h.in
features/common
lib/sfio/features/common
lib/sfio/sfsetbuf.c
lib/vmalloc/features/common
windows/include/ast_common.h

index 19df6a0740c0ddf3d3bfc246860c32966a2a29b9..eb5d18b7101c8f3c7eb4b901d392670917eefcb2 100644 (file)
 #define _typ_ssize_t    1      /* ssize_t is a type */
 /* */
 
-/* extern symbols must be protected against C++ name mangling */
-#ifndef _BEGIN_EXTERNS_
-#  if defined(__cplusplus) || defined(c_plusplus)
-#    define _BEGIN_EXTERNS_ extern "C" {
-#    define _END_EXTERNS_   }
-#  else
-#    define _BEGIN_EXTERNS_
-#    define _END_EXTERNS_
-#  endif
-#endif /*_BEGIN_EXTERNS_*/
-
 /* dynamic linked library external scope handling */
 #undef extern
 #if defined(_dll_import) && !defined(__EXPORT__) && _DLL_BLD
index 5221b6c7f084954344769aefeaf026898d25d623..a2d8c38bbdf34934653bfed0c854cbbcb9460ee5 100644 (file)
@@ -65,18 +65,6 @@ xopen        stdio note{ Stdio fseek/fflush are X/Open-compliant }end execute{
 }end
 
 cat{
-
-       /* extern symbols must be protected against C++ name mangling */
-       #ifndef _BEGIN_EXTERNS_
-       #if __cplusplus || c_plusplus
-       #define _BEGIN_EXTERNS_ extern "C" {
-       #define _END_EXTERNS_   }
-       #else
-       #define _BEGIN_EXTERNS_
-       #define _END_EXTERNS_
-       #endif
-       #endif /*_BEGIN_EXTERNS_*/
-
        /* dynamic linked library external scope handling */
        #undef extern
        #if _dll_import && !defined(__EXPORT__) && _DLL_BLD
index 0d9ba75dde516b3e8c40fa21448c004c80c38518..1d17ddb9dd78eef6ca492bfe8d9d69753859f32e 100644 (file)
@@ -65,18 +65,6 @@ xopen        stdio note{ Stdio fseek/fflush are X/Open-compliant }end execute{
 }end
 
 cat{
-
-       /* extern symbols must be protected against C++ name mangling */
-       #ifndef _BEGIN_EXTERNS_
-       #if __cplusplus || c_plusplus
-       #define _BEGIN_EXTERNS_ extern "C" {
-       #define _END_EXTERNS_   }
-       #else
-       #define _BEGIN_EXTERNS_
-       #define _END_EXTERNS_
-       #endif
-       #endif /*_BEGIN_EXTERNS_*/
-
        /* dynamic linked library external scope handling */
        #undef extern
        #if _dll_import && !defined(__EXPORT__) && _DLL_BLD
index e603db80c63551421a39719582b66649a966bb48..00552f966941e259536810d37d392c17b14a29b1 100644 (file)
@@ -26,8 +26,13 @@ __STDPP__directive pragma pp:nohide getpagesize
 #endif
 
 #if _lib_getpagesize
-_BEGIN_EXTERNS_ extern int getpagesize(void);
-_END_EXTERNS_
+#ifdef __cplusplus
+extern "C" {
+#endif
+       extern int getpagesize(void);
+#ifdef __cplusplus
+}
+#endif
 #endif
 /*     Set a (new) buffer for a stream.
 **     If size < 0, it is assigned a suitable value depending on the
index 0d9ba75dde516b3e8c40fa21448c004c80c38518..1d17ddb9dd78eef6ca492bfe8d9d69753859f32e 100644 (file)
@@ -65,18 +65,6 @@ xopen        stdio note{ Stdio fseek/fflush are X/Open-compliant }end execute{
 }end
 
 cat{
-
-       /* extern symbols must be protected against C++ name mangling */
-       #ifndef _BEGIN_EXTERNS_
-       #if __cplusplus || c_plusplus
-       #define _BEGIN_EXTERNS_ extern "C" {
-       #define _END_EXTERNS_   }
-       #else
-       #define _BEGIN_EXTERNS_
-       #define _END_EXTERNS_
-       #endif
-       #endif /*_BEGIN_EXTERNS_*/
-
        /* dynamic linked library external scope handling */
        #undef extern
        #if _dll_import && !defined(__EXPORT__) && _DLL_BLD
index 34901e072280e3a23cc19ee697f3a48c1734a0b5..abf8304d4c1447be142f39f64e83db5f6a79fb3a 100644 (file)
 #undef _typ_ssize_t
 #define _typ_ssize_t   0       /* ssize_t is a type */
 
-/* extern symbols must be protected against C++ name mangling */
-#ifndef _BEGIN_EXTERNS_
-#if defined(__cplusplus) || defined(c_plusplus)
-#define _BEGIN_EXTERNS_        extern "C" {
-#define _END_EXTERNS_  }
-#else
-#define _BEGIN_EXTERNS_
-#define _END_EXTERNS_
-#endif
-#endif /*_BEGIN_EXTERNS_*/
-
 /* dynamic linked library external scope handling */
 #undef extern
 #if defined(_dll_import) && !defined(__EXPORT__) && defined(_DLL_BLD)