core: switch to C99
PR-URL: https://github.com/libuv/libuv/pull/994 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
ea13b6a99e
commit
d527ab90f4
@ -126,7 +126,7 @@ EXTRA_DIST = test/fixtures/empty_file \
|
||||
|
||||
TESTS = test/run-tests
|
||||
check_PROGRAMS = test/run-tests
|
||||
test_run_tests_CFLAGS = -Wno-long-long
|
||||
test_run_tests_CFLAGS =
|
||||
test_run_tests_LDFLAGS =
|
||||
test_run_tests_SOURCES = test/blackhole-server.c \
|
||||
test/dns-server.c \
|
||||
@ -276,7 +276,7 @@ test_run_tests_CFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPA
|
||||
endif
|
||||
|
||||
if SUNOS
|
||||
test_run_tests_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
|
||||
test_run_tests_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
|
||||
endif
|
||||
|
||||
|
||||
@ -345,7 +345,7 @@ endif
|
||||
|
||||
if SUNOS
|
||||
include_HEADERS += include/uv-sunos.h
|
||||
libuv_la_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
|
||||
libuv_la_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
|
||||
libuv_la_SOURCES += src/unix/sunos.c
|
||||
endif
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ CC ?= gcc
|
||||
CFLAGS += -Wall \
|
||||
-Wextra \
|
||||
-Wno-unused-parameter \
|
||||
-std=gnu99 \
|
||||
-Iinclude \
|
||||
-Isrc \
|
||||
-Isrc/win \
|
||||
|
||||
@ -26,7 +26,7 @@ AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
CC_FLAG_VISIBILITY #[-fvisibility=hidden]
|
||||
CC_CHECK_CFLAGS_APPEND([-g])
|
||||
CC_CHECK_CFLAGS_APPEND([-std=gnu89])
|
||||
CC_CHECK_CFLAGS_APPEND([-std=gnu99])
|
||||
CC_CHECK_CFLAGS_APPEND([-pedantic])
|
||||
CC_CHECK_CFLAGS_APPEND([-Wall])
|
||||
CC_CHECK_CFLAGS_APPEND([-Wextra])
|
||||
|
||||
@ -30,10 +30,6 @@
|
||||
#include <fcntl.h> /* O_CLOEXEC, may be */
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(__STRICT_ANSI__)
|
||||
# define inline __inline
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
# include "linux-syscalls.h"
|
||||
#endif /* __linux__ */
|
||||
|
||||
@ -34,11 +34,6 @@
|
||||
# include <sys/resource.h> /* setrlimit() */
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic ignored "-Wvariadic-macros"
|
||||
# pragma clang diagnostic ignored "-Wc99-extensions"
|
||||
#endif
|
||||
|
||||
#define TEST_PORT 9123
|
||||
#define TEST_PORT_2 9124
|
||||
|
||||
|
||||
7
uv.gyp
7
uv.gyp
@ -19,7 +19,7 @@
|
||||
'xcode_settings': {
|
||||
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
|
||||
'WARNING_CFLAGS': [ '-Wall', '-Wextra', '-Wno-unused-parameter' ],
|
||||
'OTHER_CFLAGS': [ '-g', '--std=gnu89', '-pedantic' ],
|
||||
'OTHER_CFLAGS': [ '-g', '--std=gnu99', '-pedantic' ],
|
||||
}
|
||||
},
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
'cflags': [
|
||||
'-fvisibility=hidden',
|
||||
'-g',
|
||||
'--std=gnu89',
|
||||
'--std=gnu99',
|
||||
'-pedantic',
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
@ -226,7 +226,7 @@
|
||||
'sources': [ 'src/unix/sunos.c' ],
|
||||
'defines': [
|
||||
'__EXTENSIONS__',
|
||||
'_XOPEN_SOURCE=500',
|
||||
'_XOPEN_SOURCE=600',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
@ -425,7 +425,6 @@
|
||||
'libraries': [ '-lws2_32' ]
|
||||
}, { # POSIX
|
||||
'defines': [ '_GNU_SOURCE' ],
|
||||
'cflags': [ '-Wno-long-long' ],
|
||||
'sources': [
|
||||
'test/runner-unix.c',
|
||||
'test/runner-unix.h',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user