]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
since we really, really have to have autoconfig.h included before all other headers...
authorKevin P. Fleming <kpfleming@digium.com>
Sat, 16 Dec 2006 20:12:41 +0000 (20:12 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Sat, 16 Dec 2006 20:12:41 +0000 (20:12 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48521 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
include/asterisk.h
main/stdtime/localtime.c

index ed655ea417afebc7c34e727ef7f1b1f256e70d41..c0101a4f766dda90564dc0c4f2a4c4c0a22f623c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -181,6 +181,8 @@ endif
 
 ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
 
+ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
+
 ifeq ($(AST_DEVMODE),yes)
   ASTCFLAGS+=-Werror -Wunused
 endif
index 3c91f3430b6a5b6dd2750ddd74997b9e2543169d..6579496f7a9fd2fe0bc09a16a43c649f48c20962 100644 (file)
 #ifndef _ASTERISK_H
 #define _ASTERISK_H
 
+/* The include of 'autoconfig.h' is not necessary for any modules that
+   are part of the Asterisk source tree, because the top-level Makefile
+   will forcibly include that header in all compilations before all
+   other headers (even system headers). However, leaving this here will
+   help out-of-tree module builders, and doesn't cause any harm for the
+   in-tree modules.
+*/
 #include "asterisk/autoconfig.h"
 
 #include "asterisk/compat.h"
index 5be8a14f2ff53165b49b3b71e6d367674ae16d64..491b3df95e10de585f981f2b4e7a59a0a045ab00 100644 (file)
 #define TZ_STRLEN_MAX  255
 /* #define DEBUG */
 
-#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
 /*LINTLIBRARY*/
 
 #include <sys/types.h>
@@ -58,10 +54,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #include "private.h"
 #include "tzfile.h"
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
 #include "asterisk/lock.h"
 #include "asterisk/localtime.h"
 
-
 #ifndef lint
 #ifndef NOID
 static const char elsieid[] = "@(#)localtime.c 7.57";