diff options
author | unknown <brian@zim.(none)> | 2006-04-15 08:49:00 -0700 |
---|---|---|
committer | unknown <brian@zim.(none)> | 2006-04-15 08:49:00 -0700 |
commit | 06e8697d04ea7ecc28aed3ae7d68a3156546004c (patch) | |
tree | 0016808c56b0545d9e84a1650e620b6bf9dc516b /include | |
parent | 1b2312211f3938a45a79ea49ead7f3660fbb2c3e (diff) | |
download | mariadb-git-06e8697d04ea7ecc28aed3ae7d68a3156546004c.tar.gz |
Another long patch to remove the rest of the OS2 support.
include/config-win.h:
Removing OS2 stuff
include/errmsg.h:
Removing OS2 stuff
include/m_string.h:
OS2 removal
include/my_global.h:
OS2 removal
include/my_net.h:
OS2 removal
include/my_no_pthread.h:
OS2 removal
include/my_pthread.h:
OS2 removal
include/thr_alarm.h:
OS2 removal
mysys/default.c:
OS2 removal
mysys/mf_path.c:
OS2 removal
mysys/mf_tempdir.c:
OS2 removal
mysys/mf_tempfile.c:
OS2 removal
mysys/my_access.c:
OS2 removal
mysys/my_clock.c:
OS2 removal
mysys/my_copy.c:
OS2 removal
mysys/my_create.c:
OS2 removal
mysys/my_dup.c:
OS2 removal
mysys/my_file.c:
OS2 removal
mysys/my_getwd.c:
OS2 removal
mysys/my_init.c:
OS2 removal
mysys/my_lib.c:
OS2 removal
mysys/my_lock.c:
OS2 removal
mysys/my_mkdir.c:
OS2 removal
mysys/my_open.c:
OS2 removal
mysys/my_pthread.c:
OS2 removal
mysys/my_redel.c:
OS2 removal
mysys/my_sleep.c:
OS2 removal
mysys/my_static.c:
OS2 removal
mysys/my_thr_init.c:
OS2 removal
mysys/thr_alarm.c:
OS2 removal
storage/myisam/myisamchk.c:
OS2 removal
Diffstat (limited to 'include')
-rw-r--r-- | include/config-win.h | 4 | ||||
-rw-r--r-- | include/errmsg.h | 4 | ||||
-rw-r--r-- | include/m_string.h | 4 | ||||
-rw-r--r-- | include/my_global.h | 27 | ||||
-rw-r--r-- | include/my_net.h | 6 | ||||
-rw-r--r-- | include/my_no_pthread.h | 2 | ||||
-rw-r--r-- | include/my_pthread.h | 45 | ||||
-rw-r--r-- | include/thr_alarm.h | 8 |
8 files changed, 12 insertions, 88 deletions
diff --git a/include/config-win.h b/include/config-win.h index 14afa38c8a7..b6fb1077cc6 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -122,12 +122,12 @@ functions */ /* Type information */ -#if defined(__EMX__) || !defined(HAVE_UINT) +#if !defined(HAVE_UINT) #undef HAVE_UINT #define HAVE_UINT typedef unsigned short ushort; typedef unsigned int uint; -#endif /* defined(__EMX__) || !defined(HAVE_UINT) */ +#endif /* !defined(HAVE_UINT) */ typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */ typedef __int64 longlong; diff --git a/include/errmsg.h b/include/errmsg.h index 1dd5759c104..4018e3ee01d 100644 --- a/include/errmsg.h +++ b/include/errmsg.h @@ -29,9 +29,7 @@ extern const char *client_errors[]; /* Error messages */ #define CR_MIN_ERROR 2000 /* For easier client code */ #define CR_MAX_ERROR 2999 -#if defined(OS2) && defined(MYSQL_SERVER) -#define CER(X) client_errors[(X)-CR_MIN_ERROR] -#elif !defined(ER) +#if !defined(ER) #define ER(X) client_errors[(X)-CR_MIN_ERROR] #endif #define CLIENT_ERRMAP 2 /* Errormap used by my_error() */ diff --git a/include/m_string.h b/include/m_string.h index c02ce92cd88..c580e38e177 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -84,7 +84,7 @@ # define bmove_align(A,B,C) memcpy((A),(B),(C)) #endif -#if defined(__cplusplus) && !defined(OS2) +#if defined(__cplusplus) extern "C" { #endif @@ -256,7 +256,7 @@ extern int my_vsnprintf( char *str, size_t n, const char *format, va_list ap ); extern int my_snprintf(char* to, size_t n, const char* fmt, ...); -#if defined(__cplusplus) && !defined(OS2) +#if defined(__cplusplus) } #endif #endif diff --git a/include/my_global.h b/include/my_global.h index 257d721ec95..500481fd6b8 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -254,7 +254,7 @@ #endif #endif -#if defined(THREAD) && !defined(__WIN__) && !defined(OS2) +#if defined(THREAD) && !defined(__WIN__) #ifndef _POSIX_PTHREAD_SEMANTICS #define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */ #endif @@ -459,9 +459,7 @@ extern "C" int madvise(void *addr, size_t len, int behav); #define POSIX_MISTAKE 1 /* regexp: Fix stupid spec error */ #define USE_REGEX 1 /* We want the use the regex library */ /* Do not define for ultra sparcs */ -#ifndef OS2 #define USE_BMOVE512 1 /* Use this unless system bmove is faster */ -#endif #define QUOTE_ARG(x) #x /* Quote argument (before cpp) */ #define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */ @@ -506,7 +504,7 @@ int __void__; #define min(a, b) ((a) < (b) ? (a) : (b)) #endif -#if defined(__EMX__) || !defined(HAVE_UINT) +#if !defined(HAVE_UINT) #undef HAVE_UINT #define HAVE_UINT typedef unsigned int uint; @@ -684,14 +682,9 @@ typedef SOCKET_SIZE_TYPE size_socket; #define FN_DEVCHAR ':' #ifndef FN_LIBCHAR -#ifdef __EMX__ -#define FN_LIBCHAR '\\' -#define FN_ROOTDIR "\\" -#else #define FN_LIBCHAR '/' #define FN_ROOTDIR "/" #endif -#endif #define MY_NFILE 64 /* This is only used to save filenames */ #ifndef OS_FILE_LIMIT #define OS_FILE_LIMIT 65535 @@ -738,11 +731,7 @@ typedef SOCKET_SIZE_TYPE size_socket; #undef remove /* Crashes MySQL on SCO 5.0.0 */ #ifndef __WIN__ -#ifdef OS2 -#define closesocket(A) soclose(A) -#else #define closesocket(A) close(A) -#endif #ifndef ulonglong2double #define ulonglong2double(A) ((double) (ulonglong) (A)) #define my_off_t2double(A) ((double) (my_off_t) (A)) @@ -951,7 +940,7 @@ typedef ulonglong my_off_t; typedef unsigned long my_off_t; #endif #define MY_FILEPOS_ERROR (~(my_off_t) 0) -#if !defined(__WIN__) && !defined(OS2) +#if !defined(__WIN__) typedef off_t os_off_t; #endif @@ -964,16 +953,6 @@ typedef off_t os_off_t; #define SOCKET_EADDRINUSE WSAEADDRINUSE #define SOCKET_ENFILE ENFILE #define SOCKET_EMFILE EMFILE -#elif defined(OS2) -#define socket_errno sock_errno() -#define SOCKET_EINTR SOCEINTR -#define SOCKET_EAGAIN SOCEINPROGRESS -#define SOCKET_ETIMEDOUT SOCKET_EINTR -#define SOCKET_EWOULDBLOCK SOCEWOULDBLOCK -#define SOCKET_EADDRINUSE SOCEADDRINUSE -#define SOCKET_ENFILE SOCENFILE -#define SOCKET_EMFILE SOCEMFILE -#define closesocket(A) soclose(A) #else /* Unix */ #define socket_errno errno #define closesocket(A) close(A) diff --git a/include/my_net.h b/include/my_net.h index 71914964e46..f953a832e6b 100644 --- a/include/my_net.h +++ b/include/my_net.h @@ -53,12 +53,6 @@ C_MODE_START #endif #endif -#if defined(__EMX__) -#include <sys/ioctl.h> -#define ioctlsocket(A,B,C) ioctl((A),(B),(void *)(C),sizeof(*(C))) -#undef HAVE_FCNTL -#endif /* defined(__EMX__) */ - #if defined(MSDOS) || defined(__WIN__) #define O_NONBLOCK 1 /* For emulation of fcntl() */ #endif diff --git a/include/my_no_pthread.h b/include/my_no_pthread.h index 5691de08783..f86e8e60642 100644 --- a/include/my_no_pthread.h +++ b/include/my_no_pthread.h @@ -26,7 +26,7 @@ even in non-threaded builds. Case in point: 'mf_keycache.c' */ -#if defined(__WIN__) || defined(OS2) +#if defined(__WIN__) #elif defined(HAVE_UNIXWARE7_THREADS) /* #include <thread.h> Currently, not relevant. Enable if needed. */ diff --git a/include/my_pthread.h b/include/my_pthread.h index 9146cab8589..c05907b47fa 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -31,19 +31,9 @@ extern "C" { #define EXTERNC #endif /* __cplusplus */ -#if defined(__WIN__) || defined(OS2) +#if defined(__WIN__) -#ifdef OS2 -typedef ULONG HANDLE; -typedef ULONG DWORD; -typedef int sigset_t; -#endif - -#ifdef OS2 -typedef HMTX pthread_mutex_t; -#else typedef CRITICAL_SECTION pthread_mutex_t; -#endif typedef HANDLE pthread_t; typedef struct thread_attr { DWORD dwStackSize ; @@ -62,30 +52,19 @@ typedef struct st_pthread_link { typedef struct { uint32 waiting; -#ifdef OS2 - HEV semaphore; -#else HANDLE semaphore; -#endif } pthread_cond_t; -#ifndef OS2 struct timespec { /* For pthread_cond_timedwait() */ time_t tv_sec; long tv_nsec; }; -#endif typedef int pthread_mutexattr_t; #define win_pthread_self my_thread_var->pthread_self -#ifdef OS2 -#define pthread_handler_t EXTERNC void * _Optlink -typedef void * (_Optlink *pthread_handler)(void *); -#else #define pthread_handler_t EXTERNC void * __cdecl typedef void * (__cdecl *pthread_handler)(void *); -#endif void win_pthread_init(void); int win_pthread_setspecific(void *A,void *B,uint length); @@ -107,10 +86,8 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp); void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ -#ifndef OS2 #define ETIMEDOUT 145 /* Win32 doesn't have this */ #define getpid() GetCurrentThreadId() -#endif #define pthread_self() win_pthread_self #define HAVE_LOCALTIME_R 1 #define _REENTRANT 1 @@ -145,15 +122,6 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ #endif /* USE_TLS */ #define pthread_equal(A,B) ((A) == (B)) -#ifdef OS2 -extern int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *); -extern int pthread_mutex_lock (pthread_mutex_t *); -extern int pthread_mutex_unlock (pthread_mutex_t *); -extern int pthread_mutex_destroy (pthread_mutex_t *); -#define my_pthread_setprio(A,B) DosSetPriority(PRTYS_THREAD,PRTYC_NOCHANGE, B, A) -#define pthread_kill(A,B) raise(B) -#define pthread_exit(A) pthread_dummy() -#else #define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0) #define pthread_mutex_lock(A) (EnterCriticalSection(A),0) #define pthread_mutex_trylock(A) (WaitForSingleObject((A), 0) == WAIT_TIMEOUT) @@ -161,7 +129,6 @@ extern int pthread_mutex_destroy (pthread_mutex_t *); #define pthread_mutex_destroy(A) DeleteCriticalSection(A) #define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B)) #define pthread_kill(A,B) pthread_dummy(0) -#endif /* OS2 */ /* Dummy defines for easier code */ #define pthread_attr_setdetachstate(A,B) pthread_dummy(0) @@ -257,9 +224,6 @@ extern int my_sigwait(const sigset_t *set,int *sig); #ifdef HAVE_SYNCH_H #include <synch.h> #endif -#if defined(__EMX__) && (!defined(EMX_PTHREAD_REV) || (EMX_PTHREAD_REV < 2)) -#error Requires at least rev 2 of EMX pthreads library. -#endif #ifdef __NETWARE__ void my_pthread_exit(void *status); @@ -382,15 +346,12 @@ extern int my_pthread_cond_timedwait(pthread_cond_t *cond, #define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C)) #endif -#if defined(OS2) -#define my_pthread_getspecific(T,A) ((T) &(A)) -#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A)) -#elif !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC) +#if !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC) #define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B)) #else #define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B)) void *my_pthread_getspecific_imp(pthread_key_t key); -#endif /* OS2 */ +#endif #ifndef HAVE_LOCALTIME_R struct tm *localtime_r(const time_t *clock, struct tm *res); diff --git a/include/thr_alarm.h b/include/thr_alarm.h index 7a10d6886ce..c49bc2588d1 100644 --- a/include/thr_alarm.h +++ b/include/thr_alarm.h @@ -73,14 +73,6 @@ typedef struct st_thr_alarm_entry rf_SetTimer crono; } thr_alarm_entry; -#elif defined(__EMX__) || defined(OS2) - -typedef struct st_thr_alarm_entry -{ - uint crono; - uint event; -} thr_alarm_entry; - #else /* System with posix threads */ typedef int thr_alarm_entry; |