summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysqldump.c8
-rw-r--r--dbug/dbug.c87
-rw-r--r--dbug/dbug_analyze.c118
-rw-r--r--include/config-win.h1
-rw-r--r--include/m_string.h22
-rw-r--r--include/my_dbug.h2
-rw-r--r--include/my_global.h19
-rw-r--r--include/my_sys.h28
-rw-r--r--include/mysys_err.h6
-rw-r--r--libmysql/dll.c20
-rw-r--r--libmysql/libmysql.c46
-rw-r--r--libmysqld/libmysqld.c4
-rw-r--r--mysys/errors.c2
-rw-r--r--mysys/mf_keycache.c2
-rw-r--r--mysys/mf_pack.c4
-rw-r--r--mysys/mf_unixpath.c11
-rw-r--r--mysys/my_lib.c1
-rw-r--r--mysys/my_static.c20
-rw-r--r--mysys/my_static.h2
-rw-r--r--sql-common/client.c6
-rw-r--r--storage/myisam/mi_create.c4
-rw-r--r--storage/myisam/mi_log.c5
-rw-r--r--storage/myisam/mi_open.c4
-rw-r--r--storage/myisam/mi_static.c8
-rw-r--r--storage/myisam/mi_test2.c2
-rw-r--r--storage/myisam/myisamdef.h20
-rw-r--r--storage/myisam/myisampack.c3
-rw-r--r--storage/myisam/sort.c129
-rw-r--r--strings/ctype-big5.c8
-rw-r--r--strings/ctype-cp932.c8
-rw-r--r--strings/ctype-czech.c8
-rw-r--r--strings/ctype-euc_kr.c8
-rw-r--r--strings/ctype-eucjpms.c8
-rw-r--r--strings/ctype-gb2312.c8
-rw-r--r--strings/ctype-gbk.c10
-rw-r--r--strings/ctype-sjis.c8
-rw-r--r--strings/ctype-tis620.c8
-rw-r--r--strings/ctype-ujis.c8
-rw-r--r--strings/ctype-win1250ch.c16
-rw-r--r--strings/do_ctype.c16
-rw-r--r--strings/int2str.c4
-rw-r--r--strings/strtol.c2
-rw-r--r--strings/strtoul.c2
43 files changed, 224 insertions, 482 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index e1f4f0e518d..68cfde864b5 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -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},
diff --git a/dbug/dbug.c b/dbug/dbug.c
index a4b381f2746..fd87669b8ca 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -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, const char *name)
else
{
cs->stack->prof_file= fp;
- if (newfile)
- {
- ChangeOwner(cs, name);
- }
}
}
return fp;
@@ -2266,42 +2254,6 @@ static BOOLEAN Writable(const char *pathname)
/*
* 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
/*
diff --git a/dbug/dbug_analyze.c b/dbug/dbug_analyze.c
index 3263b2ccc59..1ebe8bfd77e 100644
--- a/dbug/dbug_analyze.c
+++ b/dbug/dbug_analyze.c
@@ -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@ut-sally.UUCP (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@ut-sally.UUCP (Moderator, John Quarterman)
- * Newsgroups: mod.std.unix
- * Subject: public domain AT&T getopt source
- * Message-ID: <3352@ut-sally.UUCP>
- * 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@ut-sally.UUCP
- *
- * 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 */
diff --git a/include/config-win.h b/include/config-win.h
index 269ec0e925a..9e8bb19c12d 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -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)
diff --git a/include/m_string.h b/include/m_string.h
index 1a2a508edfb..71d52ec4549 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -92,8 +92,8 @@ extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
#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 *src);
#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) */
diff --git a/include/my_dbug.h b/include/my_dbug.h
index 34681fbc633..19570ac2a67 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -45,7 +45,7 @@ extern void _db_enter_(const char *_func_, const char *_file_, uint _line_,
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);
diff --git a/include/my_global.h b/include/my_global.h
index f3e6ae1633a..5480f7ce2c1 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -679,16 +679,6 @@ int __cxa_pure_virtual () __attribute__ ((weak));
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_array
((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
diff --git a/include/my_sys.h b/include/my_sys.h
index fb78242a3b5..a426dfb7039 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -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 newlength, int filler, myf MyFlags);
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) (),
diff --git a/include/mysys_err.h b/include/mysys_err.h
index 6c18055b31b..9629dfec014 100644
--- a/include/mysys_err.h
+++ b/include/mysys_err.h
@@ -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 */
/*
diff --git a/libmysql/dll.c b/libmysql/dll.c
index 8fcf41c792c..b5fcba13f91 100644
--- a/libmysql/dll.c
+++ b/libmysql/dll.c
@@ -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 ul_reason_being_called,LPVOID lpReserve
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
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 68813937fb6..7af9c5a6525 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -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*1024L;
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
@@ -128,31 +128,29 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
init_client_errs();
if (!mysql_port)
{
+ char *env;
+ struct servent *serv_ptr __attribute__((unused));
+
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.
- */
+ /*
+ 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 +477,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 +507,7 @@ void read_user_name(char *name)
DBUG_VOID_RETURN;
}
-#else /* If MSDOS || VMS */
+#else /* If Windows || VMS */
void read_user_name(char *name)
{
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c
index 758b803dbd4..603fc3bc2f0 100644
--- a/libmysqld/libmysqld.c
+++ b/libmysqld/libmysqld.c
@@ -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
diff --git a/mysys/errors.c b/mysys/errors.c
index 37d33374fe1..9342ab2d2dd 100644
--- a/mysys/errors.c
+++ b/mysys/errors.c
@@ -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)",
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index 5d0808933e3..c42c3d469e6 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -252,7 +252,7 @@ static void test_key_cache(KEY_CACHE *keycache,
#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) \
{ \
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c
index 4f7cd90e8aa..ce148b7dd69 100644
--- a/mysys/mf_pack.c
+++ b/mysys/mf_pack.c
@@ -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 char *from)
/* 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 */
diff --git a/mysys/mf_unixpath.c b/mysys/mf_unixpath.c
index 75f8de14879..ee81aae4584 100644
--- a/mysys/mf_unixpath.c
+++ b/mysys/mf_unixpath.c
@@ -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 != '/'
{
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index e70a70d47ed..820f37360de 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -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>
diff --git a/mysys/my_static.c b/mysys/my_static.c
index ff5abba29d3..0b2f86b4038 100644
--- a/mysys/my_static.c
+++ b/mysys/my_static.c
@@ -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 seconds */
/* 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, query_performance_offset;
#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
diff --git a/mysys/my_static.h b/mysys/my_static.h
index c336115bc35..f50f7d8be10 100644
--- a/mysys/my_static.h
+++ b/mysys/my_static.h
@@ -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];
diff --git a/sql-common/client.c b/sql-common/client.c
index 0661cc41096..f1bdcdc158f 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -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>
diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c
index c415264cd98..4a91c2d939b 100644
--- a/storage/myisam/mi_create.c
+++ b/storage/myisam/mi_create.c
@@ -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>
diff --git a/storage/myisam/mi_log.c b/storage/myisam/mi_log.c
index 54498393f15..8de9e190d4a 100644
--- a/storage/myisam/mi_log.c
+++ b/storage/myisam/mi_log.c
@@ -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>
diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c
index 014cf1c5a2c..0a7ab397523 100644
--- a/storage/myisam/mi_open.c
+++ b/storage/myisam/mi_open.c
@@ -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"
diff --git a/storage/myisam/mi_static.c b/storage/myisam/mi_static.c
index 81d063a58fd..baa01a507eb 100644
--- a/storage/myisam/mi_static.c
+++ b/storage/myisam/mi_static.c
@@ -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 char *filename)= always_valid;
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
diff --git a/storage/myisam/mi_test2.c b/storage/myisam/mi_test2.c
index 60b16d5549e..94936ab84ae 100644
--- a/storage/myisam/mi_test2.c
+++ b/storage/myisam/mi_test2.c
@@ -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
diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h
index d88ebdf5f12..130a96bc9e0 100644
--- a/storage/myisam/myisamdef.h
+++ b/storage/myisam/myisamdef.h
@@ -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, const char *message,
/* 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);
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index 9f25a6bc112..4cd305fdc69 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -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
diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c
index a824de8c9fb..9532b9f0474 100644
--- a/storage/myisam/sort.c
+++ b/storage/myisam/sort.c
@@ -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_param)
/* 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_CACHE *to_file, uchar *bufs)
}
-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_SORT_PARAM *info,
} /* 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_PARAM *info, uchar *key,
/* 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_PARAM *info, register uchar **sort_keys,
/* 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_CACHE *fromfile, BUFFPEK *buffpek,
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(IO_CACHE *fromfile, BUFFPEK *buffpek,
} /* 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(MI_SORT_PARAM *info,
}
-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_SORT_PARAM *info __attribute__((unused)),
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)
{
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 966acdfa8f0..f5221bb3a21 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -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',
diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c
index 2e405eeaf06..67555ac4384 100644
--- a/strings/ctype-cp932.c
+++ b/strings/ctype-cp932.c
@@ -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',
diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c
index a5df86cc6b3..0095fe7f995 100644
--- a/strings/ctype-czech.c
+++ b/strings/ctype-czech.c
@@ -430,7 +430,7 @@ static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)),
#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,
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index 154d49ed085..c2067ac6f6b 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -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',
diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c
index 0a7f6be71cc..25c15a08d4e 100644
--- a/strings/ctype-eucjpms.c
+++ b/strings/ctype-eucjpms.c
@@ -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',
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index c3a52047977..46f3e9c6da5 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -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',
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index 52a8d994fa4..609bc2ecd27 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -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[256]=
-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,
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index 4face391f5e..90c76dc3c79 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -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',
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index a8c05dc4fd0..14b661ab0fc 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -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',
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index 0ea4a2617cb..4fabbdbaeb3 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -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',
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index b22b4364e8a..d9d092beb8f 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -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(CHARSET_INFO * cs __attribute__((unused)),
#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_win1250ch[]=
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,
diff --git a/strings/do_ctype.c b/strings/do_ctype.c
index f33ddc5eb81..d038d313a98 100644
--- a/strings/do_ctype.c
+++ b/strings/do_ctype.c
@@ -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)
{
diff --git a/strings/int2str.c b/strings/int2str.c
index fba98aac3f1..ecc214d58d5 100644
--- a/strings/int2str.c
+++ b/strings/int2str.c
@@ -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";
diff --git a/strings/strtol.c b/strings/strtol.c
index 42476b0226a..2f0a5286ee9 100644
--- a/strings/strtol.c
+++ b/strings/strtol.c
@@ -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
diff --git a/strings/strtoul.c b/strings/strtoul.c
index 3e2b51bc982..df5c46c220f 100644
--- a/strings/strtoul.c
+++ b/strings/strtoul.c
@@ -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