Changeset: 04bf4834d4eb for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=04bf4834d4eb
Modified Files:
NT/monetdb_config.h.in
buildtools/Mx/Mx.h
clients/mapiclient/dump.c
clients/mapiclient/mclient.c
clients/mapiclient/msqldump.c
clients/mapilib/mapi.c
clients/odbc/driver/ODBCGlobal.h
clients/odbc/winsetup/setup.c
common/options/monet_options.mx
common/stream/stream.c
gdk/gdk.mx
monetdb5/misc/msabaoth.c
Branch: Apr2011
Log Message:
Define strdup as _strdup globally on Windows.
"The POSIX name for this item is deprecated. Instead, use the ISO C++
conformant name: _strdup. See online help for details."
diffs (161 lines):
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -454,6 +454,8 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
+#define strdup(s) _strdup(s)
+
#ifndef strcasecmp
#define strcasecmp(x,y) _stricmp(x,y)
#endif
diff --git a/buildtools/Mx/Mx.h b/buildtools/Mx/Mx.h
--- a/buildtools/Mx/Mx.h
+++ b/buildtools/Mx/Mx.h
@@ -38,12 +38,6 @@
#ifdef HAVE_STRING_H
#include <string.h>
-
-#ifdef NATIVE_WIN32
-/* The POSIX name for this item is deprecated. Instead, use the ISO
- C++ conformant name: _strdup. See online help for details. */
-#define strdup _strdup
-#endif
#endif
#define DB_DEF 0x10
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -27,12 +27,6 @@
#include <ctype.h>
#include "msqldump.h"
-#ifdef NATIVE_WIN32
-/* The POSIX name for this item is deprecated. Instead, use the ISO
- C++ conformant name: _strdup. See online help for details. */
-#define strdup _strdup
-#endif
-
static void
quoted_print(stream *f, const char *s, const char singleq)
{
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -81,10 +81,6 @@
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
-#ifdef NATIVE_WIN32
-#define strdup _strdup
-#endif
-
enum modes {
MAL,
SQL
diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c
--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -50,10 +50,6 @@
#include "msqldump.h"
#include "mprompt.h"
-#ifdef NATIVE_WIN32
-#define strdup _strdup
-#endif
-
static void
usage(const char *prog, int xit)
{
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -822,10 +822,6 @@
# endif
#endif
-#ifdef NATIVE_WIN32
-#define strdup _strdup
-#endif
-
#ifdef HAVE_CRYPT_H
# include <crypt.h>
#else
diff --git a/clients/odbc/driver/ODBCGlobal.h b/clients/odbc/driver/ODBCGlobal.h
--- a/clients/odbc/driver/ODBCGlobal.h
+++ b/clients/odbc/driver/ODBCGlobal.h
@@ -93,10 +93,6 @@
#include <stdio.h>
#include <ctype.h>
-#ifdef NATIVE_WIN32
-# define strdup _strdup
-#endif
-
#ifdef SQLLEN /* it's a define for 32, a typedef for 64 */
#define LENFMT "%d"
#define ULENFMT "%u"
diff --git a/clients/odbc/winsetup/setup.c b/clients/odbc/winsetup/setup.c
--- a/clients/odbc/winsetup/setup.c
+++ b/clients/odbc/winsetup/setup.c
@@ -38,10 +38,6 @@
#include <odbcinst.h>
#include "resource.h"
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-#define strdup _strdup
-#endif
-
static char *DriverName = "MonetDB ODBC Driver";
static HINSTANCE instance;
diff --git a/common/options/monet_options.mx b/common/options/monet_options.mx
--- a/common/options/monet_options.mx
+++ b/common/options/monet_options.mx
@@ -110,7 +110,6 @@
#endif
#ifdef NATIVE_WIN32
-#define strdup _strdup
#define getpid _getpid
#endif
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -148,10 +148,6 @@
int (*fsetpos) (stream *s, lng p);
};
-#ifdef NATIVE_WIN32
-#define strdup _strdup
-#endif
-
int
mnstr_init(void)
{
diff --git a/gdk/gdk.mx b/gdk/gdk.mx
--- a/gdk/gdk.mx
+++ b/gdk/gdk.mx
@@ -2534,7 +2534,6 @@
#endif
#define fdopen _fdopen
#define putenv _putenv
-#define strdup _strdup
#endif
#define BBP_BATMASK 511
diff --git a/monetdb5/misc/msabaoth.c b/monetdb5/misc/msabaoth.c
--- a/monetdb5/misc/msabaoth.c
+++ b/monetdb5/misc/msabaoth.c
@@ -47,7 +47,6 @@
#if defined(_MSC_VER) && _MSC_VER >= 1400
#define close _close
-#define strdup _strdup
#define unlink _unlink
#endif
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list