acl build without ACL_PREPARE_COMPILE defined

This commit is contained in:
zhengshuxin 2018-04-17 16:42:26 +08:00
parent 618592e086
commit 7647c210b7
14 changed files with 28 additions and 18 deletions

View File

@ -30,8 +30,8 @@ CFLAGS = -c -g -W \
-Wno-long-long \
-Wuninitialized \
-D_POSIX_PTHREAD_SEMANTICS \
-DACL_PREPARE_COMPILE \
-Winvalid-pch \
-DACL_PREPARE_COMPILE \
-DUSE_REUSEPORT \
#-fstack-protector-all \
#-DDEBUG_MEM
@ -81,12 +81,12 @@ endif
ifeq ($(findstring clang, $(CC)), clang)
CFLAGS += -Wstrict-prototypes \
-Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
endif
ifeq ($(findstring clang++, $(CC)), clang)
CFLAGS += -Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
endif
# For FreeBSD
@ -98,7 +98,7 @@ endif
# For Darwin
ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin)
CFLAGS += -Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
UNIXTYPE = MACOSX
RPATH = macos
endif

View File

@ -18,6 +18,7 @@
#endif
#include "stdlib/acl_sys_patch.h"
#include "stdlib/acl_iostuff.h"
#include "stdlib/acl_mymalloc.h"
#include "stdlib/acl_mystring.h"
#include "stdlib/acl_msg.h"

View File

@ -31,6 +31,7 @@
/* Utility library. */
#include "init/acl_init.h"
#include "stdlib/acl_msg.h"
#include "stdlib/unix/acl_chroot_uid.h"
#include "stdlib/unix/acl_core_limit.h"

View File

@ -12,7 +12,9 @@
#include <linux/rtnetlink.h>
#include "stdlib/acl_msg.h"
#include "stdlib/acl_mymalloc.h"
#include "stdlib/acl_vstream.h"
#include "stdlib/acl_iostuff.h"
#include "ifmonitor.h"
typedef struct NETLINK_CTX {

View File

@ -14,6 +14,7 @@
#include "stdlib/acl_vstring.h"
#include "thread/acl_pthread.h"
#include "net/acl_vstream_net.h"
#include "net/acl_listen.h"
#include "msg/acl_msgio.h"
#endif

View File

@ -17,6 +17,7 @@
#include "stdlib/acl_msg.h"
#include "stdlib/acl_split_at.h"
#include "stdlib/acl_mymalloc.h"
#include "stdlib/acl_stringops.h"
#include "net/acl_valid_hostname.h"

View File

@ -2,7 +2,11 @@
#include "StdAfx.h"
#ifndef ACL_PREPARE_COMPILE
#include "stdlib/acl_define.h"
#ifdef ACL_UNIX
#include <sys/stat.h>
#include <sys/un.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <netinet/in.h>
@ -10,9 +14,9 @@
#include <string.h>
#endif
#include "stdlib/acl_define.h"
#include "stdlib/acl_sys_patch.h"
#include "stdlib/acl_msg.h"
#include "stdlib/acl_mystring.h"
#include "stdlib/acl_mymalloc.h"
#include "stdlib/acl_iostuff.h"
#include "net/acl_host_port.h"
@ -69,7 +73,6 @@ ACL_SOCKET acl_inet_bind(const struct addrinfo *res, unsigned flag)
#ifdef ACL_UNIX
ACL_SOCKET acl_unix_dgram_bind(const char *addr, unsigned flag)
{
#undef sun
struct sockaddr_un sun;
int len = (int) strlen(addr);
ACL_SOCKET sock;

View File

@ -22,6 +22,7 @@
/* Utility library. */
#include "stdlib/acl_sys_patch.h"
#include "stdlib/acl_msg.h"
#include "stdlib/acl_iostuff.h"
#include "net/acl_sane_inet.h"

View File

@ -75,7 +75,7 @@ endif
ifeq ($(findstring clang++, $(CC)), clang++)
CFLAGS += -Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
endif
# For FreeBSD
@ -88,7 +88,7 @@ endif
# For Darwin
ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin)
CFLAGS += -Wno-invalid-source-encoding \
-Wno-extended-offsetof \
-Wno-invalid-offsetof \
-Wno-unused-private-field
CFLAGS += -Wshadow
UNIXTYPE = MACOSX

View File

@ -60,12 +60,12 @@ endif
ifeq ($(findstring clang, $(CC)), clang)
CFLAGS += -Wstrict-prototypes \
-Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
endif
ifeq ($(findstring clang++, $(CC)), clang++)
CFLAGS += -Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
endif
# For FreeBSD

View File

@ -52,7 +52,7 @@ endif
ifeq ($(findstring clang++, $(CC)), clang++)
CFLAGS += -Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
endif
ifeq ($(findstring g++, $(CC)), g++)

View File

@ -36,12 +36,12 @@ endif
ifeq ($(findstring clang, $(CC)), clang)
CFLAGS += -Wstrict-prototypes \
-Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
endif
ifeq ($(findstring clang++, $(CC)), clang++)
CFLAGS += -Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
endif
# For FreeBSD
@ -53,7 +53,7 @@ endif
# For Darwin
ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin)
CFLAGS += -DMACOSX -Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
SYSLIB += -rdynamic
UNIXTYPE = MACOSX
endif

View File

@ -41,7 +41,7 @@ endif
# For Darwin
ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin)
CFLAGS += -DMACOSX -Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
UNIXTYPE = MACOSX
SYSLIB += -liconv -rdynamic
RPATH = macos

View File

@ -55,12 +55,12 @@ endif
ifeq ($(findstring clang, $(CC)), clang)
CFLAGS += -Wstrict-prototypes \
-Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
endif
ifeq ($(findstring clang++, $(CC)), clang++)
CFLAGS += -Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
endif
# For FreeBSD
@ -71,7 +71,7 @@ endif
# For Darwin
ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin)
CFLAGS += -Wno-invalid-source-encoding \
-Wno-extended-offsetof
-Wno-invalid-offsetof
UNIXTYPE = MACOSX
endif