List:Commits« Previous MessageNext Message »
From:reggie Date:April 3 2008 3:40pm
Subject:bk commit into 6.0 tree (Reggie:1.2621)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of Reggie.  When Reggie does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-04-03 10:39:47-05:00, Reggie@core. +11 -0
  removed instances of __NT__ from code.  We now only build "NT" binaries

  CMakeLists.txt@stripped, 2008-04-03 10:39:16-05:00, Reggie@core. +0 -3
    removing __NT__ define

  include/config-win.h@stripped, 2008-04-03 10:39:17-05:00, Reggie@core. +3 -3
    changed some __NT__ defines to _WIN32 since they were basically just being used to indicate a Windows code block

  include/my_sys.h@stripped, 2008-04-03 10:39:17-05:00, Reggie@core. +1 -1
    changed some __NT__ defines to _WIN32 since they were basically just being used to indicate a Windows code block

  mysys/my_delete.c@stripped, 2008-04-03 10:39:17-05:00, Reggie@core. +1 -1
    removed __NT__

  sql/log.cc@stripped, 2008-04-03 10:39:18-05:00, Reggie@core. +7 -8
    changed some __NT__ defines to _WIN32 since they were basically just being used to indicate a Windows code block

  sql/mysqld.cc@stripped, 2008-04-03 10:39:18-05:00, Reggie@core. +14 -16
    changed some __NT__ defines to _WIN32 since they were basically just being used to indicate a Windows code block

  sql/set_var.cc@stripped, 2008-04-03 10:39:19-05:00, Reggie@core. +1 -1
    changed some __NT__ defines to _WIN32 since they were basically just being used to indicate a Windows code block

  sql/sql_connect.cc@stripped, 2008-04-03 10:39:19-05:00, Reggie@core. +1 -1
    changed some __NT__ defines to _WIN32 since they were basically just being used to indicate a Windows code block

  vio/viosocket.c@stripped, 2008-04-03 10:39:19-05:00, Reggie@core. +4 -4
    changed some __NT__ defines to _WIN32 since they were basically just being used to indicate a Windows code block

  win/README@stripped, 2008-04-03 10:39:20-05:00, Reggie@core. +0 -1
    removed __NT__ option

  zlib/zutil.h@stripped, 2008-04-03 10:39:20-05:00, Reggie@core. +1 -1
    changed some __NT__ defines to _WIN32 since they were basically just being used to indicate a Windows code block

diff -Nrup a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2008-04-02 12:50:03 -05:00
+++ b/CMakeLists.txt	2008-04-03 10:39:16 -05:00
@@ -95,9 +95,6 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/suppo
 CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-small.cnf.sh
                ${CMAKE_SOURCE_DIR}/support-files/my-small.ini @ONLY)
 
-IF(__NT__)
-  ADD_DEFINITIONS(-D__NT__)
-ENDIF(__NT__)
 IF(CYBOZU)
   ADD_DEFINITIONS(-DCYBOZU)
 ENDIF(CYBOZU)
diff -Nrup a/include/config-win.h b/include/config-win.h
--- a/include/config-win.h	2008-04-02 12:50:04 -05:00
+++ b/include/config-win.h	2008-04-03 10:39:17 -05:00
@@ -192,7 +192,7 @@ typedef uint rf_SetTimer;
 #define SIZEOF_CHARP		4
 #endif
 #define HAVE_BROKEN_NETINET_INCLUDES
-#ifdef __NT__
+#ifdef _WIN32
 #define HAVE_NAMED_PIPE			/* We can only create pipes on NT */
 #endif
 
