Kouhei Sutou
null+****@clear*****
Tue Jun 11 14:56:05 JST 2013
Kouhei Sutou 2013-06-11 14:56:05 +0900 (Tue, 11 Jun 2013) New Revision: 42313752c61597e822c31a31f9b3bae8e4758288 https://github.com/groonga/groonga/commit/42313752c61597e822c31a31f9b3bae8e4758288 Message: clang: suppress a warning Define missing _GNU_SOURCE for mkostemp(). lib/ii.c:7217:30: warning: implicit declaration of function 'mkostemp' is invalid in C99 [-Wimplicit-function-declaration] ii_buffer->tmpfd = GRN_MKOSTEMP(ii_buffer->tmpfpath, ^ lib/groonga_in.h:523:45: note: expanded from macro 'GRN_MKOSTEMP' # define GRN_MKOSTEMP(template,flags,mode) mkostemp(template,flags) ^ Modified files: CMakeLists.txt config.h.cmake Modified: CMakeLists.txt (+4 -0) =================================================================== --- CMakeLists.txt 2013-06-11 14:29:21 +0900 (22ddb27) +++ CMakeLists.txt 2013-06-11 14:56:05 +0900 (3d5b249) @@ -91,6 +91,10 @@ add_definitions( -DHAVE_CONFIG_H ) +if(CMAKE_COMPILER_IS_GNUC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") + set(_GNU_SOURCE TRUE) +endif() + include_directories( BEFORE ${CMAKE_CURRENT_BINARY_DIR} Modified: config.h.cmake (+3 -1) =================================================================== --- config.h.cmake 2013-06-11 14:29:21 +0900 (265be15) +++ config.h.cmake 2013-06-11 14:56:05 +0900 (c135f5c) @@ -58,7 +58,9 @@ /* compiler specific build options */ #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@ -#cmakedefine _GNU_SOURCE +#ifndef _GNU_SOURCE + #cmakedefine _GNU_SOURCE +#endif #cmakedefine _ISOC99_SOURCE #cmakedefine _LARGE_FILES #cmakedefine _NETBSD_SOURCE -------------- next part -------------- HTML����������������������������... 下载