Author: cazfi Date: Sun Jan 24 21:06:55 2016 New Revision: 31574 URL: http://svn.gna.org/viewcvs/freeciv?rev=31574&view=rev Log: Added fc_prehdrs.h that initially has handling of winsock header includes.
See patch #6836 Added: trunk/utility/fc_prehdrs.h Modified: trunk/utility/Makefile.am trunk/utility/astring.c Modified: trunk/utility/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/Makefile.am?rev=31574&r1=31573&r2=31574&view=diff ============================================================================== --- trunk/utility/Makefile.am (original) +++ trunk/utility/Makefile.am Sun Jan 24 21:06:55 2016 @@ -17,6 +17,7 @@ distribute.h \ fc_utf8.c \ fc_utf8.h \ + fc_prehdrs.h \ fcbacktrace.c \ fcbacktrace.h \ fciconv.c \ Modified: trunk/utility/astring.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/astring.c?rev=31574&r1=31573&r2=31574&view=diff ============================================================================== --- trunk/utility/astring.c (original) +++ trunk/utility/astring.c Sun Jan 24 21:06:55 2016 @@ -57,6 +57,8 @@ #ifdef HAVE_CONFIG_H #include <fc_config.h> #endif + +#include "fc_prehdrs.h" #include <stdarg.h> #include <stdlib.h> Added: trunk/utility/fc_prehdrs.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/fc_prehdrs.h?rev=31574&view=auto ============================================================================== --- trunk/utility/fc_prehdrs.h (added) +++ trunk/utility/fc_prehdrs.h Sun Jan 24 21:06:55 2016 @@ -0,0 +1,40 @@ +/********************************************************************** + Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +***********************************************************************/ +#ifndef FC__PREHDRS_H +#define FC__PREHDRS_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* gen_headers */ +#include "freeciv_config.h" + +/* If winsock stuff is to be included, it must be included + * before <windows.h> and sometimes before any msys2 provided standard + * headers ( <unistd.h> ). It's hard to try to include these *before* + * standard headers only if they will be needed *later*, so we just + * include them always. */ +#ifdef FREECIV_HAVE_WINSOCK +#ifdef FREECIV_HAVE_WINSOCK2 +#include <winsock2.h> +#else /* FREECIV_HAVE_WINSOCK2 */ +#include <winsock.h> +#endif /* FREECIV_HAVE_WINSOCK2 */ +#endif /* FREECIV_HAVE_WINSOCK */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* FC__PREHDRS_H */ _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits