distinguish internal/ext. builds with FIO_INTERNAL
authorDaniel Gollub <daniel.gollub@gmail.com>
Thu, 1 May 2014 12:07:02 +0000 (14:07 +0200)
committerJens Axboe <axboe@fb.com>
Thu, 1 May 2014 17:21:52 +0000 (11:21 -0600)
To distinguish between internal and external includes of
fio.h and other headers FIO_INTERNAL get applied only for
the fio (and gfio) internal build itself.

This helps to prevent double-declaration issues by making
ambigous declaration with common names coditional based on
the FIO_INTERNAL define.

Signed-off-by: Daniel Gollub <daniel.gollub@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Makefile

index e7659c46d74650d17e31246a8fbc3358a9514bd5..a0f0f718d31f2b082e4577c6b4e1dc48d2cdcfdf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ include config-host.mak
 endif
 
 DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
-CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
+CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INTERNAL $(DEBUGFLAGS)
 OPTFLAGS= -O3 -g -ffast-math
 CFLAGS = -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS)
 LIBS   += -lm $(EXTLIBS)