[Groonga-commit] groonga/groonga [master] Revert "don't use _XXX_SOURCE and __USE_GNU."

Back to archive index

null+****@clear***** null+****@clear*****
2011年 1月 8日 (土) 13:54:41 JST


Kouhei Sutou	2011-01-08 04:54:41 +0000 (Sat, 08 Jan 2011)

  New Revision: a29f11d8afed79bd631452fec935293661adec31

  Log:
    Revert "don't use _XXX_SOURCE and __USE_GNU."
    
    This reverts commit ce04b14e5f62eedc163cc09d17159c465572ba7a.

  Modified files:
    lib/groonga_in.h
    lib/proc.c

  Modified: lib/groonga_in.h (+17 -0)
===================================================================
--- lib/groonga_in.h    2011-01-07 11:21:29 +0000 (f917c1c)
+++ lib/groonga_in.h    2011-01-08 04:54:41 +0000 (7d8edce)
@@ -19,10 +19,27 @@
 #ifndef GROONGA_IN_H
 #define GROONGA_IN_H
 
+#ifdef __GNUC__
+#define _GNU_SOURCE
+#endif /* __GNUC__ */
+
+#if defined(__NetBSD__) && !defined(_NETBSD_SOURCE)
+#define _NETBSD_SOURCE 1
+#endif /* defined(__NetBSD__) && !defined(_NETBSD_SOURCE) */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#ifdef USE_AIO
+/* #define __USE_XOPEN2K 1 */
+#define _XOPEN_SOURCE 600
+#else
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__)
+#define _XOPEN_SOURCE 520
+#endif
+#endif /* USE_AIO */
+
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif /* HAVE_STDLIB_H */

  Modified: lib/proc.c (+1 -0)
===================================================================
--- lib/proc.c    2011-01-07 11:21:29 +0000 (2de470c)
+++ lib/proc.c    2011-01-08 04:54:41 +0000 (92c7c35)
@@ -17,6 +17,7 @@
 
 #include <string.h>
 #include <stdlib.h>
+#define __USE_GNU
 #include <fcntl.h>
 #include <sys/stat.h>
 #include "proc.h"




Groonga-commit メーリングリストの案内
Back to archive index