diff options
author | Adam <Adam@drink-coca-cola.info> | 2010-05-15 03:27:09 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-06-18 21:02:12 -0400 |
commit | 2a22d9c2fdf6978858055f1143af0ec40e417424 (patch) | |
tree | 29e9665007c4245a7a427dc654261473979e115e /include | |
parent | c477360dbf45070ff80ad8949a66429fe1ae8414 (diff) |
Fixed cmake build, removed version_flags it is no longer need, removed old unneeded defs.h and split up pseudo.h
Diffstat (limited to 'include')
-rw-r--r-- | include/CMakeLists.txt | 4 | ||||
-rw-r--r-- | include/Makefile | 7 | ||||
-rw-r--r-- | include/defs.h | 39 | ||||
-rw-r--r-- | include/extern.h | 1 | ||||
-rw-r--r-- | include/pseudo.h | 17 | ||||
-rw-r--r-- | include/services.h | 18 | ||||
-rw-r--r-- | include/version.sh | 10 | ||||
-rw-r--r-- | include/version.sh.c | 2 |
8 files changed, 16 insertions, 82 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 19bbcfc6c..de44e4f28 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -8,7 +8,7 @@ if(MSVC OR NOT SH) # Generate version.h from the above executable and the version.log file from the main source directory, with dependencies to the given headers and all source files in the main Anope build add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h COMMAND version_sh ${Anope_SOURCE_DIR}/version.log ${CMAKE_CURRENT_SOURCE_DIR}/version.sh ${CMAKE_CURRENT_BINARY_DIR}/version.h - MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS version_sh ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${CMAKE_CURRENT_SOURCE_DIR}/pseudo.h ${CMAKE_CURRENT_SOURCE_DIR}/messages.h ${SRC_SRCS} + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS version_sh ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${SRC_SRCS} ) # Add version_sh to list of files for CPack to ignore get_target_property(version_sh_BINARY version_sh LOCATION) @@ -19,7 +19,7 @@ else(MSVC OR NOT SH) # Generate version.h from version.sh and the version.log file from the main source directory, with dependencies to the given headers and all source files in the main Anope build add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h COMMAND ${SH} ${CMAKE_CURRENT_SOURCE_DIR}/version.sh ${Anope_SOURCE_DIR}/version.log ${CMAKE_CURRENT_BINARY_DIR}/version.h - MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${CMAKE_CURRENT_SOURCE_DIR}/pseudo.h ${CMAKE_CURRENT_SOURCE_DIR}/messages.h ${SRC_SRCS} + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${SRC_SRCS} ) endif(MSVC OR NOT SH) diff --git a/include/Makefile b/include/Makefile index 69e2473f6..4c20fa502 100644 --- a/include/Makefile +++ b/include/Makefile @@ -1,7 +1,7 @@ -all: services.h extern.h pseudo.h version.h +all: services.h extern.h version.h -version.h: Makefile version.sh services.h pseudo.h $(SRCS) +version.h: Makefile version.sh services.h $(SRCS) sh version.sh ../version.log $@ services.h: sysconf.h config.h extern.h @@ -10,9 +10,6 @@ services.h: sysconf.h config.h extern.h extern.h: slist.h touch $@ -pseudo.h: commands.h timers.h slist.h - touch $@ - clean: (rm -f language.h) diff --git a/include/defs.h b/include/defs.h deleted file mode 100644 index e571b691f..000000000 --- a/include/defs.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Set default values for any constants that should be in include files but - * - * (C) 2003-2010 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for furhter details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * - * - */ - -/*************************************************************************/ - -#ifndef NAME_MAX -# define NAME_MAX 255 -#endif - -#ifndef BUFSIZ -# define BUFSIZ 256 -#else -# if BUFSIZ < 256 -# define BUFSIZ 256 -# endif -#endif - -/* Length of an array: */ -#define lenof(a) (sizeof(a) / sizeof(*(a))) - -/* Telling compilers about printf()-like functions: */ -#ifdef __GNUC__ -# define FORMAT(type,fmt,start) __attribute__((format(type,fmt,start))) -#else -# define FORMAT(type,fmt,start) -#endif - -/*************************************************************************/ diff --git a/include/extern.h b/include/extern.h index 657452fd0..757bac3dc 100644 --- a/include/extern.h +++ b/include/extern.h @@ -223,7 +223,6 @@ E const char version_number[]; E const char version_number_dotted[]; E const char version_build[]; E char *version_protocol; -E const char version_flags[]; E std::string services_dir; E std::string log_filename; diff --git a/include/pseudo.h b/include/pseudo.h deleted file mode 100644 index 3ad6b518a..000000000 --- a/include/pseudo.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Include extra includes needed by most/all pseudo-clients. - * - * (C) 2003-2010 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for furhter details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * - */ - -#include "modules.h" -#include "language.h" -#include "timers.h" -#include "slist.h" diff --git a/include/services.h b/include/services.h index c05b44eac..6d7669e63 100644 --- a/include/services.h +++ b/include/services.h @@ -34,9 +34,9 @@ # define u_int32_t uint32_t # define u_int64_t uint64_t -# ifndef INADDR_NONE -# define INADDR_NONE (-1) -# endif +# ifndef INADDR_NONE +# define INADDR_NONE (-1) +# endif #endif @@ -96,6 +96,13 @@ extern CoreExport int inet_pton(int af, const char *src, void *dst); extern CoreExport const char *inet_ntop(int af, const void *src, char *dst, size_t size); #endif +/* Telling compilers about printf()-like functions: */ +#ifdef __GNUC__ +# define FORMAT(type,fmt,start) __attribute__((format(type,fmt,start))) +#else +# define FORMAT(type,fmt,start) +#endif + #ifdef HAVE_GETTIMEOFDAY # include <sys/time.h> #endif @@ -141,10 +148,6 @@ extern int strncasecmp(const char *, const char *, size_t); #define tolower tolower_ #define toupper toupper_ -/* We also have our own encrypt(). */ -#define encrypt encrypt_ - - #ifdef __WINS__ #ifndef BKCHECK #define BKCHECK @@ -199,7 +202,6 @@ extern int strncasecmp(const char *, const char *, size_t); /* Miscellaneous definitions. */ #include "hashcomp.h" -#include "defs.h" #include "slist.h" /* Pull in the various bits of STL */ diff --git a/include/version.sh b/include/version.sh index 7f14f9e1d..a32c34c5a 100644 --- a/include/version.sh +++ b/include/version.sh @@ -57,16 +57,6 @@ cat >$VERSIONH <<EOF #define VERSION_STRING "$VERSION" #define VERSION_STRING_DOTTED "$VERSIONDOTTED" -#if defined(_WIN32) -# if _MSC_VER >= 1400 -# define VER_OS "W" -# else -# define VER_OS "w" -# endif -#else -# define VER_OS -#endif - #endif EOF diff --git a/include/version.sh.c b/include/version.sh.c index 7750d80f6..261a51ce4 100644 --- a/include/version.sh.c +++ b/include/version.sh.c @@ -188,6 +188,8 @@ void write_version(FILE * fd, const char *input) until_eof = 1; } + if (fdin) + fclose(fdin); } void parse_line(FILE * fd, char *line) |