From a98dc18d55947709e9350da79993bbe8e8cdfa28 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 27 Oct 2012 01:26:32 +0200 Subject: [PATCH] Ignore generated config.h properly on Unix --- .gitignore | 1 + config.h => config-win32.h | 0 plugins/perl/perl.c | 6 +++++- plugins/python/python.c | 2 +- src/common/common-xp.vcxproj | 2 +- src/common/common-xp.vcxproj.filters | 2 +- src/common/common.vcxproj | 2 +- src/common/common.vcxproj.filters | 2 +- src/common/hexchat.h | 4 ++++ src/common/inet.h | 2 +- src/common/network.c | 7 ++++--- src/common/ssl.c | 4 +++- src/common/util.c | 3 ++- src/fe-gtk/fe-gtk.h | 4 ++++ src/fe-gtk/hexchat.rc | 2 +- src/fe-gtk/sexy-iso-codes.c | 4 ++++ src/fe-gtk/xtext.c | 4 ++++ src/version/version.c | 2 +- 18 files changed, 39 insertions(+), 14 deletions(-) rename config.h => config-win32.h (100%) diff --git a/.gitignore b/.gitignore index c8540695..aab3b999 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ autom4te.cache/ compile config.guess config.h.in +config.h config.log config.status config.sub diff --git a/config.h b/config-win32.h similarity index 100% rename from config.h rename to config-win32.h diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c index 38de8208..1ef97f9a 100644 --- a/plugins/perl/perl.c +++ b/plugins/perl/perl.c @@ -32,7 +32,11 @@ #endif #undef PACKAGE -#include "../../config.h" /* for #define OLD_PERL */ +#ifdef WIN32 +#include "../../config-win32.h" /* for #define OLD_PERL */ +#else +#include "../../config.h" +#endif #include "hexchat-plugin.h" static xchat_plugin *ph; /* plugin handle */ diff --git a/plugins/python/python.c b/plugins/python/python.c index 9f3dd211..f866a501 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -58,7 +58,7 @@ #ifdef WIN32 #include "../../src/dirent/dirent-win32.h" -#include "../../config.h" +#include "../../config-win32.h" #else #include #include diff --git a/src/common/common-xp.vcxproj b/src/common/common-xp.vcxproj index 736eacb1..3d2e0bd1 100644 --- a/src/common/common-xp.vcxproj +++ b/src/common/common-xp.vcxproj @@ -11,7 +11,7 @@ - + diff --git a/src/common/common-xp.vcxproj.filters b/src/common/common-xp.vcxproj.filters index 3707caa0..ceeea660 100644 --- a/src/common/common-xp.vcxproj.filters +++ b/src/common/common-xp.vcxproj.filters @@ -107,7 +107,7 @@ Header Files - + Header Files diff --git a/src/common/common.vcxproj b/src/common/common.vcxproj index 9bb79ac5..9f3c0990 100644 --- a/src/common/common.vcxproj +++ b/src/common/common.vcxproj @@ -11,7 +11,7 @@ - + diff --git a/src/common/common.vcxproj.filters b/src/common/common.vcxproj.filters index 3707caa0..ceeea660 100644 --- a/src/common/common.vcxproj.filters +++ b/src/common/common.vcxproj.filters @@ -107,7 +107,7 @@ Header Files - + Header Files diff --git a/src/common/hexchat.h b/src/common/hexchat.h index 9b5ebf04..5ad6a383 100644 --- a/src/common/hexchat.h +++ b/src/common/hexchat.h @@ -1,4 +1,8 @@ +#ifdef WIN32 +#include "../../config-win32.h" +#else #include "../../config.h" +#endif #include #include /* need time_t */ diff --git a/src/common/inet.h b/src/common/inet.h index 8995569c..75e2fb01 100644 --- a/src/common/inet.h +++ b/src/common/inet.h @@ -21,7 +21,7 @@ #else -#include "../../config.h" +#include "../../config-win32.h" #ifdef USE_IPV6 #include #include diff --git a/src/common/network.c b/src/common/network.c index eba24b05..f8722433 100644 --- a/src/common/network.c +++ b/src/common/network.c @@ -23,12 +23,13 @@ #include #include -#ifndef WIN32 +#ifdef WIN32 +#include "../../config-win32.h" /* grab USE_IPV6 and LOOKUPD defines */ +#else #include +#include "../../config.h" #endif -#include "../../config.h" /* grab USE_IPV6 and LOOKUPD defines */ - #define WANTSOCKET #define WANTARPA #define WANTDNS diff --git a/src/common/ssl.c b/src/common/ssl.c index 04fb6ac5..1ee42a08 100644 --- a/src/common/ssl.c +++ b/src/common/ssl.c @@ -22,11 +22,13 @@ #include /* ERR_() */ #ifdef WIN32 #include /* RAND_seed() */ +#include "../../config-win32.h" /* HAVE_SNPRINTF */ +#else +#include "../../config.h" #endif #include /* asctime() */ #include /* strncpy() */ #include "ssl.h" /* struct cert_info */ -#include "../../config.h" /* HAVE_SNPRINTF */ #ifndef HAVE_SNPRINTF #include diff --git a/src/common/util.c b/src/common/util.c index 0881c708..8f76cfc6 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -33,12 +33,14 @@ #include #include #include "../dirent/dirent-win32.h" +#include "../../config-win32.h" #else #include #include #include #include #include +#include "../../config.h" #endif #include @@ -48,7 +50,6 @@ #include #include #include "util.h" -#include "../../config.h" #if defined (USING_FREEBSD) || defined (__APPLE__) #include diff --git a/src/fe-gtk/fe-gtk.h b/src/fe-gtk/fe-gtk.h index f4188a01..313afc4b 100644 --- a/src/fe-gtk/fe-gtk.h +++ b/src/fe-gtk/fe-gtk.h @@ -1,4 +1,8 @@ +#ifdef WIN32 +#include "../../config-win32.h" +#else #include "../../config.h" +#endif #define DISPLAY_NAME "HexChat" diff --git a/src/fe-gtk/hexchat.rc b/src/fe-gtk/hexchat.rc index 62000013..da88747a 100644 --- a/src/fe-gtk/hexchat.rc +++ b/src/fe-gtk/hexchat.rc @@ -1,5 +1,5 @@ #include -#include "../../config.h" +#include "../../config-win32.h" #include "../../resource.h" XC_ICON ICON "../../hexchat.ico" diff --git a/src/fe-gtk/sexy-iso-codes.c b/src/fe-gtk/sexy-iso-codes.c index 4b637c9f..1e963cc1 100644 --- a/src/fe-gtk/sexy-iso-codes.c +++ b/src/fe-gtk/sexy-iso-codes.c @@ -23,7 +23,11 @@ * */ +#ifdef WIN32 +#include "../../config-win32.h" +#else #include "../../config.h" +#endif #include "sexy-iso-codes.h" diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 656a4c92..62cb0776 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -50,7 +50,11 @@ #include #ifdef XCHAT +#ifdef WIN32 +#include "../../config-win32.h" +#else #include "../../config.h" /* can define USE_XLIB here */ +#endif #else #define USE_XLIB #endif diff --git a/src/version/version.c b/src/version/version.c index 6726a470..202f2bd2 100644 --- a/src/version/version.c +++ b/src/version/version.c @@ -24,7 +24,7 @@ #include #include #include -#include "../../config.h" +#include "../../config-win32.h" char * comma ()