List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:July 14 2010 10:43am
Subject:bzr commit into mysql-trunk-bugfixing branch (davi:3112) WL#5486
View as plain text  
# At a local mysql-trunk-bugfixing repository of davi

 3112 Davi Arnaut	2010-07-14
      WL#5486: Remove code for unsupported platforms
      
      Remove MS-DOS specific code.

    modified:
      client/mysqldump.c
      dbug/dbug.c
      dbug/dbug_analyze.c
      include/config-win.h
      include/m_string.h
      include/my_dbug.h
      include/my_global.h
      include/my_sys.h
      include/mysys_err.h
      libmysql/dll.c
      libmysql/libmysql.c
      libmysqld/libmysqld.c
      mysys/errors.c
      mysys/mf_keycache.c
      mysys/mf_pack.c
      mysys/mf_unixpath.c
      mysys/my_lib.c
      mysys/my_static.c
      mysys/my_static.h
      sql-common/client.c
      storage/myisam/mi_create.c
      storage/myisam/mi_log.c
      storage/myisam/mi_open.c
      storage/myisam/mi_static.c
      storage/myisam/mi_test2.c
      storage/myisam/myisamdef.h
      storage/myisam/myisampack.c
      storage/myisam/sort.c
      strings/ctype-big5.c
      strings/ctype-cp932.c
      strings/ctype-czech.c
      strings/ctype-euc_kr.c
      strings/ctype-eucjpms.c
      strings/ctype-gb2312.c
      strings/ctype-gbk.c
      strings/ctype-sjis.c
      strings/ctype-tis620.c
      strings/ctype-ujis.c
      strings/ctype-win1250ch.c
      strings/do_ctype.c
      strings/int2str.c
      strings/strtol.c
      strings/strtoul.c
=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c	2010-07-14 10:36:24 +0000
+++ b/client/mysqldump.c	2010-07-14 10:43:04 +0000
@@ -429,10 +429,10 @@ static struct my_option my_long_options[
    &opt_replace_into, &opt_replace_into, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
    0, 0},
   {"result-file", 'r',
-   "Direct output to a given file. This option should be used in MSDOS, "
-   "because it prevents new line '\\n' from being converted to '\\r\\n' "
-   "(carriage return + line feed).",
-   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+   "Direct output to a given file. This option should be used in systems "
+   "(e.g., DOS, Windows) that use carriage-return linefeed pairs (\\r\\n) "
+   "to separate text lines. This option ensures that only a single newline "
+   "is used.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   {"routines", 'R', "Dump stored routines (functions and procedures).",
    &opt_routines, &opt_routines, 0, GET_BOOL,
    NO_ARG, 0, 0, 0, 0, 0, 0},

=== modified file 'dbug/dbug.c'
--- a/dbug/dbug.c	2010-07-08 21:20:08 +0000
+++ b/dbug/dbug.c	2010-07-14 10:43:04 +0000
@@ -95,7 +95,7 @@
 #define fnmatch(A,B,C) strcmp(A,B)
 #endif
 
-#if defined(MSDOS) || defined(__WIN__)
+#if defined(__WIN__)
 #include <process.h>
 #endif
 
@@ -302,7 +302,7 @@ static int DoTrace(CODE_STATE *cs);
 #define DISABLE_TRACE   4
 
         /* Test to see if file is writable */
-#if defined(HAVE_ACCESS) && !defined(MSDOS)
+#if defined(HAVE_ACCESS)
 static BOOLEAN Writable(const char *pathname);
         /* Change file owner and group */
 static void ChangeOwner(CODE_STATE *cs, char *pathname);
@@ -336,23 +336,19 @@ static unsigned long Clock(void);
 #define ERR_OPEN "%s: can't open debug output stream \"%s\": "
 #define ERR_CLOSE "%s: can't close debug file: "
 #define ERR_ABORT "%s: debugger aborting because %s\n"
-#define ERR_CHOWN "%s: can't change owner/group of \"%s\": "
 
 /*
  *      Macros and defines for testing file accessibility under UNIX and MSDOS.
  */
 
 #undef EXISTS
-#if !defined(HAVE_ACCESS) || defined(MSDOS)
+#if !defined(HAVE_ACCESS)
 #define EXISTS(pathname) (FALSE)        /* Assume no existance */
 #define Writable(name) (TRUE)
 #else
 #define EXISTS(pathname)         (access(pathname, F_OK) == 0)
 #define WRITABLE(pathname)       (access(pathname, W_OK) == 0)
 #endif
-#ifndef MSDOS
-#define ChangeOwner(cs,name)
-#endif
 
 
 /*
@@ -2008,10 +2004,6 @@ static void DBUGOpenFile(CODE_STATE *cs,
         else
         {
           cs->stack->out_file= fp;
-          if (newfile)
-          {
-            ChangeOwner(cs, name);
-          }
         }
       }
     }
@@ -2069,10 +2061,6 @@ static FILE *OpenProfile(CODE_STATE *cs,
     else
     {
       cs->stack->prof_file= fp;
-      if (newfile)
-      {
-        ChangeOwner(cs, name);
-      }
     }
   }
   return fp;
@@ -2266,42 +2254,6 @@ static BOOLEAN Writable(const char *path
 /*
  *  FUNCTION
  *
- *      ChangeOwner    change owner to real user for suid programs
- *
- *  SYNOPSIS
- *
- *      static VOID ChangeOwner(pathname)
- *
- *  DESCRIPTION
- *
- *      For unix systems, change the owner of the newly created debug
- *      file to the real owner.  This is strictly for the benefit of
- *      programs that are running with the set-user-id bit set.
- *
- *      Note that at this point, the fact that pathname represents
- *      a newly created file has already been established.  If the
- *      program that the debugger is linked to is not running with
- *      the suid bit set, then this operation is redundant (but
- *      harmless).
- *
- */
-
-#ifndef ChangeOwner
-static void ChangeOwner(CODE_STATE *cs, char *pathname)
-{
-  if (chown(pathname, getuid(), getgid()) == -1)
-  {
-    (void) fprintf(stderr, ERR_CHOWN, cs->process, pathname);
-    perror("");
-    (void) fflush(stderr);
-  }
-}
-#endif
-
-
-/*
- *  FUNCTION
- *
  *      _db_setjmp_    save debugger environment
  *
  *  SYNOPSIS
@@ -2470,7 +2422,7 @@ static unsigned long Clock()
     return ru.ru_utime.tv_sec*1000 + ru.ru_utime.tv_usec/1000;
 }
 
-#elif defined(MSDOS) || defined(__WIN__)
+#elif defined(__WIN__)
 
 static ulong Clock()
 {
@@ -2519,37 +2471,6 @@ static unsigned long Clock()
 #endif /* RUSAGE */
 #endif /* THREADS */
 
