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...
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.
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.
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
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
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
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
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.
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.
-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.
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.
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.
-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)
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)
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-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
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
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-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.
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
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().
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.
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-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.
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.