WL#5486: Remove code for unsupported platforms

Remove MS-DOS specific code.
This commit is contained in:
Davi Arnaut 2010-07-15 08:16:06 -03:00
parent 07e7b4d6fe
commit 13f7a1d244
43 changed files with 225 additions and 483 deletions

View File

@ -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},

View File

@ -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;
@ -2263,42 +2251,6 @@ static BOOLEAN Writable(const char *pathname)
#endif
/*
* 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
*
@ -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
/*

View File

@ -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 */

View File

@ -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)

View File

@ -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) */

View File

@ -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);

View File

@ -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

View File

@ -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) (),

View File

@ -15,17 +15,15 @@
#ifndef _mysys_err_h
#define _mysys_err_h
#ifdef __cplusplus
#include "my_global.h" /* NEAR */
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 */
/*

View File

@ -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

View File

@ -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)
{
mysql_port = MYSQL_PORT;
#ifndef MSDOS
{
struct servent *serv_ptr __attribute__((unused));
char *env;
char *env;
struct servent *serv_ptr __attribute__((unused));
/*
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.
*/
mysql_port = MYSQL_PORT;
/*
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)
{

View File

@ -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

View File

@ -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)",

View File

@ -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) \
{ \

View File

@ -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 */

View File

@ -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 != '/'
{

View File

@ -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>

View File

@ -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

View File

@ -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];

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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)
{

View File

@ -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',

View File

@ -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',

View File

@ -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,

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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,

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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,

View File

@ -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)
{

View File

@ -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";

View File

@ -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

View File

@ -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