-#ifdef NO_VARARGS
-
-/*
- *      Fake vfprintf for systems that don't support it.  If this
- *      doesn't work, you are probably SOL...
- */
-
-static int vfprintf(stream, format, ap)
-FILE *stream;
-char *format;
-va_list ap;
-{
-    int rtnval;
-    ARGS_DCL;
-
-    ARG0=  va_arg(ap, ARGS_TYPE);
-    ARG1=  va_arg(ap, ARGS_TYPE);
-    ARG2=  va_arg(ap, ARGS_TYPE);
-    ARG3=  va_arg(ap, ARGS_TYPE);
-    ARG4=  va_arg(ap, ARGS_TYPE);
-    ARG5=  va_arg(ap, ARGS_TYPE);
-    ARG6=  va_arg(ap, ARGS_TYPE);
-    ARG7=  va_arg(ap, ARGS_TYPE);
-    ARG8=  va_arg(ap, ARGS_TYPE);
-    ARG9=  va_arg(ap, ARGS_TYPE);
-    rtnval= fprintf(stream, format, ARGS_LIST);
-    return rtnval;
-}
-
-#endif  /* NO_VARARGS */
-
 #else
 
 /*

=== modified file 'dbug/dbug_analyze.c'
--- a/dbug/dbug_analyze.c	2007-04-23 11:36:18 +0000
+++ b/dbug/dbug_analyze.c	2010-07-14 10:43:04 +0000
@@ -561,9 +561,6 @@ FILE *outf;
 
 #define usage() fprintf (DBUG_FILE,"Usage: %s [-v] [prof-file]\n",my_name)
 
-#ifdef MSDOS
-extern int getopt(int argc, char **argv, char *opts);
-#endif
 extern int optind;
 extern char *optarg;
 
@@ -609,118 +606,5 @@ int main (int argc, char **argv)
     process (infile);
     output (outfile);
     DBUG_RETURN (EX_OK);
+  }
 }
-}
-
-#ifdef MSDOS
-
-/*
- * From std-unix@stripped (Moderator, John Quarterman) Sun Nov  3 14:34:15 1985
- * Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site gatech.CSNET
- * Posting-Version: version B 2.10.2 9/18/84; site ut-sally.UUCP
- * Path: gatech!akgua!mhuxv!mhuxt!mhuxr!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!ut-sally!std-unix
- * From: std-unix@stripped (Moderator, John Quarterman)
- * Newsgroups: mod.std.unix
- * Subject: public domain AT&T getopt source
- * Message-ID: <3352@stripped>
- * Date: 3 Nov 85 19:34:15 GMT
- * Date-Received: 4 Nov 85 12:25:09 GMT
- * Organization: IEEE/P1003 Portable Operating System Environment Committee
- * Lines: 91
- * Approved: jsq@stripped
- *
- * Here's something you've all been waiting for:  the AT&T public domain
- * source for getopt(3).  It is the code which was given out at the 1985
- * UNIFORUM conference in Dallas.  I obtained it by electronic mail
- * directly from AT&T.	The people there assure me that it is indeed
- * in the public domain.
- *
- * There is no manual page.  That is because the one they gave out at
- * UNIFORUM was slightly different from the current System V Release 2
- * manual page.  The difference apparently involved a note about the
- * famous rules 5 and 6, recommending using white space between an option
- * and its first argument, and not grouping options that have arguments.
- * Getopt itself is currently lenient about both of these things White
- * space is allowed, but not mandatory, and the last option in a group can
- * have an argument.  That particular version of the man page evidently
- * has no official existence, and my source at AT&T did not send a copy.
- * The current SVR2 man page reflects the actual behavor of this getopt.
- * However, I am not about to post a copy of anything licensed by AT&T.
- *
- * I will submit this source to Berkeley as a bug fix.
- *
- * I, personally, make no claims or guarantees of any kind about the
- * following source.  I did compile it to get some confidence that
- * it arrived whole, but beyond that you're on your own.
- *
- */
-
-/*LINTLIBRARY*/
-
-int	opterr = 1;
-int	optind = 1;
-int	optopt;
-char	*optarg;
-
-static void _ERR(s,c,argv)
-char *s;
-int c;
-char *argv[];
-{
-	char errbuf[3];
-
-	if (opterr) {
-		errbuf[0] = c;
-		errbuf[1] = '\n';
-		(void) fprintf(stderr, "%s", argv[0]);
-		(void) fprintf(stderr, "%s", s);
-		(void) fprintf(stderr, "%s", errbuf);
-	}
-}
-
-int getopt(argc, argv, opts)
-int	argc;
-char	**argv, *opts;
-{
-	static int sp = 1;
-	register int c;
-	register char *cp;
-
-	if(sp == 1)
-		if(optind >= argc ||
-		   argv[optind][0] != '-' || argv[optind][1] == '\0')
-			return(EOF);
-		else if(strcmp(argv[optind], "--") == 0) {
-			optind++;
-			return(EOF);
-		}
-	optopt = c = argv[optind][sp];
-	if(c == ':' || (cp=strchr(opts, c)) == NULL) {
-		_ERR(": illegal option -- ", c, argv);
-		if(argv[optind][++sp] == '\0') {
-			optind++;
-			sp = 1;
-		}
-		return('?');
-	}
-	if(*++cp == ':') {
-		if(argv[optind][sp+1] != '\0')
-			optarg = &argv[optind++][sp+1];
-		else if(++optind >= argc) {
-			_ERR(": option requires an argument -- ", c, argv);
-			sp = 1;
-			return('?');
-		} else
-			optarg = argv[optind++];
-		sp = 1;
-	} else {
-		if(argv[optind][++sp] == '\0') {
-			sp = 1;
-			optind++;
-		}
-		optarg = NULL;
-	}
-	return(c);
-}
-
-#endif	/* !unix && !xenix */

=== modified file 'include/config-win.h'
--- a/include/config-win.h	2010-02-24 09:15:34 +0000
+++ b/include/config-win.h	2010-07-14 10:43:04 +0000
@@ -185,7 +185,6 @@ typedef SSIZE_T ssize_t;
 #define SOCKET_SIZE_TYPE int
 #define my_socket_defined
 #define byte_defined
-#define HUGE_PTR
 #define STDCALL __stdcall	    /* Used by libmysql.dll */
 #define isnan(X) _isnan(X)
 #define finite(X) _finite(X)