@@ -307,7 +307,7 @@ inline double ulonglong2double(ulonglong
 #define strcasecmp stricmp
 #define strncasecmp strnicmp
 
-#ifndef __NT__
+#ifndef _WIN32
 #undef FILE_SHARE_DELETE
 #define FILE_SHARE_DELETE 0     /* Not implemented on Win 98/ME */
 #endif
@@ -359,7 +359,7 @@ inline double ulonglong2double(ulonglong
 #define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
 #define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
 /* The following is only used for statistics, so it should be good enough */
-#ifdef __NT__  /* This should also work on Win98 but .. */
+#ifdef _WIN32  /* This should also work on Win98 but .. */
 #define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
 #define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
 #endif
diff -Nrup a/include/my_sys.h b/include/my_sys.h
--- a/include/my_sys.h	2008-03-26 14:40:38 -05:00
+++ b/include/my_sys.h	2008-04-03 10:39:17 -05:00
@@ -616,7 +616,7 @@ extern File my_sopen(const char *path, i
 extern int check_if_legal_filename(const char *path);
 extern int check_if_legal_tablename(const char *path);
 
-#if defined(__WIN__) && defined(__NT__)
+#ifdef _WIN32
 extern int nt_share_delete(const char *name,myf MyFlags);
 #define my_delete_allow_opened(fname,flags)  nt_share_delete((fname),(flags))
 #else
diff -Nrup a/mysys/my_delete.c b/mysys/my_delete.c
--- a/mysys/my_delete.c	2007-11-22 14:39:27 -06:00
+++ b/mysys/my_delete.c	2008-04-03 10:39:17 -05:00
@@ -32,7 +32,7 @@ int my_delete(const char *name, myf MyFl
   DBUG_RETURN(err);
 } /* my_delete */
 
-#if defined(__WIN__) && defined(__NT__)
+#if defined(__WIN__)
 /*
   Delete file which is possibly not closed.
 
diff -Nrup a/sql/log.cc b/sql/log.cc
--- a/sql/log.cc	2008-03-31 12:12:14 -05:00
+++ b/sql/log.cc	2008-04-03 10:39:18 -05:00
@@ -34,7 +34,7 @@
 #include <stdarg.h>
 #include <m_ctype.h>				// For test_if_number
 
-#ifdef __NT__
+#ifdef _WIN32
 #include "message.h"
 #endif
 
@@ -1656,7 +1656,7 @@ err:
   DBUG_RETURN(-1);
 }
 
-#ifdef __NT__
+#ifdef _WIN32
 static int eventSource = 0;
 
 static void setup_windows_event_source()
@@ -1691,8 +1691,7 @@ static void setup_windows_event_source()
   RegCloseKey(hRegKey);
 }
 
-#endif /* __NT__ */
-
+#endif /* _WIN32 */
 
 /**
   Find a unique filename for 'filename.#'.
@@ -1822,7 +1821,7 @@ bool MYSQL_LOG::open(const char *log_nam
 #ifdef EMBEDDED_LIBRARY
                         "embedded library\n",
                         my_progname, server_version, MYSQL_COMPILATION_COMMENT
-#elif __NT__
+#elif _WIN32
 			"started with:\nTCP Port: %d, Named Pipe: %s\n",
                         my_progname, server_version, MYSQL_COMPILATION_COMMENT,
                         mysqld_port, mysqld_unix_port
@@ -4407,7 +4406,7 @@ void MYSQL_BIN_LOG::signal_update()
   DBUG_VOID_RETURN;
 }
 
-#ifdef __NT__
+#ifdef _WIN32
 static void print_buffer_to_nt_eventlog(enum loglevel level, char *buff,
                                         size_t length, size_t buffLen)
 {
@@ -4440,7 +4439,7 @@ static void print_buffer_to_nt_eventlog(
 
   DBUG_VOID_RETURN;
 }
-#endif /* __NT__ */
+#endif /* _WIN32 */
 
 
 /**
@@ -4505,7 +4504,7 @@ int vprint_msg_to_log(enum loglevel leve
 
   print_buffer_to_file(level, error_code, buff, length);
 
-#ifdef __NT__
+#ifdef _WIN32
   print_buffer_to_nt_eventlog(level, buff, length, sizeof(buff));
 #endif
 
diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc
--- a/sql/mysqld.cc	2008-03-31 12:12:14 -05:00
+++ b/sql/mysqld.cc	2008-04-03 10:39:18 -05:00
@@ -738,14 +738,12 @@ static char shutdown_event_name[40];
 #include "nt_servc.h"
 static	 NTService  Service;	      ///< Service object for WinNT
 #endif /* EMBEDDED_LIBRARY */
-#endif /* __WIN__ */
 
-#ifdef __NT__
 static char pipe_name[512];
 static SECURITY_ATTRIBUTES saPipeSecurity;
 static SECURITY_DESCRIPTOR sdPipeDescriptor;
 static HANDLE hPipe = INVALID_HANDLE_VALUE;
-#endif
+#endif /* __WIN__ */
 
 #ifndef EMBEDDED_LIBRARY
 bool mysqld_embedded=0;
@@ -817,7 +815,7 @@ pthread_handler_t handle_connections_soc
 pthread_handler_t kill_server_thread(void *arg);
 static void bootstrap(FILE *file);
 static bool read_init_file(char *file_name);
-#ifdef __NT__
+#ifdef _WIN32
 pthread_handler_t handle_connections_namedpipes(void *arg);
 #endif
 #ifdef HAVE_SMEM
@@ -914,7 +912,7 @@ static void close_connections(void)
       ip_sock= INVALID_SOCKET;
     }
   }
-#ifdef __NT__
+#ifdef _WIN32
   if (hPipe != INVALID_HANDLE_VALUE && opt_enable_named_pipe)
   {
     HANDLE temp;
@@ -1745,7 +1743,7 @@ static void network_init(void)
     }
   }
 
