config.h.win32.in glib/galloca.h glib/gbacktrace.h glib/gwin32.c
authorTor Lillqvist <tml@novell.com>
Thu, 18 Jan 2007 19:05:21 +0000 (19:05 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 18 Jan 2007 19:05:21 +0000 (19:05 +0000)
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

ChangeLog
README.win32
config.h.win32.in
glib/galloca.h
glib/gbacktrace.h
glib/gwin32.c
glibconfig.h.win32.in

index 74a43331bc361eea265cbe8305d2e30f9797cb5c..9272efc97a03eb50c1495941fb14c44ef80e927f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+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)
+       
 2007-01-17  Tor Lillqvist  <tml@novell.com>
 
        * glib-zip.in: DLLs are always installed in "bin" with current
index d77c417c8795a42a2df25e5edb90de32639d90f7..8ad9a3f8dc3ff9bbf5100a7f399a471c305d69ca 100644 (file)
@@ -49,6 +49,7 @@ available in all source files that include <glib.h> or GTK+ headers.
 Additionally, there are the compiler-specific macros:
 - __GNUC__ is defined when using gcc
 - _MSC_VER is defined when using the Microsoft compiler
+- __DMC__ is defined when using the Digital Mars C/C++ compiler
 
 G_OS_WIN32 implies using the Microsoft C runtime MSVCRT.DLL. GLib is
 not known to work with the older CRTDLL.DLL runtime, or the static
index c6db93305a04a1e27339cc7e121aff3bbd4853bd..79dc2dcba20c50bbdd3efe9e58afa6c1cb6333f4 100644 (file)
 #define G_HAVE___INLINE 1
 
 /* Have __inline__ keyword */
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__DMC__)
 #define G_HAVE___INLINE__ 1
-#else /* _MSC_VER */
+#else /* _MSC_VER or __DMC__ */
 /* #undef G_HAVE___INLINE__ */
-#endif /* _MSC_VER */
+#endif /* _MSC_VER or __DMC__ */
 
 /* Source file containing theread implementation */
 #define G_THREAD_SOURCE "gthread-win32.c"
 /* Define to 1 if you have the `snprintf' function. */
 #ifndef _MSC_VER
 #define HAVE_SNPRINTF 1
+#ifdef __DMC__
+#define snprintf _snprintf
+#endif
 #else /* _MSC_VER */
 /* #undef HAVE_SNPRINTF */
 #endif /* _MSC_VER */
 /* #undef HAVE_STPCPY */
 
 /* Define to 1 if you have the `strcasecmp' function. */
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__DMC__)
 #define HAVE_STRCASECMP 1
-#else /* _MSC_VER */
+#else /* _MSC_VER or __DMC__ */
 /* #undef HAVE_STRCASECMP */
-#endif /* _MSC_VER */
+#endif /* _MSC_VER or __DMC__ */
 
 /* Define to 1 if you have the `strerror' function. */
 #define HAVE_STRERROR 1
 
 /* Define to 1 if you have the <strings.h> header file. */
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__DMC__)
 #define HAVE_STRINGS_H 1
-#else /* _MSC_VER */
+#else /* _MSC_VER or __DMC__ */
 /* #undef HAVE_STRINGS_H */
-#endif /* _MSC_VER */
+#endif /* _MSC_VER or __DMC__ */
 
 /* Define to 1 if you have the <string.h> header file. */
 #define HAVE_STRING_H 1
 /* #undef HAVE_STRLCPY */
 
 /* Define to 1 if you have the `strncasecmp' function. */
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__DMC__)
 #define HAVE_STRNCASECMP 1
-#else /* _MSC_VER */
+#else /* _MSC_VER or __DMC__ */
 /* #undef HAVE_STRNCASECMP */
-#endif /* _MSC_VER */
+#endif /* _MSC_VER or __DMC__ */
 
 /* Define to 1 if you have the `strsignal' function. */
 /* #undef HAVE_STRSIGNAL */
 /* #undef HAVE_SYMLINK */
 
 /* Define to 1 if you have the <sys/param.h> header file. */
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__DMC__)
 #define HAVE_SYS_PARAM_H 1
-#else /* _MSC_VER */
+#else /* _MSC_VER or __DMC__ */
 /* #undef HAVE_SYS_PARAM_H */