=== modified file 'include/m_string.h'
--- a/include/m_string.h	2010-06-07 08:47:04 +0000
+++ b/include/m_string.h	2010-07-14 10:43:04 +0000
@@ -92,8 +92,8 @@ extern char *stpcpy(char *, const char *
 #endif
 
 /* Declared in int2str() */
-extern char NEAR _dig_vec_upper[];
-extern char NEAR _dig_vec_lower[];
+extern char _dig_vec_upper[];
+extern char _dig_vec_lower[];
 
 #ifndef strmov
 #define strmov_overlapp(A,B) strmov(A,B)
@@ -156,15 +156,15 @@ extern	char *strmov(char *dst,const char
 #else
 extern	char *strmov_overlapp(char *dst,const char *src);
 #endif
-extern	char *strnmov(char *dst,const char *src,size_t n);
-extern	char *strsuff(const char *src,const char *suffix);
-extern	char *strcont(const char *src,const char *set);
-extern	char *strxcat _VARARGS((char *dst,const char *src, ...));
-extern	char *strxmov _VARARGS((char *dst,const char *src, ...));
-extern	char *strxcpy _VARARGS((char *dst,const char *src, ...));
-extern	char *strxncat _VARARGS((char *dst,size_t len, const char *src, ...));
-extern	char *strxnmov _VARARGS((char *dst,size_t len, const char *src, ...));
-extern	char *strxncpy _VARARGS((char *dst,size_t len, const char *src, ...));
+extern	char *strnmov(char *dst, const char *src, size_t n);
+extern	char *strsuff(const char *src, const char *suffix);
+extern	char *strcont(const char *src, const char *set);
+extern	char *strxcat(char *dst, const char *src, ...);
+extern	char *strxmov(char *dst, const char *src, ...);
+extern	char *strxcpy(char *dst, const char *src, ...);
+extern	char *strxncat(char *dst, size_t len, const char *src, ...);
+extern	char *strxnmov(char *dst, size_t len, const char *src, ...);
+extern	char *strxncpy(char *dst, size_t len, const char *src, ...);
 
 /* Prototypes of normal stringfunctions (with may ours) */
 

=== modified file 'include/my_dbug.h'
--- a/include/my_dbug.h	2010-03-31 14:05:33 +0000
+++ b/include/my_dbug.h	2010-07-14 10:43:04 +0000
@@ -45,7 +45,7 @@ extern void _db_enter_(const char *_func
                        struct _db_stack_frame_ *_stack_frame_);
 extern  void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame_);
 extern  void _db_pargs_(uint _line_,const char *keyword);
-extern  void _db_doprnt_ _VARARGS((const char *format,...))
+extern  void _db_doprnt_(const char *format,...)
   ATTRIBUTE_FORMAT(printf, 1, 2);
 extern  void _db_dump_(uint _line_,const char *keyword,
                        const unsigned char *memory, size_t length);

=== modified file 'include/my_global.h'
--- a/include/my_global.h	2010-07-14 10:36:24 +0000
+++ b/include/my_global.h	2010-07-14 10:43:04 +0000
@@ -679,16 +679,6 @@ int __cxa_pure_virtual () __attribute__
 C_MODE_END
 #endif
 
-/* From old s-system.h */
-
-/*
-  Support macros for non ansi & other old compilers. Since such
-  things are no longer supported we do nothing. We keep then since
-  some of our code may still be needed to upgrade old customers.
-*/
-#define _VARARGS(X) X
-#define _STATIC_VARARGS(X) X
-
 /* The DBUG_ON flag always takes precedence over default DBUG_OFF */
 #if defined(DBUG_ON) && defined(DBUG_OFF)
 #undef DBUG_OFF
@@ -704,7 +694,6 @@ C_MODE_END
 
 #define MIN_ARRAY_SIZE	0	/* Zero or One. Gcc allows zero*/
 #define ASCII_BITS_USED 8	/* Bit char used */
-#define NEAR_F			/* No near function handling */
 
 /* Some types that is different between systems */
 
@@ -1078,14 +1067,6 @@ template <size_t sz> struct Aligned_char
         ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
 
 #define NullS		(char *) 0
-/* Nowdays we do not support MessyDos */
-#ifndef NEAR
-#define NEAR				/* Who needs segments ? */
-#define FAR				/* On a good machine */
-#ifndef HUGE_PTR
-#define HUGE_PTR
-#endif
-#endif
 
 #ifdef STDCALL
 #undef STDCALL

=== modified file 'include/my_sys.h'
--- a/include/my_sys.h	2010-07-14 10:36:24 +0000
+++ b/include/my_sys.h	2010-07-14 10:43:04 +0000
@@ -42,7 +42,7 @@ typedef struct my_aio_result {
 #endif /* HAVE_VALGRIND */
 
 #ifndef THREAD
-extern int NEAR my_errno;		/* Last error in mysys */
+extern int my_errno;  /* Last error in mysys */
 #else
 #include <my_pthread.h>
 #endif
@@ -214,7 +214,7 @@ extern int errno;			/* declare errno */
 #endif					/* #ifndef errno */
 extern char *home_dir;			/* Home directory for user */
 extern const char *my_progname;		/* program-name (printed in errors) */
-extern char NEAR curr_dir[];		/* Current directory for user */
+extern char curr_dir[];		/* Current directory for user */
 extern void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
 extern void (*fatal_error_handler_hook)(uint my_err, const char *str,
 				       myf MyFlags);
@@ -247,17 +247,17 @@ extern void (*my_sigtstp_cleanup)(void),
 	    (*my_sigtstp_restart)(void),
 	    (*my_abort_hook)(int);
 					/* Executed when comming from shell */
-extern MYSQL_PLUGIN_IMPORT int NEAR my_umask;		/* Default creation mask  */
-extern int NEAR my_umask_dir,
-	   NEAR my_recived_signals,	/* Signals we have got */
-	   NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
-	   NEAR my_dont_interrupt;	/* call remember_intr when set */
-extern my_bool NEAR my_use_symdir;
+extern MYSQL_PLUGIN_IMPORT int my_umask;		/* Default creation mask  */
+extern int my_umask_dir,
+	   my_recived_signals,	/* Signals we have got */
+	   my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
+	   my_dont_interrupt;	/* call remember_intr when set */
+extern my_bool my_use_symdir;
 extern size_t sf_malloc_cur_memory, sf_malloc_max_memory;
 
 extern ulong	my_default_record_cache_size;
-extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
-               NEAR my_disable_flush_key_blocks, NEAR my_disable_symlinks;
+extern my_bool  my_disable_locking, my_disable_async_io,
+                my_disable_flush_key_blocks, my_disable_symlinks;
 extern char	wild_many,wild_one,wild_prefix;
 extern const char *charsets_dir;
 /* from default.c */
@@ -650,10 +650,10 @@ extern int my_chsize(File fd,my_off_t ne
 extern int my_sync(File fd, myf my_flags);
 extern int my_sync_dir(const char *dir_name, myf my_flags);
 extern int my_sync_dir_by_file(const char *file_name, myf my_flags);
-extern void my_error _VARARGS((int nr,myf MyFlags, ...));
-extern void my_printf_error _VARARGS((uint my_err, const char *format,
-                                     myf MyFlags, ...))
-                                     ATTRIBUTE_FORMAT(printf, 2, 4);
+extern void my_error(int nr,myf MyFlags, ...);
+extern void my_printf_error(uint my_err, const char *format,
+                            myf MyFlags, ...)
+                            ATTRIBUTE_FORMAT(printf, 2, 4);
 extern void my_printv_error(uint error, const char *format, myf MyFlags,
                             va_list ap);
 extern int my_error_register(const char** (*get_errmsgs) (),

=== modified file 'include/mysys_err.h'
--- a/include/mysys_err.h	2010-03-31 14:05:33 +0000
+++ b/include/mysys_err.h	2010-07-14 10:43:04 +0000
@@ -15,17 +15,15 @@
 
 #ifndef _mysys_err_h
 #define _mysys_err_h
-#ifdef	__cplusplus
-
-#include "my_global.h"                          /* NEAR */
 
+#ifdef	__cplusplus
 extern "C" {
 #endif
 
 #define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */
 #define EE(X)    (globerrs[(X) - EE_ERROR_FIRST])
 
-extern const char * NEAR globerrs[];	/* my_error_messages is here */
+extern const char *globerrs[];  /* my_error_messages is here */
 
 /* Error message numbers in global map */
 /*

=== modified file 'libmysql/dll.c'
--- a/libmysql/dll.c	2008-09-01 21:51:54 +0000
+++ b/libmysql/dll.c	2010-07-14 10:43:04 +0000
@@ -48,7 +48,7 @@ void libmysql_init(void)
 #ifdef __WIN__
 
 static int inited=0,threads=0;
-HINSTANCE NEAR s_hModule;	/* Saved module handle */
+HINSTANCE s_hModule; /* Saved module handle */
 DWORD main_thread;
 
 BOOL APIENTRY LibMain(HANDLE hInst,DWORD ul_reason_being_called,
@@ -105,21 +105,3 @@ int __stdcall DllMain(HANDLE hInst,DWORD
   return TRUE;
 }
 
-#elif defined(WINDOWS)
-
-/****************************************************************************
-**	This routine is called by LIBSTART.ASM at module load time.  All it
-**	does in this sample is remember the DLL module handle.	The module
-**	handle is needed if you want to do things like load stuff from the
-**	resource file (for instance string resources).
-****************************************************************************/
-
-int _export FAR PASCAL libmain(HANDLE hModule,short cbHeapSize,
-			       UCHAR FAR *lszCmdLine)
-{
-  s_hModule = hModule;
-  libmysql_init();
-  return TRUE;
-}
-
-#endif

=== modified file 'libmysql/libmysql.c'
--- a/libmysql/libmysql.c	2010-07-14 10:36:24 +0000
+++ b/libmysql/libmysql.c	2010-07-14 10:43:04 +0000
@@ -34,7 +34,7 @@
 #ifdef	 HAVE_PWD_H
 #include <pwd.h>
 #endif
-#if !defined(MSDOS) && !defined(__WIN__)
+#if !defined(__WIN__)
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -45,7 +45,7 @@
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
-#endif /* !defined(MSDOS) && !defined(__WIN__) */
+#endif /* !defined(__WIN__) */
 #ifdef HAVE_POLL
 #include <sys/poll.h>
 #endif
@@ -74,7 +74,7 @@ ulong		max_allowed_packet= 1024L*1024L*1
 my_bool	net_flush(NET *net);
 #endif
 
-#if defined(MSDOS) || defined(__WIN__)
+#if defined(__WIN__)
 /* socket_errno is defined in my_global.h for all platforms */
 #define perror(A)
 #else
@@ -129,30 +129,27 @@ int STDCALL mysql_server_init(int argc _
     if (!mysql_port)
     {
       mysql_port = MYSQL_PORT;
-#ifndef MSDOS
-      {
-	struct servent *serv_ptr __attribute__((unused));
-	char	*env;
-
-        /*
-          if builder specifically requested a default port, use that
-          (even if it coincides with our factory default).
-          only if they didn't do we check /etc/services (and, failing
-          on that, fall back to the factory default of 3306).
-          either default can be overridden by the environment variable
-          MYSQL_TCP_PORT, which in turn can be overridden with command
-          line options.
-        */
+      struct servent *serv_ptr __attribute__((unused));
+      char *env;
+
+      /*
+        if builder specifically requested a default port, use that
+        (even if it coincides with our factory default).
+        only if they didn't do we check /etc/services (and, failing
+        on that, fall back to the factory default of 3306).
+        either default can be overridden by the environment variable
+        MYSQL_TCP_PORT, which in turn can be overridden with command
+        line options.
+      */
 
 #if MYSQL_PORT_DEFAULT == 0
-        if ((serv_ptr = getservbyname("mysql", "tcp")))
-          mysql_port = (uint) ntohs((ushort) serv_ptr->s_port);
-#endif
-        if ((env = getenv("MYSQL_TCP_PORT")))
-          mysql_port =(uint) atoi(env);
-      }
+      if ((serv_ptr= getservbyname("mysql", "tcp")))
+        mysql_port= (uint) ntohs((ushort) serv_ptr->s_port);
 #endif
+      if ((env= getenv("MYSQL_TCP_PORT")))
+        mysql_port=(uint) atoi(env);
     }
+
     if (!mysql_unix_port)
     {
       char *env;
@@ -479,7 +476,7 @@ struct passwd *getpwuid(uid_t);
 char* getlogin(void);
 #endif
 
-#if !defined(MSDOS) && ! defined(VMS) && !defined(__WIN__)
+#if !defined(VMS) && !defined(__WIN__)
 
 void read_user_name(char *name)
 {
@@ -509,7 +506,7 @@ void read_user_name(char *name)
   DBUG_VOID_RETURN;
 }
 
-#else /* If MSDOS || VMS */
+#else /* If Windows || VMS */
 
 void read_user_name(char *name)
 {

=== modified file 'libmysqld/libmysqld.c'
--- a/libmysqld/libmysqld.c	2010-07-08 21:20:08 +0000
+++ b/libmysqld/libmysqld.c	2010-07-14 10:43:04 +0000
@@ -32,7 +32,7 @@
 #ifdef	 HAVE_PWD_H
 #include <pwd.h>
 #endif
-#if !defined(MSDOS) && !defined(__WIN__)
+#if !defined(__WIN__)
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -54,7 +54,7 @@
 extern ulong net_buffer_length;
 extern ulong max_allowed_packet;
 
-#if defined(MSDOS) || defined(__WIN__)
+#if defined(__WIN__)
 #define ERRNO WSAGetLastError()
 #define perror(A)
 #else

=== modified file 'mysys/errors.c'
--- a/mysys/errors.c	2009-11-24 13:54:59 +0000
+++ b/mysys/errors.c	2010-07-14 10:43:04 +0000
@@ -18,7 +18,7 @@
 
 #ifndef SHARED_LIBRARY
 
-const char * NEAR globerrs[GLOBERRS]=
+const char *globerrs[GLOBERRS]=
 {
   "Can't create/write to file '%s' (Errcode: %d)",
   "Error reading file '%s' (Errcode: %d)",

=== modified file 'mysys/mf_keycache.c'
--- a/mysys/mf_keycache.c	2010-07-08 21:20:08 +0000
+++ b/mysys/mf_keycache.c	2010-07-14 10:43:04 +0000
@@ -252,7 +252,7 @@ static void test_key_cache(KEY_CACHE *ke
 
 #if defined(KEYCACHE_DEBUG_LOG)
 static FILE *keycache_debug_log=NULL;
-static void keycache_debug_print _VARARGS((const char *fmt,...));
+static void keycache_debug_print(const char *fmt,...);
 #define KEYCACHE_DEBUG_OPEN                                                   \
           if (!keycache_debug_log)                                            \
           {                                                                   \

=== modified file 'mysys/mf_pack.c'
--- a/mysys/mf_pack.c	2010-03-30 12:10:25 +0000
+++ b/mysys/mf_pack.c	2010-07-14 10:43:04 +0000
@@ -24,7 +24,7 @@
 #include <descrip.h>
 #endif /* VMS */
 
-static char * NEAR_F expand_tilde(char * *path);
+static char * expand_tilde(char **path);
 
 	/* Pack a dirname ; Changes HOME to ~/ and current dev to ./ */
 	/* from is a dirname (from dirname() ?) ending with FN_LIBCHAR */
@@ -377,7 +377,7 @@ size_t unpack_dirname(char * to, const c
 	/* Expand tilde to home or user-directory */
 	/* Path is reset to point at FN_LIBCHAR after ~xxx */
 
-static char * NEAR_F expand_tilde(char * *path)
+static char * expand_tilde(char **path)
 {
   if (path[0][0] == FN_LIBCHAR)
     return home_dir;			/* ~/ expanded to home */

=== modified file 'mysys/mf_unixpath.c'
--- a/mysys/mf_unixpath.c	2007-05-10 09:59:39 +0000
+++ b/mysys/mf_unixpath.c	2010-07-14 10:43:04 +0000
@@ -16,10 +16,15 @@
 #include "mysys_priv.h"
 #include <m_string.h>
 
-	/* convert filename to unix style filename */
-	/* If MSDOS converts '\' to '/' */
+/**
+  Convert filename to unix style filename.
 
-void to_unix_path(char * to __attribute__((unused)))
+  @remark On Windows, converts '\' to '/'.
+
+  @param to   A pathname.
+*/
+
+void to_unix_path(char *to __attribute__((unused)))
 {
 #if FN_LIBCHAR != '/'
   {

=== modified file 'mysys/my_lib.c'
--- a/mysys/my_lib.c	2010-07-08 21:20:08 +0000
+++ b/mysys/my_lib.c	2010-07-14 10:43:04 +0000
@@ -14,7 +14,6 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 /* TODO: check for overun of memory for names. */
-/*	 Convert MSDOS-TIME to standar time_t (still needed?) */
 
 #include	"mysys_priv.h"
 #include	<m_string.h>

=== modified file 'mysys/my_static.c'
--- a/mysys/my_static.c	2010-05-28 22:53:26 +0000
+++ b/mysys/my_static.c	2010-07-14 10:43:04 +0000
@@ -27,20 +27,20 @@ my_bool timed_mutexes= 0;
 	/* from my_init */
 char *	home_dir=0;
 const char      *my_progname=0;
-char		NEAR curr_dir[FN_REFLEN]= {0},
-		NEAR home_dir_buff[FN_REFLEN]= {0};
+char		curr_dir[FN_REFLEN]= {0},
+		home_dir_buff[FN_REFLEN]= {0};
 ulong		my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;
 ulong           my_file_total_opened= 0;
-int		NEAR my_umask=0664, NEAR my_umask_dir=0777;
+int		my_umask=0664, my_umask_dir=0777;
 #ifndef THREAD
-int		NEAR my_errno=0;
+int		my_errno=0;
 #endif
 struct st_my_file_info my_file_info_default[MY_NFILE];
 uint   my_file_limit= MY_NFILE;
 struct st_my_file_info *my_file_info= my_file_info_default;
 
 	/* From mf_brkhant */
-int			NEAR my_dont_interrupt=0;
+int			my_dont_interrupt=0;
 volatile int		_my_signals=0;
 struct st_remember _my_sig_remember[MAX_SIGNALS]={{0,0}};
 #ifdef THREAD
@@ -84,7 +84,7 @@ ulong my_time_to_wait_for_lock=2;	/* In
 
 	/* from errors.c */
 #ifdef SHARED_LIBRARY
-char * NEAR globerrs[GLOBERRS];		/* my_error_messages is here */
+const char *globerrs[GLOBERRS];		/* my_error_messages is here */
 #endif
 void (*my_abort_hook)(int) = (void(*)(int)) exit;
 void (*error_handler_hook)(uint error, const char *str, myf MyFlags)=
@@ -119,10 +119,10 @@ ulonglong query_performance_frequency, q
 #endif
 
 	/* How to disable options */
-my_bool NEAR my_disable_locking=0;
-my_bool NEAR my_disable_async_io=0;
-my_bool NEAR my_disable_flush_key_blocks=0;
-my_bool NEAR my_disable_symlinks=0;
+my_bool my_disable_locking=0;
+my_bool my_disable_async_io=0;
+my_bool my_disable_flush_key_blocks=0;
+my_bool my_disable_symlinks=0;
 
 /*
   Note that PSI_hook and PSI_server are unconditionally

=== modified file 'mysys/my_static.h'
--- a/mysys/my_static.h	2009-09-23 21:32:31 +0000
+++ b/mysys/my_static.h	2010-07-14 10:43:04 +0000
@@ -53,7 +53,7 @@ struct st_irem
 };
 
 
-extern char	NEAR curr_dir[FN_REFLEN],NEAR home_dir_buff[FN_REFLEN];
+extern char curr_dir[FN_REFLEN], home_dir_buff[FN_REFLEN];
 
 extern volatile int _my_signals;
 extern struct st_remember _my_sig_remember[MAX_SIGNALS];

=== modified file 'sql-common/client.c'
--- a/sql-common/client.c	2010-07-14 10:36:24 +0000
+++ b/sql-common/client.c	2010-07-14 10:43:04 +0000
@@ -80,7 +80,7 @@ my_bool	net_flush(NET *net);
 #ifdef	 HAVE_PWD_H
 #include <pwd.h>
 #endif
-#if !defined(MSDOS) && !defined(__WIN__)
+#if !defined(__WIN__)
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -91,12 +91,12 @@ my_bool	net_flush(NET *net);
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
-#endif /*!defined(MSDOS) && !defined(__WIN__) */
+#endif /* !defined(__WIN__) */
 #ifdef HAVE_SYS_UN_H
 #  include <sys/un.h>
 #endif
 
-#if defined(MSDOS) || defined(__WIN__)
+#if defined(__WIN__)
 #define perror(A)
 #else
 #include <errno.h>

=== modified file 'storage/myisam/mi_create.c'
--- a/storage/myisam/mi_create.c	2010-07-08 21:20:08 +0000
+++ b/storage/myisam/mi_create.c	2010-07-14 10:43:04 +0000
@@ -19,12 +19,8 @@
 #include "sp_defs.h"
 #include <my_bit.h>
 
-#if defined(MSDOS) || defined(__WIN__)
 #ifdef __WIN__
 #include <fcntl.h>
-#else
-#include <process.h>			/* Prototype for getpid */
-#endif
 #endif
 #include <m_ctype.h>
 

=== modified file 'storage/myisam/mi_log.c'
--- a/storage/myisam/mi_log.c	2009-12-05 01:26:15 +0000
+++ b/storage/myisam/mi_log.c	2010-07-14 10:43:04 +0000
@@ -19,11 +19,8 @@
 */
 
 #include "myisamdef.h"
-#if defined(MSDOS) || defined(__WIN__)
+#ifdef __WIN__
 #include <fcntl.h>
-#ifndef __WIN__
-#include <process.h>
-#endif
 #endif
 #ifdef VMS
 #include <processes.h>

=== modified file 'storage/myisam/mi_open.c'
--- a/storage/myisam/mi_open.c	2010-07-08 21:20:08 +0000
+++ b/storage/myisam/mi_open.c	2010-07-14 10:43:04 +0000
@@ -20,12 +20,8 @@
 #include "rt_index.h"
 #include <m_ctype.h>
 
-#if defined(MSDOS) || defined(__WIN__)
 #ifdef __WIN__
 #include <fcntl.h>
-#else
-#include <process.h>			/* Prototype for getpid */
-#endif
 #endif
 #ifdef VMS
 #include "static.c"

=== modified file 'storage/myisam/mi_static.c'
--- a/storage/myisam/mi_static.c	2010-02-06 16:13:42 +0000
+++ b/storage/myisam/mi_static.c	2010-07-14 10:43:04 +0000
@@ -23,9 +23,9 @@
 #endif
 
 LIST	*myisam_open_list=0;
-uchar	NEAR myisam_file_magic[]=
+uchar	myisam_file_magic[]=
 { (uchar) 254, (uchar) 254,'\007', '\001', };
-uchar	NEAR myisam_pack_file_magic[]=
+uchar	myisam_pack_file_magic[]=
 { (uchar) 254, (uchar) 254,'\010', '\002', };
 char * myisam_log_filename=(char*) "myisam.log";
 File	myisam_log_file= -1;
@@ -55,7 +55,7 @@ int (*myisam_test_invalid_symlink)(const
   Position is , == , >= , <= , > , <
 */
 
-uint NEAR myisam_read_vec[]=
+uint myisam_read_vec[]=
 {
   SEARCH_FIND, SEARCH_FIND | SEARCH_BIGGER, SEARCH_FIND | SEARCH_SMALLER,
   SEARCH_NO_FIND | SEARCH_BIGGER, SEARCH_NO_FIND | SEARCH_SMALLER,
@@ -63,7 +63,7 @@ uint NEAR myisam_read_vec[]=
   MBR_CONTAIN, MBR_INTERSECT, MBR_WITHIN, MBR_DISJOINT, MBR_EQUAL
 };
 
-uint NEAR myisam_readnext_vec[]=
+uint myisam_readnext_vec[]=
 {
   SEARCH_BIGGER, SEARCH_BIGGER, SEARCH_SMALLER, SEARCH_BIGGER, SEARCH_SMALLER,
   SEARCH_BIGGER, SEARCH_SMALLER, SEARCH_SMALLER

=== modified file 'storage/myisam/mi_test2.c'
--- a/storage/myisam/mi_test2.c	2010-07-08 21:20:08 +0000
+++ b/storage/myisam/mi_test2.c	2010-07-14 10:43:04 +0000
@@ -28,7 +28,7 @@
 #define STANDARD_LENGTH 37
 #define MYISAM_KEYS 6
 #define MAX_PARTS 4
-#if !defined(MSDOS) && !defined(labs)
+#if !defined(labs)
 #define labs(a) abs(a)
 #endif
 

=== modified file 'storage/myisam/myisamdef.h'
--- a/storage/myisam/myisamdef.h	2010-04-03 08:37:53 +0000
+++ b/storage/myisam/myisamdef.h	2010-07-14 10:43:04 +0000
@@ -347,11 +347,11 @@ typedef struct st_mi_sort_param
   int (*key_read)(struct st_mi_sort_param *,void *);
   int (*key_write)(struct st_mi_sort_param *, const void *);
   void (*lock_in_memory)(MI_CHECK *);
-  NEAR int (*write_keys)(struct st_mi_sort_param *, register uchar **,
-                     uint , struct st_buffpek *, IO_CACHE *);
-  NEAR uint (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint);
-  NEAR int (*write_key)(struct st_mi_sort_param *, IO_CACHE *,uchar *,
-                       uint, uint);
+  int (*write_keys)(struct st_mi_sort_param *, register uchar **,
+                    uint , struct st_buffpek *, IO_CACHE *);
+  uint (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint);
+  int (*write_key)(struct st_mi_sort_param *, IO_CACHE *,uchar *,
+                   uint, uint);
 } MI_SORT_PARAM;
 
 	/* Some defines used by isam-funktions */
@@ -475,8 +475,8 @@ extern mysql_mutex_t THR_LOCK_myisam;
 	/* Some extern variables */
 
 extern LIST *myisam_open_list;
-extern uchar NEAR myisam_file_magic[],NEAR myisam_pack_file_magic[];
-extern uint NEAR myisam_read_vec[],NEAR myisam_readnext_vec[];
+extern uchar myisam_file_magic[], myisam_pack_file_magic[];
+extern uint myisam_read_vec[], myisam_readnext_vec[];
 extern uint myisam_quick_table_bits;
 extern File myisam_log_file;
 extern ulong myisam_pid;
@@ -774,9 +774,9 @@ void _mi_report_crashed(MI_INFO *file, c
 
     /* Functions needed by mi_check */
 volatile int *killed_ptr(MI_CHECK *param);
-void mi_check_print_error _VARARGS((MI_CHECK *param, const char *fmt,...));
-void mi_check_print_warning _VARARGS((MI_CHECK *param, const char *fmt,...));
-void mi_check_print_info _VARARGS((MI_CHECK *param, const char *fmt,...));
+void mi_check_print_error(MI_CHECK *param, const char *fmt,...);
+void mi_check_print_warning(MI_CHECK *param, const char *fmt,...);
+void mi_check_print_info(MI_CHECK *param, const char *fmt,...);
 int flush_pending_blocks(MI_SORT_PARAM *param);
 int sort_ft_buf_flush(MI_SORT_PARAM *sort_param);
 int thr_write_keys(MI_SORT_PARAM *sort_param);

=== modified file 'storage/myisam/myisampack.c'
--- a/storage/myisam/myisampack.c	2010-07-14 10:36:24 +0000
+++ b/storage/myisam/myisampack.c	2010-07-14 10:43:04 +0000
@@ -23,9 +23,6 @@
 #include <queues.h>
 #include <my_tree.h>
 #include "mysys_err.h"
-#ifdef MSDOS
-#include <io.h>
-#endif
 #ifndef __GNU_LIBRARY__
 #define __GNU_LIBRARY__			/* Skip warnings in getopt.h */
 #endif

=== modified file 'storage/myisam/sort.c'
--- a/storage/myisam/sort.c	2010-07-08 21:20:08 +0000
+++ b/storage/myisam/sort.c	2010-07-14 10:43:04 +0000
@@ -19,7 +19,7 @@
 */
 
 #include "fulltext.h"
-#if defined(MSDOS) || defined(__WIN__)
+#if defined(__WIN__)
 #include <fcntl.h>
 #else
 #include <stddef.h>
@@ -41,46 +41,46 @@
  Pointers of functions for store and read keys from temp file
 */
 
-extern void print_error _VARARGS((const char *fmt,...));
+extern void print_error(const char *fmt,...);
 
 /* Functions defined in this file */
 
-static ha_rows NEAR_F find_all_keys(MI_SORT_PARAM *info,uint keys,
-                                    uchar **sort_keys,
-                                    DYNAMIC_ARRAY *buffpek,int *maxbuffer,
-                                    IO_CACHE *tempfile,
-                                    IO_CACHE *tempfile_for_exceptions);
-static int NEAR_F write_keys(MI_SORT_PARAM *info,uchar **sort_keys,
-                             uint count, BUFFPEK *buffpek,IO_CACHE *tempfile);
-static int NEAR_F write_key(MI_SORT_PARAM *info, uchar *key,
-			    IO_CACHE *tempfile);
-static int NEAR_F write_index(MI_SORT_PARAM *info,uchar * *sort_keys,
-                              uint count);
-static int NEAR_F merge_many_buff(MI_SORT_PARAM *info,uint keys,
-                                  uchar * *sort_keys,
-                                  BUFFPEK *buffpek,int *maxbuffer,
-                                  IO_CACHE *t_file);
-static uint NEAR_F read_to_buffer(IO_CACHE *fromfile,BUFFPEK *buffpek,
-                                  uint sort_length);
-static int NEAR_F merge_buffers(MI_SORT_PARAM *info,uint keys,
-                                IO_CACHE *from_file, IO_CACHE *to_file,
-                                uchar * *sort_keys, BUFFPEK *lastbuff,
-                                BUFFPEK *Fb, BUFFPEK *Tb);
-static int NEAR_F merge_index(MI_SORT_PARAM *,uint,uchar **,BUFFPEK *, int,
-                              IO_CACHE *);
+static ha_rows find_all_keys(MI_SORT_PARAM *info,uint keys,
+                             uchar **sort_keys,
+                             DYNAMIC_ARRAY *buffpek,int *maxbuffer,
+                             IO_CACHE *tempfile,
+                             IO_CACHE *tempfile_for_exceptions);
+static int write_keys(MI_SORT_PARAM *info,uchar **sort_keys,
+                      uint count, BUFFPEK *buffpek,IO_CACHE *tempfile);
+static int write_key(MI_SORT_PARAM *info, uchar *key,
+                     IO_CACHE *tempfile);
+static int write_index(MI_SORT_PARAM *info,uchar * *sort_keys,
+                       uint count);
+static int merge_many_buff(MI_SORT_PARAM *info,uint keys,
+                           uchar * *sort_keys,
+                           BUFFPEK *buffpek,int *maxbuffer,
+                           IO_CACHE *t_file);
+static uint read_to_buffer(IO_CACHE *fromfile,BUFFPEK *buffpek,
+                           uint sort_length);
+static int merge_buffers(MI_SORT_PARAM *info,uint keys,
+                         IO_CACHE *from_file, IO_CACHE *to_file,
+                         uchar * *sort_keys, BUFFPEK *lastbuff,
+                         BUFFPEK *Fb, BUFFPEK *Tb);
+static int merge_index(MI_SORT_PARAM *,uint,uchar **,BUFFPEK *, int,
+                       IO_CACHE *);
 static int flush_ft_buf(MI_SORT_PARAM *info);
 
-static int NEAR_F write_keys_varlen(MI_SORT_PARAM *info,uchar **sort_keys,
-                                    uint count, BUFFPEK *buffpek,
-                                    IO_CACHE *tempfile);
-static uint NEAR_F read_to_buffer_varlen(IO_CACHE *fromfile,BUFFPEK *buffpek,
-                                         uint sort_length);
-static int NEAR_F write_merge_key(MI_SORT_PARAM *info, IO_CACHE *to_file,
-                                  uchar *key, uint sort_length, uint count);
-static int NEAR_F write_merge_key_varlen(MI_SORT_PARAM *info,
-					 IO_CACHE *to_file,
-					 uchar* key, uint sort_length,
-					 uint count);
+static int write_keys_varlen(MI_SORT_PARAM *info,uchar **sort_keys,
+                             uint count, BUFFPEK *buffpek,
+                             IO_CACHE *tempfile);
+static uint read_to_buffer_varlen(IO_CACHE *fromfile,BUFFPEK *buffpek,
+                                  uint sort_length);
+static int write_merge_key(MI_SORT_PARAM *info, IO_CACHE *to_file,
+                           uchar *key, uint sort_length, uint count);
+static int write_merge_key_varlen(MI_SORT_PARAM *info,
+                                  IO_CACHE *to_file,
+                                  uchar* key, uint sort_length,
+                                  uint count);
 static inline int
 my_var_write(MI_SORT_PARAM *info, IO_CACHE *to_file, uchar *bufs);
 
@@ -253,10 +253,10 @@ err:
 
 /* Search after all keys and place them in a temp. file */
 
-static ha_rows NEAR_F find_all_keys(MI_SORT_PARAM *info, uint keys,
-				    uchar **sort_keys, DYNAMIC_ARRAY *buffpek,
-				    int *maxbuffer, IO_CACHE *tempfile,
-				    IO_CACHE *tempfile_for_exceptions)
+static ha_rows find_all_keys(MI_SORT_PARAM *info, uint keys,
+                             uchar **sort_keys, DYNAMIC_ARRAY *buffpek,
+                             int *maxbuffer, IO_CACHE *tempfile,
+                             IO_CACHE *tempfile_for_exceptions)
 {
   int error;
   uint idx;
@@ -641,8 +641,8 @@ int thr_write_keys(MI_SORT_PARAM *sort_p
 
         /* Write all keys in memory to file for later merge */
 
-static int NEAR_F write_keys(MI_SORT_PARAM *info, register uchar **sort_keys,
-                             uint count, BUFFPEK *buffpek, IO_CACHE *tempfile)
+static int write_keys(MI_SORT_PARAM *info, register uchar **sort_keys,
+                      uint count, BUFFPEK *buffpek, IO_CACHE *tempfile)
 {
   uchar **end;
   uint sort_length=info->key_length;
@@ -682,10 +682,10 @@ my_var_write(MI_SORT_PARAM *info, IO_CAC
 }
 
 
-static int NEAR_F write_keys_varlen(MI_SORT_PARAM *info,
-				    register uchar **sort_keys,
-                                    uint count, BUFFPEK *buffpek,
-				    IO_CACHE *tempfile)
+static int write_keys_varlen(MI_SORT_PARAM *info,
+                             register uchar **sort_keys,
+                             uint count, BUFFPEK *buffpek,
+                             IO_CACHE *tempfile)
 {
   uchar **end;
   int err;
@@ -709,8 +709,7 @@ static int NEAR_F write_keys_varlen(MI_S
 } /* write_keys_varlen */
 
 
-static int NEAR_F write_key(MI_SORT_PARAM *info, uchar *key,
-			    IO_CACHE *tempfile)
+static int write_key(MI_SORT_PARAM *info, uchar *key, IO_CACHE *tempfile)
 {
   uint key_length=info->real_key_length;
   DBUG_ENTER("write_key");
@@ -729,8 +728,8 @@ static int NEAR_F write_key(MI_SORT_PARA
 
 /* Write index */
 
-static int NEAR_F write_index(MI_SORT_PARAM *info, register uchar **sort_keys,
-                              register uint count)
+static int write_index(MI_SORT_PARAM *info, register uchar **sort_keys,
+                       register uint count)
 {
   DBUG_ENTER("write_index");
 
@@ -747,9 +746,9 @@ static int NEAR_F write_index(MI_SORT_PA
 
         /* Merge buffers to make < MERGEBUFF2 buffers */
 
-static int NEAR_F merge_many_buff(MI_SORT_PARAM *info, uint keys,
-                                  uchar **sort_keys, BUFFPEK *buffpek,
-                                  int *maxbuffer, IO_CACHE *t_file)
+static int merge_many_buff(MI_SORT_PARAM *info, uint keys,
+                           uchar **sort_keys, BUFFPEK *buffpek,
+                           int *maxbuffer, IO_CACHE *t_file)
 {
   register int i;
   IO_CACHE t_file2, *from_file, *to_file, *temp;
@@ -810,8 +809,8 @@ cleanup:
     -1	Error
 */
 
-static uint NEAR_F read_to_buffer(IO_CACHE *fromfile, BUFFPEK *buffpek,
-                                  uint sort_length)
+static uint read_to_buffer(IO_CACHE *fromfile, BUFFPEK *buffpek,
+                           uint sort_length)
 {
   register uint count;
   uint length;
@@ -830,8 +829,8 @@ static uint NEAR_F read_to_buffer(IO_CAC
   return (count*sort_length);
 } /* read_to_buffer */
 
-static uint NEAR_F read_to_buffer_varlen(IO_CACHE *fromfile, BUFFPEK *buffpek,
-                                         uint sort_length)
+static uint read_to_buffer_varlen(IO_CACHE *fromfile, BUFFPEK *buffpek,
+                                  uint sort_length)
 {
   register uint count;
   uint16 length_of_key = 0;
@@ -862,9 +861,9 @@ static uint NEAR_F read_to_buffer_varlen
 } /* read_to_buffer_varlen */
 
 
-static int NEAR_F write_merge_key_varlen(MI_SORT_PARAM *info,
-					 IO_CACHE *to_file, uchar* key,
-                                         uint sort_length, uint count)
+static int write_merge_key_varlen(MI_SORT_PARAM *info,
+                                  IO_CACHE *to_file, uchar* key,
+                                  uint sort_length, uint count)
 {
   uint idx;
   uchar *bufs = key;
@@ -880,9 +879,9 @@ static int NEAR_F write_merge_key_varlen
 }
 
 
-static int NEAR_F write_merge_key(MI_SORT_PARAM *info __attribute__((unused)),
-				  IO_CACHE *to_file, uchar *key,
-				  uint sort_length, uint count)
+static int write_merge_key(MI_SORT_PARAM *info __attribute__((unused)),
+                           IO_CACHE *to_file, uchar *key,
+                           uint sort_length, uint count)
 {
   return my_b_write(to_file, key, (size_t) sort_length*count);
 }
@@ -892,7 +891,7 @@ static int NEAR_F write_merge_key(MI_SOR
   If to_file == 0 then use info->key_write
 */
 
-static int NEAR_F
+static int
 merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
               IO_CACHE *to_file, uchar **sort_keys, BUFFPEK *lastbuff,
               BUFFPEK *Fb, BUFFPEK *Tb)
@@ -1035,7 +1034,7 @@ err:
 
         /* Do a merge to output-file (save only positions) */
 
-static int NEAR_F
+static int
 merge_index(MI_SORT_PARAM *info, uint keys, uchar **sort_keys,
             BUFFPEK *buffpek, int maxbuffer, IO_CACHE *tempfile)
 {

=== modified file 'strings/ctype-big5.c'
--- a/strings/ctype-big5.c	2010-01-14 11:17:57 +0000
+++ b/strings/ctype-big5.c	2010-07-14 10:43:04 +0000
@@ -47,7 +47,7 @@
 #define big5head(e)	((uchar)(e>>8))
 #define big5tail(e)	((uchar)(e&0xff))
 
-static uchar NEAR ctype_big5[257] =
+static uchar ctype_big5[257] =
 {
   0,				/* For standard library */
   32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
@@ -68,7 +68,7 @@ static uchar NEAR ctype_big5[257] =
   3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,
 };
 
-static uchar NEAR to_lower_big5[]=
+static uchar to_lower_big5[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -104,7 +104,7 @@ static uchar NEAR to_lower_big5[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
 };
 
-static uchar NEAR to_upper_big5[]=
+static uchar to_upper_big5[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -140,7 +140,7 @@ static uchar NEAR to_upper_big5[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
 };
 
-static uchar NEAR sort_order_big5[]=
+static uchar sort_order_big5[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',

=== modified file 'strings/ctype-cp932.c'
--- a/strings/ctype-cp932.c	2010-02-15 05:57:24 +0000
+++ b/strings/ctype-cp932.c	2010-07-14 10:43:04 +0000
@@ -31,7 +31,7 @@
  * .configure. mbmaxlen_cp932=2
  */
 
-static uchar NEAR ctype_cp932[257] =
+static uchar ctype_cp932[257] =
 {
     0,				/* For standard library */
     0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,	/* NUL ^A - ^G */
@@ -68,7 +68,7 @@ static uchar NEAR ctype_cp932[257] =
     0020, 0020, 0020, 0020, 0020, 0000, 0000, 0000
 };
 
-static uchar NEAR to_lower_cp932[]=
+static uchar to_lower_cp932[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -104,7 +104,7 @@ static uchar NEAR to_lower_cp932[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
 };
 
-static uchar NEAR to_upper_cp932[]=
+static uchar to_upper_cp932[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -140,7 +140,7 @@ static uchar NEAR to_upper_cp932[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
 };
 
-static uchar NEAR sort_order_cp932[]=
+static uchar sort_order_cp932[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',

=== modified file 'strings/ctype-czech.c'
--- a/strings/ctype-czech.c	2007-05-10 09:59:39 +0000
+++ b/strings/ctype-czech.c	2010-07-14 10:43:04 +0000
@@ -430,7 +430,7 @@ static my_bool my_like_range_czech(CHARS
 #include <my_global.h>
 #include "m_string.h"
 
-static uchar NEAR ctype_czech[257] = {
+static uchar ctype_czech[257] = {
 0,
  32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
@@ -450,7 +450,7 @@ static uchar NEAR ctype_czech[257] = {
   2,  2,  2,  2,  2,  2,  2, 16,  2,  2,  2,  2,  2,  2,  2, 16,
 };
 
-static uchar NEAR to_lower_czech[] = {
+static uchar to_lower_czech[] = {
   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
  16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
@@ -469,7 +469,7 @@ static uchar NEAR to_lower_czech[] = {
 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
 };
 
-static uchar NEAR to_upper_czech[] = {
+static uchar to_upper_czech[] = {
   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
  16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
@@ -488,7 +488,7 @@ static uchar NEAR to_upper_czech[] = {
 240,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255,
 };
 
-static uchar NEAR sort_order_czech[] = {
+static uchar sort_order_czech[] = {
   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
  16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,

=== modified file 'strings/ctype-euc_kr.c'
--- a/strings/ctype-euc_kr.c	2010-01-14 11:17:57 +0000
+++ b/strings/ctype-euc_kr.c	2010-07-14 10:43:04 +0000
@@ -32,7 +32,7 @@
 #ifdef HAVE_CHARSET_euckr
 
 
-static uchar NEAR ctype_euc_kr[257] =
+static uchar ctype_euc_kr[257] =
 {
     0,				/* For standard library */
     0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,	/* NUL ^A - ^G */
@@ -69,7 +69,7 @@ static uchar NEAR ctype_euc_kr[257] =
     0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000,
 };
 
-static uchar NEAR to_lower_euc_kr[]=
+static uchar to_lower_euc_kr[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -105,7 +105,7 @@ static uchar NEAR to_lower_euc_kr[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
 };
 
-static uchar NEAR to_upper_euc_kr[]=
+static uchar to_upper_euc_kr[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -141,7 +141,7 @@ static uchar NEAR to_upper_euc_kr[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
 };
 
-static uchar NEAR sort_order_euc_kr[]=
+static uchar sort_order_euc_kr[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',

=== modified file 'strings/ctype-eucjpms.c'
--- a/strings/ctype-eucjpms.c	2010-02-15 05:57:24 +0000
+++ b/strings/ctype-eucjpms.c	2010-07-14 10:43:04 +0000
@@ -33,7 +33,7 @@ ctype-ujis.c file.
 #ifdef HAVE_CHARSET_eucjpms
 
 
-static uchar NEAR ctype_eucjpms[257] =
+static uchar ctype_eucjpms[257] =
 {
     0,				/* For standard library */
     0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,	/* NUL ^A - ^G */
@@ -70,7 +70,7 @@ static uchar NEAR ctype_eucjpms[257] =
     0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000,
 };
 
-static uchar NEAR to_lower_eucjpms[]=
+static uchar to_lower_eucjpms[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -106,7 +106,7 @@ static uchar NEAR to_lower_eucjpms[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
 };
 
-static uchar NEAR to_upper_eucjpms[]=
+static uchar to_upper_eucjpms[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -142,7 +142,7 @@ static uchar NEAR to_upper_eucjpms[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
 };
 
-static uchar NEAR sort_order_eucjpms[]=
+static uchar sort_order_eucjpms[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',

=== modified file 'strings/ctype-gb2312.c'
--- a/strings/ctype-gb2312.c	2010-01-14 11:17:57 +0000
+++ b/strings/ctype-gb2312.c	2010-07-14 10:43:04 +0000
@@ -29,7 +29,7 @@
 
 #ifdef HAVE_CHARSET_gb2312
 
-static uchar NEAR ctype_gb2312[257] =
+static uchar ctype_gb2312[257] =
 {
   0,				/* For standard library */
   32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
@@ -50,7 +50,7 @@ static uchar NEAR ctype_gb2312[257] =
   3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,
 };
 
-static uchar NEAR to_lower_gb2312[]=
+static uchar to_lower_gb2312[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -86,7 +86,7 @@ static uchar NEAR to_lower_gb2312[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
 };
 
-static uchar NEAR to_upper_gb2312[]=
+static uchar to_upper_gb2312[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -122,7 +122,7 @@ static uchar NEAR to_upper_gb2312[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
 };
 
-static uchar NEAR sort_order_gb2312[]=
+static uchar sort_order_gb2312[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',

=== modified file 'strings/ctype-gbk.c'
--- a/strings/ctype-gbk.c	2010-01-14 11:17:57 +0000
+++ b/strings/ctype-gbk.c	2010-07-14 10:43:04 +0000
@@ -44,7 +44,7 @@
 #define gbkhead(e)     ((uchar)(e>>8))
 #define gbktail(e)     ((uchar)(e&0xff))
 
-static uchar NEAR ctype_gbk[257] =
+static uchar ctype_gbk[257] =
 {
   0,				/* For standard library */
   32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
@@ -65,7 +65,7 @@ static uchar NEAR ctype_gbk[257] =
   3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,
 };
 
-static uchar NEAR to_lower_gbk[]=
+static uchar to_lower_gbk[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -101,7 +101,7 @@ static uchar NEAR to_lower_gbk[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
 };
 
-static uchar NEAR to_upper_gbk[]=
+static uchar to_upper_gbk[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -995,7 +995,7 @@ static MY_UNICASE_INFO *my_caseinfo_gbk[
 
 
 
-static uchar NEAR sort_order_gbk[]=
+static uchar sort_order_gbk[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -1031,7 +1031,7 @@ static uchar NEAR sort_order_gbk[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
 };
 
-static uint16 NEAR gbk_order[]=
+static uint16 gbk_order[]=
 {
 8653,14277,17116,11482,11160,2751,14613,3913,13337,9827,
 19496,1759,8105,7103,7836,5638,2223,21433,5878,8006,

=== modified file 'strings/ctype-sjis.c'
--- a/strings/ctype-sjis.c	2010-02-15 05:57:24 +0000
+++ b/strings/ctype-sjis.c	2010-07-14 10:43:04 +0000
@@ -31,7 +31,7 @@
  * .configure. mbmaxlen_sjis=2
  */
 
-static uchar NEAR ctype_sjis[257] =
+static uchar ctype_sjis[257] =
 {
     0,				/* For standard library */
     0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,	/* NUL ^A - ^G */
@@ -68,7 +68,7 @@ static uchar NEAR ctype_sjis[257] =
     0020, 0020, 0020, 0020, 0020, 0000, 0000, 0000
 };
 
-static uchar NEAR to_lower_sjis[]=
+static uchar to_lower_sjis[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -104,7 +104,7 @@ static uchar NEAR to_lower_sjis[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
 };
 
-static uchar NEAR to_upper_sjis[]=
+static uchar to_upper_sjis[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -140,7 +140,7 @@ static uchar NEAR to_upper_sjis[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
 };
 
-static uchar NEAR sort_order_sjis[]=
+static uchar sort_order_sjis[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',

=== modified file 'strings/ctype-tis620.c'
--- a/strings/ctype-tis620.c	2007-05-10 09:59:39 +0000
+++ b/strings/ctype-tis620.c	2010-07-14 10:43:04 +0000
@@ -323,7 +323,7 @@ static int t_ctype[][TOT_LEVELS] = {
     /*0xFF*/ { 255 /*IGNORE*/, IGNORE, IGNORE, IGNORE, X },
 };
 
-static uchar NEAR ctype_tis620[257] =
+static uchar ctype_tis620[257] =
 {
   0,				/* For standard library */
   32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
@@ -344,7 +344,7 @@ static uchar NEAR ctype_tis620[257] =
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 };
 
-static uchar NEAR to_lower_tis620[]=
+static uchar to_lower_tis620[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -380,7 +380,7 @@ static uchar NEAR to_lower_tis620[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
 };
 
-static uchar NEAR to_upper_tis620[]=
+static uchar to_upper_tis620[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -416,7 +416,7 @@ static uchar NEAR to_upper_tis620[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
 };
 
-static uchar NEAR sort_order_tis620[]=
+static uchar sort_order_tis620[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',

=== modified file 'strings/ctype-ujis.c'
--- a/strings/ctype-ujis.c	2010-02-15 05:57:24 +0000
+++ b/strings/ctype-ujis.c	2010-07-14 10:43:04 +0000
@@ -32,7 +32,7 @@
 #ifdef HAVE_CHARSET_ujis
 
 
-static uchar NEAR ctype_ujis[257] =
+static uchar ctype_ujis[257] =
 {
     0,				/* For standard library */
     0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,	/* NUL ^A - ^G */
@@ -69,7 +69,7 @@ static uchar NEAR ctype_ujis[257] =
     0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000,
 };
 
-static uchar NEAR to_lower_ujis[]=
+static uchar to_lower_ujis[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -105,7 +105,7 @@ static uchar NEAR to_lower_ujis[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
 };
 
-static uchar NEAR to_upper_ujis[]=
+static uchar to_upper_ujis[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',
@@ -141,7 +141,7 @@ static uchar NEAR to_upper_ujis[]=
   (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
 };
 
-static uchar NEAR sort_order_ujis[]=
+static uchar sort_order_ujis[]=
 {
   '\000','\001','\002','\003','\004','\005','\006','\007',
   '\010','\011','\012','\013','\014','\015','\016','\017',

=== modified file 'strings/ctype-win1250ch.c'
--- a/strings/ctype-win1250ch.c	2007-05-10 09:59:39 +0000
+++ b/strings/ctype-win1250ch.c	2010-07-14 10:43:04 +0000
@@ -152,7 +152,7 @@ static MY_UNI_IDX idx_uni_cp1250[]={
 };
 
 
-static uchar NEAR ctype_win1250ch[] = {
+static uchar ctype_win1250ch[] = {
 0x00,
 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
 0x20, 0x28, 0x28, 0x28, 0x28, 0x28, 0x20, 0x20,
@@ -188,7 +188,7 @@ static uchar NEAR ctype_win1250ch[] = {
 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x10
 };
 
-static uchar NEAR to_lower_win1250ch[] = {
+static uchar to_lower_win1250ch[] = {
 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
@@ -223,7 +223,7 @@ static uchar NEAR to_lower_win1250ch[] =
 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
 };
 
-static uchar NEAR to_upper_win1250ch[] = {
+static uchar to_upper_win1250ch[] = {
 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
@@ -260,7 +260,7 @@ static uchar NEAR to_upper_win1250ch[] =
 
 
 
-static uchar NEAR sort_order_win1250ch[] = {
+static uchar sort_order_win1250ch[] = {
 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
@@ -279,7 +279,7 @@ static uchar NEAR sort_order_win1250ch[]
 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
 };
 
-static uchar NEAR _sort_order_win1250ch1[] = {
+static uchar _sort_order_win1250ch1[] = {
 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
@@ -339,7 +339,7 @@ static uchar NEAR _sort_order_win1250ch1
 0xb8, 0xbd, 0xbd, 0xbd, 0xbd, 0xc1, 0xbc, 0xf5
 };
 
-static uchar NEAR _sort_order_win1250ch2[] = {
+static uchar _sort_order_win1250ch2[] = {
 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11,
 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
@@ -513,7 +513,7 @@ static size_t my_strnxfrm_win1250ch(CHAR
 
 #ifdef REAL_MYSQL
 
-static uchar NEAR like_range_prefix_min_win1250ch[]=
+static uchar like_range_prefix_min_win1250ch[]=
 {
   0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
   0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
@@ -557,7 +557,7 @@ static uchar NEAR like_range_prefix_min_
   For all other characters:   prefix_max[i]    == i
 */
 
-static uchar NEAR like_range_prefix_max_win1250ch[]=
+static uchar like_range_prefix_max_win1250ch[]=
 {
   0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
   0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,

=== modified file 'strings/do_ctype.c'
--- a/strings/do_ctype.c	2007-05-10 09:59:39 +0000
+++ b/strings/do_ctype.c	2010-07-14 10:43:04 +0000
@@ -25,8 +25,8 @@
 #include <my_sys.h>
 #include "m_string.h"
 
-uchar NEAR to_upper[256];
-uchar NEAR to_lower[256],NEAR sort_order[256];
+uchar to_upper[256];
+uchar to_lower[256], sort_order[256];
 
 static int	ascii_output=1;
 static string	tab_names[]={ "to_lower[]={","to_upper[]={","sort_order[]={" };
@@ -47,7 +47,7 @@ char *argv[];
   puts("Tabells for caseconverts and sorttest of characters\n");
   for (i=0 ; i < 3 ; i++)
   {
-    printf("uchar NEAR %s\n",tab_names[i]);
+    printf("uchar %s\n",tab_names[i]);
     for (j=0 ; j <= 255 ; j++)
     {
       ch=(int) tabell[i][j];
@@ -140,10 +140,6 @@ void init_case_convert()
     to_upper[i]= sort_order[i]= to_lower[i]= (char) i;
 #endif
 
-#ifdef MSDOS
-  higher_pos= (uchar *) "\217\216\231\232\220"; /* Extra chars to konv. */
-  lower_pos=  (uchar *) "\206\204\224\201\202";
-#else
 #if defined(HPUX10) && ASCII_BITS_USED == 8
   higher_pos= (uchar *) "\xd0\xd8\xda\xdb\xdc\xd3";
   lower_pos=  (uchar *) "\xd4\xcc\xce\xdf\xc9\xd7";
@@ -160,7 +156,6 @@ void init_case_convert()
 #endif
 #endif /* USE_INTERNAL_CTYPE */
 #endif /* HPUX10 */
-#endif /* MSDOS */
 
   while (*higher_pos)
   {
@@ -171,10 +166,6 @@ void init_case_convert()
 	/* sets upp sortorder; higer_pos character (upper and lower) is */
 	/* changed to lower_pos character */
 
-#ifdef MSDOS
-  higher_pos= (uchar *) "\217\216\231\232\220";
-  lower_pos=  (uchar *) "\216\217\231YE";
-#else
 #if defined(HPUX10) && ASCII_BITS_USED == 8
   higher_pos= lower_pos= (uchar *) "";		/* Tecknen i r{tt ordning */
 #else
@@ -186,7 +177,6 @@ void init_case_convert()
   lower_pos= (uchar *)	"[\\]YE";		/* Ordning enligt ascii */
 #endif /* USE_ISO_8859_1 */
 #endif /* HPUX10 */
-#endif /* MSDOS */
 
   while (*higher_pos)
   {

=== modified file 'strings/int2str.c'
--- a/strings/int2str.c	2007-10-31 09:34:26 +0000
+++ b/strings/int2str.c	2010-07-14 10:43:04 +0000
@@ -19,9 +19,9 @@
 /*
   _dig_vec arrays are public because they are used in several outer places.
 */
-char NEAR _dig_vec_upper[] =
+char _dig_vec_upper[] =
   "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-char NEAR _dig_vec_lower[] =
+char _dig_vec_lower[] =
   "0123456789abcdefghijklmnopqrstuvwxyz";
 
 

=== modified file 'strings/strtol.c'
--- a/strings/strtol.c	2006-12-23 19:17:15 +0000
+++ b/strings/strtol.c	2010-07-14 10:43:04 +0000
@@ -23,6 +23,6 @@
 #include <my_global.h>
 #include <m_string.h>
 
-#if !defined(MSDOS) && !defined(HAVE_STRTOL) && !defined(__WIN__)
+#if !defined(HAVE_STRTOL) && !defined(__WIN__)
 #include "strto.c"
 #endif

=== modified file 'strings/strtoul.c'
--- a/strings/strtoul.c	2006-12-23 19:17:15 +0000
+++ b/strings/strtoul.c	2010-07-14 10:43:04 +0000
@@ -23,7 +23,7 @@
 #include <my_global.h>
 #include <m_string.h>
 
-#if !defined(MSDOS) && !defined(HAVE_STRTOUL)
+#if !defined(HAVE_STRTOUL)
 #define USE_UNSIGNED
 #include "strto.c"
 #endif


Attachment: [text/bzr-bundle] bzr/davi.arnaut@sun.com-20100714104304-ibbrtjeznw132rcz.bundle
Thread
bzr commit into mysql-trunk-bugfixing branch (davi:3112) WL#5486Davi Arnaut14 Jul
Re: bzr commit into mysql-trunk-bugfixing branch (davi:3112) WL#5486Jon Olav Hauglid14 Jul