-#ifdef __NT__
+#ifdef _WIN32
   /* create named pipe */
   if (Service.IsNT() && mysqld_unix_port[0] && !opt_bootstrap &&
       opt_enable_named_pipe)
@@ -4176,12 +4174,12 @@ static void create_shutdown_thread()
 #endif /* EMBEDDED_LIBRARY */
 
 
-#if (defined(__NT__) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY)
+#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY)
 static void handle_connections_methods()
 {
   pthread_t hThread;
   DBUG_ENTER("handle_connections_methods");
-#ifdef __NT__
+#ifdef _WIN32
   if (hPipe == INVALID_HANDLE_VALUE &&
       (!have_tcpip || opt_disable_networking) &&
       !opt_enable_shared_memory)
@@ -4194,7 +4192,7 @@ static void handle_connections_methods()
   pthread_mutex_lock(&LOCK_thread_count);
   (void) pthread_cond_init(&COND_handler_count,NULL);
   handler_count=0;
-#ifdef __NT__
+#ifdef _WIN32
   if (hPipe != INVALID_HANDLE_VALUE)
   {
     handler_count++;
@@ -4205,7 +4203,7 @@ static void handle_connections_methods()
       handler_count--;
     }
   }
-#endif /* __NT__ */
+#endif /* _WIN32 */
   if (have_tcpip && !opt_disable_networking)
   {
     handler_count++;
@@ -4245,7 +4243,7 @@ void decrement_handler_count()
 }
 #else
 #define decrement_handler_count()
-#endif /* defined(__NT__) || defined(HAVE_SMEM) */
+#endif /* defined(_WIN32) || defined(HAVE_SMEM) */
 
 
 #ifndef EMBEDDED_LIBRARY
@@ -4486,7 +4484,7 @@ int main(int argc, char **argv)
   pthread_cond_signal(&COND_server_started);
   pthread_mutex_unlock(&LOCK_server_started);
 
-#if defined(__NT__) || defined(HAVE_SMEM)
+#if defined(_WIN32) || defined(HAVE_SMEM)
   handle_connections_methods();
 #else
 #ifdef __WIN__
@@ -4497,7 +4495,7 @@ int main(int argc, char **argv)
   }
 #endif
   handle_connections_sockets(0);
-#endif /* __NT__ */
+#endif /* _WIN32 || HAVE_SMEM */
 
   /* (void) pthread_attr_destroy(&connection_attrib); */
   
@@ -5158,7 +5156,7 @@ pthread_handler_t handle_connections_soc
 }
 
 
-#ifdef __NT__
+#ifdef _WIN32
 pthread_handler_t handle_connections_namedpipes(void *arg)
 {
   HANDLE hConnectedPipe;
@@ -5238,7 +5236,7 @@ pthread_handler_t handle_connections_nam
   decrement_handler_count();
   DBUG_RETURN(0);
 }
-#endif /* __NT__ */
+#endif /* _WIN32 */
 
 
 #ifdef HAVE_SMEM
@@ -5811,7 +5809,7 @@ struct my_option my_long_options[] =
    "Deprecated option, use --external-locking instead.",
    (uchar**) &opt_external_locking, (uchar**) &opt_external_locking,
    0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef __NT__
+#ifdef _WIN32
   {"enable-named-pipe", OPT_HAVE_NAMED_PIPE, "Enable the named pipe (NT).",
    (uchar**) &opt_enable_named_pipe, (uchar**) &opt_enable_named_pipe, 0, GET_BOOL,
    NO_ARG, 0, 0, 0, 0, 0, 0},
