macros.h: surround ARRAYSIZE by guards

This commit is contained in:
Robert Swiecki 2018-02-12 22:39:42 +01:00
parent f8d0e5fda1
commit e237773370
2 changed files with 4 additions and 3 deletions

View File

@ -94,8 +94,8 @@ caps.o: caps.h nsjail.h logs.h macros.h util.h
cgroup.o: cgroup.h nsjail.h logs.h util.h cgroup.o: cgroup.h nsjail.h logs.h util.h
cmdline.o: cmdline.h nsjail.h logs.h caps.h config.h macros.h mnt.h user.h cmdline.o: cmdline.h nsjail.h logs.h caps.h config.h macros.h mnt.h user.h
cmdline.o: util.h cmdline.o: util.h
config.o: caps.h nsjail.h logs.h cmdline.h config.h config.pb.h macros.h config.o: caps.h nsjail.h logs.h cmdline.h config.h macros.h mnt.h user.h
config.o: mnt.h user.h util.h config.o: util.h
contain.o: contain.h nsjail.h logs.h caps.h cgroup.h cpu.h mnt.h net.h pid.h contain.o: contain.h nsjail.h logs.h caps.h cgroup.h cpu.h mnt.h net.h pid.h
contain.o: user.h uts.h contain.o: user.h uts.h
cpu.o: cpu.h nsjail.h logs.h util.h cpu.o: cpu.h nsjail.h logs.h util.h
@ -110,4 +110,3 @@ subproc.o: sandbox.h user.h util.h
uts.o: uts.h nsjail.h logs.h uts.o: uts.h nsjail.h logs.h
user.o: user.h nsjail.h logs.h macros.h subproc.h util.h user.o: user.h nsjail.h logs.h macros.h subproc.h util.h
util.o: util.h nsjail.h logs.h macros.h util.o: util.h nsjail.h logs.h macros.h
config.pb.o: config.pb.h

View File

@ -35,7 +35,9 @@
})) }))
#endif /* !defined(TEMP_FAILURE_RETRY) */ #endif /* !defined(TEMP_FAILURE_RETRY) */
#if !defined(ARRAYSIZE)
#define ARRAYSIZE(array) (sizeof(array) / sizeof(*array)) #define ARRAYSIZE(array) (sizeof(array) / sizeof(*array))
#endif /* !defined(ARRAYSIZE) */
#define UNUSED __attribute__((unused)) #define UNUSED __attribute__((unused))
#if 0 /* Works, but needs -fblocks and libBlocksRuntime with clang */ #if 0 /* Works, but needs -fblocks and libBlocksRuntime with clang */