-#endif /* _MSC_VER */
+#endif /* _MSC_VER or __DMC__ */
 
 /* Define to 1 if you have the <sys/poll.h> header file. */
 /* #undef HAVE_SYS_POLL_H */
 /* #undef HAVE_UNSETENV */
 
 /* Define to 1 if you have the <values.h> header file. */
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__DMC__)
 #define HAVE_VALUES_H 1
-#else /* _MSC_VER */
+#else /* _MSC_VER or __DMC__ */
 /* #undef HAVE_VALUES_H */
-#endif /* _MSC_VER */
+#endif /* _MSC_VER or __DMC__ */
 
 /* Define to 1 if you have the `vasprintf' function. */
 #define HAVE_VASPRINTF 1
 /* Define to 1 if you have the `vsnprintf' function. */
 #ifndef _MSC_VER
 #define HAVE_VSNPRINTF 1
+#ifdef __DMC__
+#define vsnprintf _vsnprintf
+#endif
 #else /* _MSC_VER */
 /* #undef HAVE_VSNPRINTF */
 #endif /* _MSC_VER */
index 7c59ea45d7ade86fa150a8ff4a1a67481353ded8..baf80096a764946a717d4e3715597d5df365e78c 100644 (file)
@@ -40,7 +40,7 @@
 # if defined(_MSC_VER) || defined(__DMC__)
 #  include <malloc.h>
 #  define alloca _alloca
-# else /* !_MSC_VER */
+# else /* !_MSC_VER && !__DMC__ */
 #  ifdef _AIX
 #   pragma alloca
 #  else /* !_AIX */
@@ -50,7 +50,7 @@ char *alloca ();
 G_END_DECLS
 #   endif /* !alloca */
 #  endif /* !_AIX */
-# endif /* !_MSC_VER */
+# endif /* !_MSC_VER && !__DMC__ */
 #endif /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */
 
 #define g_alloca(size)          alloca (size)
index 0c9981a3fc098ac8f699c330b401c313b514b23e..836264ea5a95ee71281c920e842bdcc8cdf5467e 100644 (file)
@@ -48,7 +48,7 @@ void g_on_error_stack_trace (const gchar *prg_name);
  */
 #if (defined (__i386__) || defined (__x86_64__)) && defined (__GNUC__) && __GNUC__ >= 2
 #  define G_BREAKPOINT()       G_STMT_START{ __asm__ __volatile__ ("int $03"); }G_STMT_END
-#elif defined (_MSC_VER) && defined (_M_IX86)
+#elif (defined (_MSC_VER) || defined (__DMC__)) && defined (_M_IX86)
 #  define G_BREAKPOINT()       G_STMT_START{ __asm int 3h }G_STMT_END
 #elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2
 #  define G_BREAKPOINT()       G_STMT_START{ __asm__ __volatile__ ("bpt"); }G_STMT_END
index ba9d851df6ab659b5615c1dd13730e4a27f0df29..f7de19f98aa23c3b102030b048bfae20c3e869d0 100644 (file)
@@ -47,9 +47,9 @@
 #endif
 #include <errno.h>
 #include <ctype.h>
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__DMC__)
 #  include <io.h>
-#endif /* _MSC_VER */
+#endif /* _MSC_VER || __DMC__ */
 
 #include "glib.h"
 #include "galias.h"
index 315249ad8f7153af9805b08ee4efaeef3254e394..7aaf655173aa6afa113355ac983f6d2f1d9a22c1 100644 (file)
@@ -108,26 +108,17 @@ typedef unsigned int gsize;
 #define G_HAVE_INLINE 1
 #endif /* _MSC_VER */
 #define G_HAVE___INLINE 1
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__DMC__)
 #define G_HAVE___INLINE__ 1
-#endif /* not _MSC_VER */
+#endif /* !_MSC_VER and !__DMC__ */
 #endif /* !__cplusplus */
 
-#ifdef __cplusplus
+#if defined(__cplusplus) || !defined(_MSC_VER)
 #define G_CAN_INLINE   1
-#else  /* !__cplusplus */
-#ifndef _MSC_VER
-#define G_CAN_INLINE   1
-#endif
 #endif
 
 #ifndef _MSC_VER
-#ifndef __cplusplus
-# define G_HAVE_ISO_VARARGS 1
-#endif
-#ifdef __cplusplus
-# define G_HAVE_ISO_VARARGS 1
-#endif
+#define G_HAVE_ISO_VARARGS 1
 
 /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
  * is passed ISO vararg support is turned off, and there is no work