diff -Nrup a/sql/set_var.cc b/sql/set_var.cc
--- a/sql/set_var.cc	2008-03-27 04:56:03 -05:00
+++ b/sql/set_var.cc	2008-04-03 10:39:19 -05:00
@@ -799,7 +799,7 @@ static SHOW_VAR fixed_vars[]= {
   {"lower_case_file_system",  (char*) &lower_case_file_system,      SHOW_MY_BOOL},
   {"lower_case_table_names",  (char*) &lower_case_table_names,      SHOW_INT},
   {"myisam_recover_options",  (char*) &myisam_recover_options_str,  SHOW_CHAR_PTR},
-#ifdef __NT__
+#ifdef _WIN32  
   {"named_pipe",	      (char*) &opt_enable_named_pipe,       SHOW_MY_BOOL},
 #endif
   {"open_files_limit",	      (char*) &open_files_limit,	    SHOW_LONG},
diff -Nrup a/sql/sql_connect.cc b/sql/sql_connect.cc
--- a/sql/sql_connect.cc	2008-03-27 12:44:47 -05:00
+++ b/sql/sql_connect.cc	2008-04-03 10:39:19 -05:00
@@ -967,7 +967,7 @@ bool login_connection(THD *thd)
 
   if (error)
   {						// Wrong permissions
-#ifdef __NT__
+#ifdef _WIN32
     if (vio_type(net->vio) == VIO_TYPE_NAMEDPIPE)
       my_sleep(1000);				/* must wait after eof() */
 #endif
diff -Nrup a/vio/viosocket.c b/vio/viosocket.c
--- a/vio/viosocket.c	2008-03-27 13:39:48 -05:00
+++ b/vio/viosocket.c	2008-04-03 10:39:19 -05:00
@@ -261,17 +261,17 @@ int vio_close(Vio * vio)
 {
   int r=0;
   DBUG_ENTER("vio_close");
-#ifdef __WIN__
+#ifdef _WIN32
   if (vio->type == VIO_TYPE_NAMEDPIPE)
   {
-#if defined(__NT__) && defined(MYSQL_SERVER)
+#ifdef MYSQL_SERVER
     CancelIo(vio->hPipe);
     DisconnectNamedPipe(vio->hPipe);
 #endif
     r=CloseHandle(vio->hPipe);
   }
   else
-#endif /* __WIN__ */
+#endif /* _WIN32 */
  if (vio->type != VIO_CLOSED)
   {
     DBUG_ASSERT(vio->sd >= 0);
@@ -450,7 +450,7 @@ int vio_close_pipe(Vio * vio)
 {
   int r;
   DBUG_ENTER("vio_close_pipe");
-#if defined(__NT__) && defined(MYSQL_SERVER)
+#ifdef MYSQL_SERVER
   CancelIo(vio->hPipe);
   DisconnectNamedPipe(vio->hPipe);
 #endif
diff -Nrup a/win/README b/win/README
--- a/win/README	2007-09-20 10:41:28 -05:00
+++ b/win/README	2008-04-03 10:39:20 -05:00
@@ -60,7 +60,6 @@ The options right now are:
     WITH_EXAMPLE_STORAGE_ENGINE
     WITH_FALCON_STORAGE_ENGINE
     WITH_FEDERATED_STORAGE_ENGINE
-    __NT__                               Enable named pipe support
     MYSQL_SERVER_SUFFIX=<suffix>         Server suffix, default none
     COMPILATION_COMMENT=<comment>        Server comment, default "Source distribution"
     MYSQL_TCP_PORT=<port>                Server port, default 3306
diff -Nrup a/zlib/zutil.h b/zlib/zutil.h
--- a/zlib/zutil.h	2005-09-21 17:17:45 -05:00
+++ b/zlib/zutil.h	2008-04-03 10:39:20 -05:00
@@ -194,7 +194,7 @@ extern const char * const z_errmsg[10]; 
 #  ifdef __TURBOC__
 #    define NO_vsnprintf
 #  endif
-#  ifdef WIN32
+#  if defined(WIN32) && (!defined(_MSC_VER) || _MSC_VER < 1500)
      /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
 #    if !defined(vsnprintf) && !defined(NO_vsnprintf)
 #      define vsnprintf _vsnprintf


Thread
bk commit into 6.0 tree (Reggie:1.2621)reggie3 Apr