Commit Graph

66 Commits

Author SHA1 Message Date
Chun-wei Fan
53d487e31b config.h.win32.in: Clean Up and Update
Merge the parts that has things to do with stdint.h and inttypes.h with
the !_MSC_VER portions, and add initial support for Visual Studio 2015,
which added support for C99 snprintf() and vsnprintf().

Not too sure about the !_MSC_VER for C99 snprintf() and vsnprintf(), but
since this file is mainly for Visual Studio builds, anyways...
2015-07-21 11:26:29 +08:00
Chun-wei Fan
1632d5716e Win32: Update Pre-configured Config Headers
Update config.h.win32.in and glibconfig.h.win32.in so that they will be
in-line with the ones that are produced with configure.ac, for use on
Windows builds.

Thanks to Philip Withnall for pointing out the changes needed to update
glibconfig.h.win32.in in bug 727829.
2015-01-07 09:59:47 +08:00
Chun-wei Fan
e3db9632e7 config.h.win32.in: Define _WIN32_WINNT Conditionally
This is done so that _WIN32_WINNT may be overridden in the project files,
if needed, so that one can access the Vista+ (or so) Windows APIs easier
by using "preprocessor defines" (or so) in the Visual C++ project files.
2014-05-23 10:14:50 +08:00
Chun-wei Fan
f4ae0cbf9a Update config.h.win32.in for Newer Windows
Make use of if_indextoname() and if_nametoindex() when building against
Window Vista/Server 2008 or later, as these are provided by the system.

This is not turned on by default as we still want to support XP and
Server 2003-turn this on by changing _WIN32_WINNT to 0x600 or later prior
to compiling GLib.

https://bugzilla.gnome.org/show_bug.cgi?id=730352
2014-05-19 14:49:39 +08:00
Chun-wei Fan
62206576c3 Update config.h.win32.in
Make the entries of config.h.win32.in match those that are being checked
in config.h.in.
2014-03-12 17:26:45 +08:00
Ryan Lortie
3f41e49285 Use POSIX-specified <poll.h> over <sys/poll.h>
POSIX specifies that <poll.h> is the correct header to include for
poll(), so let's do that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=141251
2013-12-22 11:33:07 -05:00
Dan Winship
158dde0507 Replace #ifdef HAVE_UNISTD_H checks with #ifdef G_OS_UNIX
In Windows development environments that have it, <unistd.h> is mostly
just a wrapper around several other native headers (in particular,
<io.h>, which contains read(), close(), etc, and <process.h>, which
contains getpid()). But given that some Windows dev environments don't
have <unistd.h>, everything that uses those functions on Windows
already needed to include the correct Windows header as well, and so
there is never any point to including <unistd.h> on Windows.

Also, remove some <unistd.h> includes (and a few others) that were
unnecessary even on unix.

https://bugzilla.gnome.org/show_bug.cgi?id=710519
2013-11-20 09:25:39 -05:00
Dan Winship
3981cddbf8 Require POSIX.1 (1990) compliance on unix
Assume unix platforms support the original POSIX.1 standard.
Specifically, assume that if G_OS_UNIX, then we have chown(),
getcwd(), getgrgid(), getpwuid(), link(), <grp.h>, <pwd.h>,
<sys/types.h>, <sys/uio.h>, <sys/wait.h>, and <unistd.h>.

Additionally, since all versions of Windows that we care about also
have <sys/types.h>, we can remove HAVE_SYS_TYPES_H checks everywhere.

Also remove one include of <sys/times.h>, and the corresponding
configure check, since the include is not currently needed (and may
always have just been a typo for <sys/time.h>).

https://bugzilla.gnome.org/show_bug.cgi?id=710519
2013-11-20 09:17:42 -05:00
Dan Winship
6e4a7fca43 Require C90 compliance
Assume all supported platforms implement C90, and therefore they
(correctly) implement atexit(), memmove(), setlocale(), strerror(),
and vprintf(), and have <float.h> and <limits.h>.

