[Groonga-commit] groonga/groonga at aada91e [master] windows: fix conflicted declaration in MinGW enrironment

Back to archive index

HAYASHI Kentaro null+****@clear*****
Fri Jan 24 17:44:02 JST 2014


HAYASHI Kentaro	2014-01-24 17:44:02 +0900 (Fri, 24 Jan 2014)

  New Revision: aada91ed8b59754974a666efd97837ba33020abe
  https://github.com/groonga/groonga/commit/aada91ed8b59754974a666efd97837ba33020abe

  Message:
    windows: fix conflicted declaration in MinGW enrironment
    
    This change fixes following error:
    
      /usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/stdio.h:350:5:
      error: previous declaration of 'int _vsnprintf(char*, size_t, const
      char*, char*)' with 'C++' linkage
      /usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/stdio.h:534:121:
      error: conflicts with new declaration with 'C' linkage

  Modified files:
    lib/groonga_in.h

  Modified: lib/groonga_in.h (+1 -1)
===================================================================
--- lib/groonga_in.h    2014-01-24 17:36:41 +0900 (26fd4f3)
+++ lib/groonga_in.h    2014-01-24 17:44:02 +0900 (a837207)
@@ -122,7 +122,7 @@
 #ifndef __GNUC__
 # define snprintf(str, size, ...) _snprintf(str, size, __VA_ARGS__)
 #endif
-#if _MSC_VER < 1500
+#if defined(_MSC_VER) && _MSC_VER < 1500
 # define vsnprintf(str, size, format, ap) _vsnprintf(str, size, format, ap)
 #endif /* _MSC_VER < 1500 */
 #define unlink(pathname) _unlink(pathname)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index