summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-10-27 01:26:32 +0200
committerBerke Viktor <bviktor@hexchat.org>2012-10-27 01:26:32 +0200
commita98dc18d55947709e9350da79993bbe8e8cdfa28 (patch)
treea1af1defdc25564d1c6661a9402c08da2084f6ee
parentaae8c393ed8a840823c4a124379662e36bee844e (diff)
Ignore generated config.h properly on Unix
-rw-r--r--.gitignore1
-rw-r--r--config-win32.h (renamed from config.h)0
-rw-r--r--plugins/perl/perl.c6
-rw-r--r--plugins/python/python.c2
-rw-r--r--src/common/common-xp.vcxproj2
-rw-r--r--src/common/common-xp.vcxproj.filters2
-rw-r--r--src/common/common.vcxproj2
-rw-r--r--src/common/common.vcxproj.filters2
-rw-r--r--src/common/hexchat.h4
-rw-r--r--src/common/inet.h2
-rw-r--r--src/common/network.c7
-rw-r--r--src/common/ssl.c4
-rw-r--r--src/common/util.c3
-rw-r--r--src/fe-gtk/fe-gtk.h4
-rw-r--r--src/fe-gtk/hexchat.rc2
-rw-r--r--src/fe-gtk/sexy-iso-codes.c4
-rw-r--r--src/fe-gtk/xtext.c4
-rw-r--r--src/version/version.c2
18 files changed, 39 insertions, 14 deletions
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
index edcbc0fe..edcbc0fe 100644
--- a/config.h
+++ b/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 <unistd.h>
 #include <dirent.h>
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 @@
     </ProjectConfiguration>

   </ItemGroup>

   <ItemGroup>

-    <ClInclude Include="..\..\config.h" />

+    <ClInclude Include="..\..\config-win32.h" />

     <ClInclude Include="cfgfiles.h" />

     <ClInclude Include="chanopt.h" />

     <ClInclude Include="ctcp.h" />

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 @@
     <ClInclude Include="hexchat-plugin.h">

       <Filter>Header Files</Filter>

     </ClInclude>

-    <ClInclude Include="..\..\config.h">

+    <ClInclude Include="..\..\config-win32.h">

       <Filter>Header Files</Filter>

     </ClInclude>

     <ClInclude Include="strlutil.h">

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 @@
     </ProjectConfiguration>

   </ItemGroup>

   <ItemGroup>

-    <ClInclude Include="..\..\config.h" />

+    <ClInclude Include="..\..\config-win32.h" />

     <ClInclude Include="cfgfiles.h" />

     <ClInclude Include="chanopt.h" />

     <ClInclude Include="ctcp.h" />

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 @@
     <ClInclude Include="hexchat-plugin.h">

       <Filter>Header Files</Filter>

     </ClInclude>

-    <ClInclude Include="..\..\config.h">

+    <ClInclude Include="..\..\config-win32.h">

       <Filter>Header Files</Filter>

     </ClInclude>

     <ClInclude Include="strlutil.h">

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 <glib.h>
 #include <time.h>			/* 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 <winsock2.h>
 #include <ws2tcpip.h>
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 <stdio.h>
 #include <glib.h>
 
-#ifndef WIN32
+#ifdef WIN32
+#include "../../config-win32.h"			/* grab USE_IPV6 and LOOKUPD defines */
+#else
 #include <unistd.h>
+#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 <openssl/err.h>		  /* ERR_() */
 #ifdef WIN32
 #include <openssl/rand.h>		  /* RAND_seed() */
+#include "../../config-win32.h"	  /* HAVE_SNPRINTF */
+#else
+#include "../../config.h"
 #endif
 #include <time.h>				  /* asctime() */
 #include <string.h>				  /* strncpy() */
 #include "ssl.h"				  /* struct cert_info */
-#include "../../config.h"		  /* HAVE_SNPRINTF */
 
 #ifndef HAVE_SNPRINTF
 #include <glib.h>

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 <process.h>
 #include <io.h>
 #include "../dirent/dirent-win32.h"
+#include "../../config-win32.h"
 #else
 #include <unistd.h>
 #include <pwd.h>
 #include <sys/time.h>
 #include <sys/utsname.h>
 #include <dirent.h>
+#include "../../config.h"
 #endif
 
 #include <fcntl.h>
@@ -48,7 +50,6 @@
 #include <glib.h>
 #include <ctype.h>
 #include "util.h"
-#include "../../config.h"
 
 #if defined (USING_FREEBSD) || defined (__APPLE__)
 #include <sys/sysctl.h>
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 <winver.h>

-#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 <gtk/gtkwindow.h>
 
 #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 <stdlib.h>
 #include <string.h>
 #include <malloc.h>
-#include "../../config.h"
+#include "../../config-win32.h"
 
 char *
 comma ()