(Also remove the configure check testing that "do ... while (0)" works
correctly; the non-do/while-based version of G_STMT_START and
G_STMT_END was removed years ago, but the check remained. Also, remove
some checks that configure.ac claimed were needed for libcharset, but
aren't actually used.)

Note that removing the g_memmove() function is not an ABI break even
on systems where g_memmove() was previously not a macro, because it
was never marked GLIB_AVAILABLE_IN_ALL or listed in glib.symbols, so
it would have been glib-internal since 2004.

https://bugzilla.gnome.org/show_bug.cgi?id=710519
2013-11-20 09:16:16 -05:00
Chun-wei Fan
e05abaed04 Update config.h.win32.in
Make entries more in sync with the items checked with autotools, and
provide a MinGW declaration for _GLIB_EXTERN, taken from configure.ac.
2013-08-21 11:04:37 +08:00
Chun-wei Fan
1e945933d4 config.h.win32.in: Drop unneeded item
...We no longer have the iconv cache code around.
2013-08-16 10:35:19 +08:00
Chun-wei Fan
2ab9e54477 Update config.h.win32.in
Make its entries match the items that are being checked by the autotools
builds in config.h.in.
2013-08-16 10:29:41 +08:00
Chun-wei Fan
80985d1c05 Update config.h.win32(.in)
Make the entries of config.h.win32(.in) consistent with the entries
that are generated from the autotools build (config.h.in).
2013-05-27 12:50:37 +08:00
Chun-wei Fan
872d3634a7 Update config.h.win32.in
Add entry for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, to better reflect the
entries of items in config.h.in.  We are not currently defining this here
as the pre-configured config.h.win32.in is primarily meant for Visual
Studio builds of GLib-the MinGW/GCC/Clang builds of GLib will normally
use the autotools builds, which should give the correct config.h entries
upon running ./configure.
2013-03-01 16:12:36 +08:00
Chun-wei Fan
4ba56f3653 Bug 688681: Stop using .def files in Visual Studio builds
Since we are now starting to use __declspec (dllexport) to export the
public functions during the build of the GLib DLLs (i.e. to generate the
.lib files), we don't want to generate the .def files from the .symbols
files as we did before for a long time.

This removes from the projects the custom build steps to generate the
various .def files

This will also update the pre-configured config.h(.win32.in) to define
_GLIB_EXTERN appropriately as __declspec (dllexport), as well as making its
entries reflect config.h.in more closely.
2013-01-15 15:23:05 +08:00
Chun-wei Fan
39150f90e5 Update config.h.win32.in
Make its entries correspond to the entries in config.h.in, and use
_strnicmp for strncasecmp on Visual C++.
2012-11-19 12:38:28 +08:00
Chun-wei Fan
3d45854a58 Update config.h.win32(.in) and glibconfig.h.win32(.in)
-Make config.h.win32(.in) have entries that more resembles the generated
 config.h.in
-Move the ALIGNOF_* #define's from glibconfig.h.win32(.in) to
 config.h.win32(.in), where they were supposed to be.
2012-09-26 17:47:52 +08:00
Chun-wei Fan
190891042d Update config.h.win32(.in)
Make it more like the one that is generated by autotools.

It is true that Visual C++ has sig_atomic_t, at least for Visual C++ 2008
and later, but this is currently only used for UNIX builds of GLib, as a
point of note here.
2012-03-19 16:02:37 +08:00
Chun-wei Fan
05663607ea Update config.h.win32(.in)
Remove the config for ENABLE_REGEX, as GRegex is now included in all builds.
2012-03-08 15:34:39 +08:00
Chun-wei Fan
71c3ba28a8 config.h.win32.in: Add note on if_nametoindex
This explains the current disabling of HAVE_IF_NAMETOINDEX as we are
still supporting Windows XP.  This is expected to change when the patch
for XP support for if_nametoindex in accepted into master.
2012-02-08 20:41:13 +08:00
Chun-wei Fan
95a2c885d7 config.h.win32.in: Updates
Make this more like the config.h.in template
2012-02-08 19:52:55 +08:00
Chun-wei Fan
a2e1541cda config.h.win32.in: Cleanups
-Make the contents of the preconfigured config.h.win32(.in) more like the
 contents of config.h.in
-Correct the sizing of void* on x64 platforms (which should be 8, unlike
 4 on x86-32 platforms)
2011-12-30 15:27:31 +08:00
Chun-wei Fan
eb17516a67 config.h.win32(.in): Update for strcasecmp
Visual C++ uses _stricmp, which is identical to strcasecmp on gcc.
2011-10-06 15:03:30 +08:00
Matthias Clasen
e6c76d9fd4 Clean up atomic cruft
Nothing is using these defines anymore, and the messages
are misleading. Based on a patch by Kean Johnston.

https://bugzilla.gnome.org/show_bug.cgi?id=660013
2011-09-29 23:20:09 -04:00
Chun-wei Fan
09a322c8e4 Update config.h.win32.in
Make the pre-configured config.h(.win32.in) for Windows more like the
config.h that would be produced during ./configure on Windows systems.
2011-08-23 00:09:03 +08:00
Chun-wei Fan
77a10feafa Bug 652827: Update config.h.win32.in
Add check macro for HAVE_WIN32_BUILTINS_FOR_ATOMIC_OPERATIONS, as it is
now required for MSVC builds of glib/gatomic.c GLib 2.29.15+.

It is true that the MinGW cross-compiler on Linux systems will have
HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS and
HAVE_WIN32_BUILTINS_FOR_ATOMIC_OPERATIONS defined during the completion
of ./configure, but since this file is primarily meant for people
compiling -on- Windows (and that the "native" Windows MinGW would neither
./configure to define HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS and
HAVE_WIN32_BUILTINS_FOR_ATOMIC_OPERATIONS), this file will be updated as
it is for now at least until the situation for "native" Windows MinGW
change. (please see Bug 652827 regarding this paragraph)
2011-08-11 15:30:48 +08:00
Chun-wei Fan
0e4507a296 Update config.h.win32(.in)
Make file contents more like the config.h(.in) contents
2011-06-22 15:22:55 +08:00
Chun-wei Fan
1d1f44ca64 Update config.h.win32.in
-Make contents more like the current config.h(.in)
-vsnprintf is included in VS 2008+
2011-06-07 10:32:47 +08:00
Chun-wei Fan
b2ebf0526d Update config.h.win32.in for VS 2010
VS2010 ships with stdint.h by default, so update config.h.win32.in
to reflect that
2011-03-10 12:40:57 +08:00
Ryan Lortie
3a8ab85d96 rename configure.in to configure.ac 2010-07-13 11:59:16 -04:00
Tor Lillqvist
3e3779b7d0 Make config.h.win32.in match what configure produces
No semantic changes.
2010-05-19 10:47:02 +03:00
Tor Lillqvist
365fd70f26 Make config.h.win32 match what the configure script produces 2010-03-22 15:33:38 +02:00
Tor Lillqvist
a0bcd63304 Don't check for headers we include unconditionally
Don't bother checking for winsock2.h and mswsock.h in the configure
script as we include these unconditionally when building for Windows
anyway.
2009-12-14 03:16:55 +02:00
Tor Lillqvist
8dc200db04 Check for <wspiapi.h> and use it if present
Should help bug #603527 if glib is built in an environment that has
<wspiapi.h>.
2009-12-14 03:09:46 +02:00
Hans Breuer
75ef018248 Updated msvc build files 2009-05-30 15:29:23 +02:00
Tor Lillqvist
b006f4832f Update to match what the configure script produces. Just for uniformity,
2008-09-15  Tor Lillqvist  <tml@novell.com>

	* config.h.win32.in: Update to match what the configure script
	produces. Just for uniformity, only commented out parts affected.


svn path=/trunk/; revision=7489
2008-09-15 15:14:00 +00:00
Tor Lillqvist
194493f3f8 Should not define HAVE_DIRENT_H when compiling with MSVC, as the only file
2008-08-27  Tor Lillqvist  <tml@novell.com>

	* config.h.win32.in: Should not define HAVE_DIRENT_H when
	compiling with MSVC, as the only file which checks HAVE_DIRENT_H
	is gdir.c, and that includes the dirent.h and wdirent.c from
	build/win32/dirent explicitly anyway when being compiled with
	MSVC.


svn path=/trunk/; revision=7403
2008-08-27 12:48:57 +00:00
Tor Lillqvist
e3127daf4e Update to match the configure-produced one.
2008-05-16  Tor Lillqvist  <tml@novell.com>

	* config.h.win32.in: Update to match the configure-produced one.


svn path=/trunk/; revision=6892
2008-05-16 16:42:52 +00:00
Tor Lillqvist
3deb5aceda Update to match what configure produces.
2007-11-28  Tor Lillqvist  <tml@novell.com>

	* config.h.win32.in: Update to match what configure produces.


svn path=/trunk/; revision=5976
2007-11-28 16:01:16 +00:00
Tor Lillqvist
851c7067aa Update to match what configure produces.
2007-03-15  Tor Lillqvist  <tml@novell.com>

	* config.h.win32.in: Update to match what configure produces.


svn path=/trunk/; revision=5409
2007-03-15 14:41:24 +00:00
Tor Lillqvist
98a5ddc4c8 config.h.win32.in glib/galloca.h glib/gbacktrace.h glib/gwin32.c
2007-01-17  Tor Lillqvist  <tml@novell.com>

	* config.h.win32.in
	* glib/galloca.h
	* glib/gbacktrace.h
	* glib/gwin32.c
	* glibconfig.h.win32.in
	* README.win32: More minor tweaks for Digital Mars
	compiler. (#346808, Serhat Sevki Dincer)


svn path=/trunk/; revision=5294
2007-01-18 19:05:21 +00:00
Tor Lillqvist
93627e1925 Update to match what configure produces. Add the G_ATOMIC_*. Define
2004-08-04  Tor Lillqvist  <tml@iki.fi>

	* config.h.win32.in: Update to match what configure produces. Add
	the G_ATOMIC_*. Define G_ATOMIC_I486 when compiling with gcc. Move
	HAVE_INT64_AND_I64 to where the configure script puts it. Add
	HAVE_INTTYPES_H_WITH_UINTMAX. Define intmax_t as __int64 for MSVC.
2004-08-04 23:12:53 +00:00
Sebastian Wilhelmi
76c213543a Removed the PID niceness surrogate for thread priorities as requested by
2004-02-26  Sebastian Wilhelmi  <seppi@seppi.de>

	* configure.in, config.h.win32.in, glib/gthread.c: Removed the PID
	niceness surrogate for thread priorities as requested by Tim. It
	does more harm than good.

        * glib/tmpl/threads.sgml: Updated to reflect removal of the PID
	niceness surrogate for thread priorities.
2004-02-26 14:44:42 +00:00
Hans Breuer
fc9afe0d21 added g_hash_table_find and a bunch of g_queue_*
2003-02-26 Hans Breuer  <hans@breuer.org>

	* glib/glib.def : added g_hash_table_find and a
	bunch of g_queue_*

	* glib/gmain.c : make it compile on win32,
	child_wake_up_pipe replaced by semaphore like it is done
	for the other wake_up_pipe

	* config.h.win32.in : added HAVE_INT64_AND_I64
	* glibconfig.h.win32.in : G_MAXSIZE .. G_M??INT64,
	and typedef for GPid

	* test/env-test.c : don't let the local log function
	collide in namespace with standard C
2004-02-25 23:48:22 +00:00
Tor Lillqvist
5d097b8591 Force shared library (DLL) only on Windows. (I don't think that is
2003-10-24  Tor Lillqvist  <tml@iki.fi>

	* configure.in: Force shared library (DLL) only on Windows.
	(I don't think that is controversial?) Remove unnecessary
	AC_LIBTOOL_WIN32_DLL. Don't use -D_REENTRANT on
	Win32, it is not used by mingw or MSVC headers.

	* config.h.win32.in
	* glibconfig.h.win32.in: Match what configure produces.

	* glib/gconvert.c
	* glib/gutils.c: Mark a couple of functions and variables that
	aren't public as static.

	* glib/gnulib/g-gnulib.h: Undef HAVE_SNPRINTF before (re)defining
	it potentially differently, to silence compiler.

	* glib/glib.def: Add some missing entries.

	* tests/gobject/Makefile.am (LDADD): Reorder, put libgobject after
	libtestgobject.

	* tests/gobject/ifaceproperties.c (main): NULL-terminate arg list
	to g_object_set() and _get().
2003-10-24 03:41:22 +00:00
Tor Lillqvist
d1881e2dfd Update to match what is currently produced by autotools.
2002-11-21  Tor Lillqvist  <tml@iki.fi>

	* config.h.win32.in: Update to match what is currently produced by
	autotools.

	* configure.in: Remove superfluous spaces on two shell variable
	assignment lines. Don't define HAVE_GOOD_PRINTF as 0 if we don't
	have a good printf, it is tested with #ifdef.

	* glib/glib.def: Add new functions.

	* glib/Makefile.am: If !HAVE_GOOD_PRINTF, add libtio.la to LIBADD
	and DEPENDENCIES.

	* glib/glib.rc.in: Hardcode 2.0 in the names, as that is what the
	Makefile.am does.
2002-11-21 03:04:53 +00:00
Tor Lillqvist
0f58e35c58 Match new additions in a configure-produced config.h.
2002-05-17  Tor Lillqvist  <tml@iki.fi>

	* config.h.win32.in: Match new additions in a configure-produced
	config.h.
2002-05-17 21:02:13 +00:00
Owen Taylor
7e620ee072 Check for iconv_* in -liconv as well as libiconv_* in -liconv since AIX
Mon Feb 25 23:01:53 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in acconfig.h config.h.win32.in
        glib/gconvert.c: Check for iconv_* in -liconv
        as well as libiconv_* in -liconv since AIX ships
        the system iconv in a separate library.
        Patch from Miroslaw Dobrzanski-Neumann (#72569)
2002-02-26 04:12:52 +00:00
Tor Lillqvist
657d78b87e Edits.
2002-02-24  Tor Lillqvist  <tml@iki.fi>

	* README.win32: Edits.

	* config.h.win32.in: Add (as undefined) HAVE_UNSETENV,
	_FILE_OFFSET_BITS and _LARGE_FILES, just for completeness.

	* glibconfig.h.win32.in: Add the gcc-2.95.x undef of
	G_HAVE_ISO_VARARGS.
2002-02-24 21:42:34 +00:00
Tor Lillqvist
c2794647a4 Add (undefined) HAVE_C99_VSNPRINTF.
2001-12-21  Tor Lillqvist  <tml@iki.fi>

	* config.h.win32.in: Add (undefined) HAVE_C99_VSNPRINTF.

	* glibconfig.h.win32.in: Add definition of G_HAVE_GROWING_STACK.

	* tests/Makefile.am: Rename the progs_LDADD, thread_LDADD and
	module_LDADD Make macros to progs_ldadd, thread_ldadd and
	module_ldadd. Newer automakes reserve macros named *_LDADD for
	the use as LDADDs for targets it knows.

	* glib/giowin32.c: (struct _GIOWin32Watch): 'callback' wasn't used
	here, either.

2001-12-21  Tor Lillqvist  <tml@iki.fi>

	* gobject.def: Add g_signal_get_invocation_hint.
2001-12-22 08:29:06 +00:00