mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Drop a number of OS2 specific files.
This commit is contained in:
parent
8f635a9789
commit
eaf850ef5b
43 changed files with 3 additions and 7442 deletions
|
@ -37,7 +37,7 @@ DIST_SUBDIRS = . include @docs_dirs@ zlib \
|
|||
strings mysys dbug extra regex storage \
|
||||
vio sql libmysql_r libmysql client scripts \
|
||||
@man_dirs@ tests SSL\
|
||||
BUILD netware os2 @libmysqld_dirs@\
|
||||
BUILD netware @libmysqld_dirs@\
|
||||
@bench_dirs@ support-files server-tools tools \
|
||||
plugin win
|
||||
|
||||
|
|
|
@ -2604,7 +2604,6 @@ AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
|
|||
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
|
||||
strings/Makefile regex/Makefile storage/Makefile storage/heap/Makefile dnl
|
||||
storage/myisam/Makefile storage/myisammrg/Makefile dnl
|
||||
os2/Makefile os2/include/Makefile os2/include/sys/Makefile dnl
|
||||
man/Makefile BUILD/Makefile vio/Makefile dnl
|
||||
libmysql/Makefile client/Makefile dnl
|
||||
pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile dnl
|
||||
|
|
|
@ -23,7 +23,7 @@ pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \
|
|||
my_getopt.h sslopt-longopts.h my_dir.h typelib.h \
|
||||
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
|
||||
mysql_time.h mysql/plugin.h $(BUILT_SOURCES)
|
||||
noinst_HEADERS = config-win.h config-os2.h config-netware.h \
|
||||
noinst_HEADERS = config-win.h config-netware.h \
|
||||
heap.h my_bitmap.h my_uctype.h \
|
||||
myisam.h myisampack.h myisammrg.h ft_global.h\
|
||||
mysys_err.h my_base.h help_start.h help_end.h \
|
||||
|
|
|
@ -1,835 +0,0 @@
|
|||
/* Copyright (C) 2000 MySQL AB & Yuri Dario
|
||||
All the above parties has a full, independent copyright to
|
||||
the following code, including the right to use the code in
|
||||
any manner without any demands from the other parties.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
/* Defines for OS2 to make it compatible for MySQL */
|
||||
|
||||
#ifndef __CONFIG_OS2_H__
|
||||
#define __CONFIG_OS2_H__
|
||||
|
||||
#include <os2.h>
|
||||
#include <math.h>
|
||||
#include <io.h>
|
||||
#include <types.h>
|
||||
|
||||
/* Define to name of system eg solaris*/
|
||||
#define SYSTEM_TYPE "IBM OS/2 Warp"
|
||||
/* Define to machine type name eg sun10 */
|
||||
#define MACHINE_TYPE "i686"
|
||||
/* Name of package */
|
||||
#define PACKAGE "mysql"
|
||||
/* Version number of package */
|
||||
#define VERSION MYSQL_SERVER_VERSION
|
||||
/* Default socket */
|
||||
#define MYSQL_UNIX_ADDR "\\socket\\MySQL"
|
||||
|
||||
#define FN_LIBCHAR '\\'
|
||||
#define FN_ROOTDIR "\\"
|
||||
#define MY_NFILE 1024 /* This is only used to save filenames */
|
||||
|
||||
#define HAVE_ACCESS
|
||||
|
||||
#define DEFAULT_MYSQL_HOME "c:\\mysql"
|
||||
#define DEFAULT_BASEDIR "C:\\"
|
||||
#define SHAREDIR "share"
|
||||
#define DEFAULT_CHARSET_HOME "C:/mysql/"
|
||||
#define _POSIX_PATH_MAX 255
|
||||
#define DWORD ULONG
|
||||
|
||||
#define O_SHARE 0x1000 /* Open file in sharing mode */
|
||||
#define FILE_BINARY O_BINARY /* my_fopen in binary mode */
|
||||
#define S_IROTH S_IREAD /* for my_lib */
|
||||
|
||||
#define CANT_DELETE_OPEN_FILES /* saves open files in a list, for delayed delete */
|
||||
|
||||
#define O_NONBLOCK 0x10
|
||||
|
||||
#define NO_OPEN_3 /* For my_create() */
|
||||
#define SIGQUIT SIGTERM /* No SIGQUIT */
|
||||
#define SIGALRM 14 /* Alarm */
|
||||
|
||||
#define NO_FCNTL_NONBLOCK
|
||||
|
||||
#define EFBIG E2BIG
|
||||
/*#define ENFILE EMFILE */
|
||||
/*#define ENAMETOOLONG (EOS2ERR+2) */
|
||||
/*#define ETIMEDOUT 145 */
|
||||
/*#define EPIPE 146 */
|
||||
#define EROFS 147
|
||||
|
||||
#define sleep(A) DosSleep((A)*1000)
|
||||
#define closesocket(A) soclose(A)
|
||||
|
||||
#define F_OK 0
|
||||
#define W_OK 2
|
||||
|
||||
#define bzero(x,y) memset((x),'\0',(y))
|
||||
#define bcopy(x,y,z) memcpy((y),(x),(z))
|
||||
#define bcmp(x,y,z) memcmp((y),(x),(z))
|
||||
|
||||
#define F_RDLCK 4 /* Read lock. */
|
||||
#define F_WRLCK 2 /* Write lock. */
|
||||
#define F_UNLCK 0 /* Remove lock. */
|
||||
|
||||
#define S_IFMT 0x17000 /* Mask for file type */
|
||||
#define F_TO_EOF 0L /* Param to lockf() to lock rest of file */
|
||||
|
||||
#define HUGE_PTR
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
double _cdecl rint( double nr);
|
||||
|
||||
DWORD TlsAlloc( void);
|
||||
BOOL TlsFree( DWORD);
|
||||
PVOID TlsGetValue( DWORD);
|
||||
BOOL TlsSetValue( DWORD, PVOID);
|
||||
|
||||
/* support for > 2GB file size */
|
||||
#define SIZEOF_OFF_T 8
|
||||
#define lseek(A,B,C) _lseek64( A, B, C)
|
||||
#define tell(A) _lseek64( A, 0, SEEK_CUR)
|
||||
|
||||
void* dlopen( char* path, int flag);
|
||||
char* dlerror( void);
|
||||
void* dlsym( void* hmod, char* fn);
|
||||
void dlclose( void* hmod);
|
||||
|
||||
/* Some typedefs */
|
||||
typedef unsigned long long os_off_t;
|
||||
|
||||
/* config.h. Generated automatically by configure. */
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
||||
This function is required for alloca.c support on those systems. */
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define if you have alloca, as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #define HAVE_ALLOCA_H 1 */
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if system calls automatically restart after interruption
|
||||
by a signal. */
|
||||
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
||||
|
||||
/* Define if your struct stat has st_rdev. */
|
||||
#define HAVE_ST_RDEV 1
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
/* #define HAVE_SYS_WAIT_H 1 */
|
||||
|
||||
/* Define if you don't have tm_zone but do have the external array
|
||||
tzname. */
|
||||
#define HAVE_TZNAME 1
|
||||
|
||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||
#define HAVE_UTIME_NULL 1
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define as __inline if that's what the C compiler calls it. */
|
||||
/* #undef inline */
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
#define STACK_DIRECTION -1
|
||||
|
||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if your <sys/time.h> declares struct tm. */
|
||||
/* #undef TM_IN_SYS_TIME */
|
||||
|
||||
/* Define if your processor stores words with the most significant
|
||||
byte first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
/* #undef WORDS_BIGENDIAN */
|
||||
|
||||
/* Version of .frm files */
|
||||
#define DOT_FRM_VERSION 6
|
||||
|
||||
/* READLINE: */
|
||||
#define FIONREAD_IN_SYS_IOCTL 1
|
||||
|
||||
/* READLINE: Define if your system defines TIOCGWINSZ in sys/ioctl.h. */
|
||||
/* #undef GWINSZ_IN_SYS_IOCTL */
|
||||
|
||||
/* Do we have FIONREAD */
|
||||
#define FIONREAD_IN_SYS_IOCTL 1
|
||||
|
||||
/* atomic_add() from <asm/atomic.h> (Linux only) */
|
||||
/* #undef HAVE_ATOMIC_ADD */
|
||||
|
||||
/* atomic_sub() from <asm/atomic.h> (Linux only) */
|
||||
/* #undef HAVE_ATOMIC_SUB */
|
||||
|
||||
/* bool is not defined by all C++ compilators */
|
||||
#define HAVE_BOOL 1
|
||||
|
||||
/* Have berkeley db installed */
|
||||
/* #define HAVE_BERKELEY_DB 1 */
|
||||
|
||||
/* DSB style signals ? */
|
||||
/* #undef HAVE_BSD_SIGNALS */
|
||||
|
||||
/* Can netinet be included */
|
||||
/* #undef HAVE_BROKEN_NETINET_INCLUDES */
|
||||
|
||||
/* READLINE: */
|
||||
/* #undef HAVE_BSD_SIGNALS */
|
||||
|
||||
/* ZLIB and compress: */
|
||||
#define HAVE_COMPRESS 1
|
||||
|
||||
/* Define if we are using OSF1 DEC threads */
|
||||
/* #undef HAVE_DEC_THREADS */
|
||||
|
||||
/* Define if we are using OSF1 DEC threads on 3.2 */
|
||||
/* #undef HAVE_DEC_3_2_THREADS */
|
||||
|
||||
/* fp_except from ieeefp.h */
|
||||
/* #undef HAVE_FP_EXCEPT */
|
||||
|
||||
/* READLINE: */
|
||||
/* #undef HAVE_GETPW_DECLS */
|
||||
|
||||
/* Solaris define gethostbyname_r with 5 arguments. glibc2 defines
|
||||
this with 6 arguments */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE */
|
||||
|
||||
/* In OSF 4.0f the 3'd argument to gethostname_r is hostent_data * */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_RETURN_INT */
|
||||
|
||||
/* Define if int8, int16 and int32 types exist */
|
||||
/* #undef HAVE_INT_8_16_32 */
|
||||
|
||||
/* Define if have -lwrap */
|
||||
/* #undef HAVE_LIBWRAP */
|
||||
|
||||
/* Define if we are using Xavier Leroy's LinuxThreads */
|
||||
/* #undef HAVE_LINUXTHREADS */
|
||||
|
||||
/* Do we use user level threads */
|
||||
/* #undef HAVE_mit_thread */
|
||||
|
||||
/* For some non posix threads */
|
||||
/* #undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC */
|
||||
|
||||
/* For some non posix threads */
|
||||
/* #undef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
|
||||
|
||||
/* READLINE: */
|
||||
#define HAVE_POSIX_SIGNALS 0
|
||||
|
||||
/* sigwait with one argument */
|
||||
/* #undef HAVE_NONPOSIX_SIGWAIT */
|
||||
|
||||
/* pthread_attr_setscope */
|
||||
#define HAVE_PTHREAD_ATTR_SETSCOPE 1
|
||||
|
||||
/* POSIX readdir_r */
|
||||
/* #undef HAVE_READDIR_R */
|
||||
|
||||
/* POSIX sigwait */
|
||||
/* #undef HAVE_SIGWAIT */
|
||||
|
||||
/* crypt */
|
||||
#define HAVE_CRYPT 1
|
||||
|
||||
/* Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines
|
||||
this with 8 arguments */
|
||||
/* #undef HAVE_SOLARIS_STYLE_GETHOST */
|
||||
|
||||
/* Timespec has a ts_sec instead of tv_sev */
|
||||
#define HAVE_TIMESPEC_TS_SEC 1
|
||||
|
||||
/* Have the tzname variable */
|
||||
#define HAVE_TZNAME 1
|
||||
|
||||
/* Define if the system files define uchar */
|
||||
/* #undef HAVE_UCHAR */
|
||||
|
||||
/* Define if the system files define uint */
|
||||
/* #undef HAVE_UINT */
|
||||
|
||||
/* Define if the system files define ulong */
|
||||
/* #undef HAVE_ULONG */
|
||||
|
||||
/* UNIXWARE7 threads are not posix */
|
||||
/* #undef HAVE_UNIXWARE7_THREADS */
|
||||
|
||||
/* new UNIXWARE7 threads that are not yet posix */
|
||||
/* #undef HAVE_UNIXWARE7_POSIX */
|
||||
|
||||
/* READLINE: */
|
||||
/* #undef HAVE_USG_SIGHOLD */
|
||||
|
||||
/* Define if want -lwrap */
|
||||
/* #undef LIBWRAP */
|
||||
|
||||
/* mysql client protocoll version */
|
||||
#define PROTOCOL_VERSION 10
|
||||
|
||||
/* Define if qsort returns void */
|
||||
#define QSORT_TYPE_IS_VOID 1
|
||||
|
||||
/* Define as the return type of qsort (int or void). */
|
||||
#define RETQSORTTYPE void
|
||||
|
||||
/* Define as the base type of the last arg to accept */
|
||||
#define SOCKET_SIZE_TYPE int
|
||||
|
||||
/* Last argument to get/setsockopt */
|
||||
/* #undef SOCKOPT_OPTLEN_TYPE */
|
||||
|
||||
/* #undef SPEED_T_IN_SYS_TYPES */
|
||||
/* #undef SPRINTF_RETURNS_PTR */
|
||||
#define SPRINTF_RETURNS_INT 1
|
||||
/* #undef SPRINTF_RETURNS_GARBAGE */
|
||||
|
||||
/* #undef STRUCT_DIRENT_HAS_D_FILENO */
|
||||
#define STRUCT_DIRENT_HAS_D_INO 1
|
||||
|
||||
/* Define if you want to have threaded code. This may be undef on client code */
|
||||
#define THREAD 1
|
||||
|
||||
/* Should be client be thread safe */
|
||||
/* #undef THREAD_SAFE_CLIENT */
|
||||
|
||||
/* READLINE: */
|
||||
/* #undef TIOCSTAT_IN_SYS_IOCTL */
|
||||
|
||||
/* Use multi-byte character routines */
|
||||
/* #undef USE_MB */
|
||||
/* #undef USE_MB_IDENT */
|
||||
|
||||
/* Use MySQL RAID */
|
||||
/* #undef USE_RAID */
|
||||
|
||||
/* Use strcoll() functions when comparing and sorting. */
|
||||
/* #undef USE_STRCOLL */
|
||||
|
||||
/* READLINE: */
|
||||
#define VOID_SIGHANDLER 1
|
||||
|
||||
/* The number of bytes in a char. */
|
||||
#define SIZEOF_CHAR 1
|
||||
|
||||
/* The number of bytes in a int. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The number of bytes in a long. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* The number of bytes in a long long. */
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/* Define if you have the alarm function. */
|
||||
#define HAVE_ALARM 1
|
||||
|
||||
/* Define if you have the atod function. */
|
||||
/* #undef HAVE_ATOD */
|
||||
|
||||
/* Define if you have the bcmp function. */
|
||||
#define HAVE_BCMP 1
|
||||
|
||||
/* Define if you have the bfill function. */
|
||||
/* #undef HAVE_BFILL */
|
||||
|
||||
/* Define if you have the bmove function. */
|
||||
/* #undef HAVE_BMOVE */
|
||||
|
||||
/* Define if you have the bzero function. */
|
||||
#define HAVE_BZERO 1
|
||||
|
||||
/* Define if you have the chsize function. */
|
||||
#define HAVE_CHSIZE 1
|
||||
|
||||
/* Define if you have the cuserid function. */
|
||||
/* #define HAVE_CUSERID 1 */
|
||||
|
||||
/* Define if you have the dlerror function. */
|
||||
#define HAVE_DLERROR 1
|
||||
|
||||
/* Define if you have the dlopen function. */
|
||||
#define HAVE_DLOPEN 1
|
||||
|
||||
/* Define if you have the fchmod function. */
|
||||
/* #undef HAVE_FCHMOD */
|
||||
|
||||
/* Define if you have the fcntl function. */
|
||||
/* #define HAVE_FCNTL 1 */
|
||||
|
||||
/* Define if you have the fconvert function. */
|
||||
/* #undef HAVE_FCONVERT */
|
||||
|
||||
/* Define if you have the finite function. */
|
||||
/* #undef HAVE_FINITE */
|
||||
|
||||
/* Define if you have the fpresetsticky function. */
|
||||
/* #undef HAVE_FPRESETSTICKY */
|
||||
|
||||
/* Define if you have the fpsetmask function. */
|
||||
/* #undef HAVE_FPSETMASK */
|
||||
|
||||
/* Define if you have the fseeko function. */
|
||||
/* #undef HAVE_FSEEKO */
|
||||
|
||||
/* Define if you have the ftruncate function. */
|
||||
/* #define HAVE_FTRUNCATE 1 */
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the gethostbyaddr_r function. */
|
||||
/* #undef HAVE_GETHOSTBYADDR_R */
|
||||
|
||||
/* Define if you have the gethostbyname_r function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R */
|
||||
|
||||
/* Define if you have the getpagesize function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define if you have the getpass function. */
|
||||
/*#define HAVE_GETPASS 1 */
|
||||
|
||||
/* Define if you have the getpassphrase function. */
|
||||
/* #undef HAVE_GETPASSPHRASE */
|
||||
|
||||
/* Define if you have the getpwnam function. */
|
||||
/* #define HAVE_GETPWNAM 1 */
|
||||
|
||||
/* Define if you have the getpwuid function. */
|
||||
/* #define HAVE_GETPWUID 1 */
|
||||
|
||||
/* Define if you have the getrlimit function. */
|
||||
/* #undef HAVE_GETRLIMIT */
|
||||
|
||||
/* Define if you have the getrusage function. */
|
||||
/* #undef HAVE_GETRUSAGE */
|
||||
|
||||
/* Define if you have the getwd function. */
|
||||
#define HAVE_GETWD 1
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
#define HAVE_GMTIME_R 1
|
||||
|
||||
/* Define if you have the index function. */
|
||||
#define HAVE_INDEX 1
|
||||
|
||||
/* Define if you have the initgroups function. */
|
||||
/* #undef HAVE_INITGROUPS */
|
||||
|
||||
/* Define if you have the localtime_r function. */
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
|
||||
/* Define if you have the locking function. */
|
||||
/* #undef HAVE_LOCKING */
|
||||
|
||||
/* Define if you have the longjmp function. */
|
||||
#define HAVE_LONGJMP 1
|
||||
|
||||
/* Define if you have the lrand48 function. */
|
||||
/* #undef HAVE_LRAND48 */
|
||||
|
||||
/* Define if you have the lstat function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define if you have the madvise function. */
|
||||
/* #undef HAVE_MADVISE */
|
||||
|
||||
/* Define if you have the memcpy function. */
|
||||
#define HAVE_MEMCPY 1
|
||||
|
||||
/* Define if you have the memmove function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define if you have the mkstemp function. */
|
||||
/* #define HAVE_MKSTEMP 1 */
|
||||
|
||||
/* Define if you have the mlockall function. */
|
||||
/* #undef HAVE_MLOCKALL */
|
||||
|
||||
/* Define if you have the perror function. */
|
||||
#define HAVE_PERROR 1
|
||||
|
||||
/* Define if you have the poll function. */
|
||||
/* #undef HAVE_POLL */
|
||||
|
||||
/* Define if you have the pread function. */
|
||||
/* #undef HAVE_PREAD */
|
||||
|
||||
/* Define if you have the pthread_attr_create function. */
|
||||
/* #undef HAVE_PTHREAD_ATTR_CREATE */
|
||||
|
||||
/* Define if you have the pthread_attr_setprio function. */
|
||||
#define HAVE_PTHREAD_ATTR_SETPRIO 1
|
||||
|
||||
/* Define if you have the pthread_attr_setschedparam function. */
|
||||
/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */
|
||||
|
||||
/* Define if you have the pthread_attr_setstacksize function. */
|
||||
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
|
||||
|
||||
/* Define if you have the pthread_condattr_create function. */
|
||||
/* #undef HAVE_PTHREAD_CONDATTR_CREATE */
|
||||
|
||||
/* Define if you have the pthread_getsequence_np function. */
|
||||
/* #undef HAVE_PTHREAD_GETSEQUENCE_NP */
|
||||
|
||||
/* Define if you have the pthread_init function. */
|
||||
/* #undef HAVE_PTHREAD_INIT */
|
||||
|
||||
/* Define if you have the pthread_rwlock_rdlock function. */
|
||||
/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK */
|
||||
|
||||
/* Define if you have the pthread_setprio function. */
|
||||
#define HAVE_PTHREAD_SETPRIO 1
|
||||
|
||||
/* Define if you have the pthread_setprio_np function. */
|
||||
/* #undef HAVE_PTHREAD_SETPRIO_NP */
|
||||
|
||||
/* Define if you have the pthread_setschedparam function. */
|
||||
/* #undef HAVE_PTHREAD_SETSCHEDPARAM */
|
||||
|
||||
/* Define if you have the pthread_sigmask function. */
|
||||
#define HAVE_PTHREAD_SIGMASK 1
|
||||
|
||||
/* Define if you have the putenv function. */
|
||||
#define HAVE_PUTENV 1
|
||||
|
||||
/* Define if you have the readlink function. */
|
||||
/* #undef HAVE_READLINK */
|
||||
|
||||
/* Define if you have the realpath function. */
|
||||
/* #undef HAVE_REALPATH */
|
||||
|
||||
/* Define if you have the rename function. */
|
||||
#define HAVE_RENAME 1
|
||||
|
||||
/* Define if you have the rint function. */
|
||||
#define HAVE_RINT 1
|
||||
|
||||
/* Define if you have the rwlock_init function. */
|
||||
/* #undef HAVE_RWLOCK_INIT */
|
||||
|
||||
/* Define if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define if you have the setenv function. */
|
||||
/* #undef HAVE_SETENV */
|
||||
|
||||
/* Define if you have the setlocale function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define if you have the setupterm function. */
|
||||
/* #undef HAVE_SETUPTERM */
|
||||
|
||||
/* Define if you have the sighold function. */
|
||||
/* #undef HAVE_SIGHOLD */
|
||||
|
||||
/* Define if you have the sigset function. */
|
||||
/* #undef HAVE_SIGSET */
|
||||
|
||||
/* Define if you have the sigthreadmask function. */
|
||||
/* #undef HAVE_SIGTHREADMASK */
|
||||
|
||||
/* Define if you have the snprintf function. */
|
||||
/* #define HAVE_SNPRINTF 1 */
|
||||
|
||||
/* Define if you have the socket function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define if you have the stpcpy function. */
|
||||
/* #undef HAVE_STPCPY */
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
/* #undef HAVE_STRCASECMP */
|
||||
|
||||
/* Define if you have the strcoll function. */
|
||||
#define HAVE_STRCOLL 1
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define if you have the strnlen function. */
|
||||
/* #undef HAVE_STRNLEN */
|
||||
|
||||
/* Define if you have the strpbrk function. */
|
||||
#define HAVE_STRPBRK 1
|
||||
|
||||
/* Define if you have the strstr function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define if you have the strtok_r function. */
|
||||
/* #undef HAVE_STRTOK_R */
|
||||
|
||||
/* Define if you have the strtol function. */
|
||||
#define HAVE_STRTOL 1
|
||||
|
||||
/* Define if you have the strtoul function. */
|
||||
#define HAVE_STRTOUL 1
|
||||
|
||||
/* Define if you have the strtoull function. */
|
||||
/* #undef HAVE_STRTOULL */
|
||||
|
||||
/* Define if you have the tcgetattr function. */
|
||||
#define HAVE_TCGETATTR 1
|
||||
|
||||
/* Define if you have the tell function. */
|
||||
#define HAVE_TELL 1
|
||||
|
||||
/* Define if you have the tempnam function. */
|
||||
#define HAVE_TEMPNAM 1
|
||||
|
||||
/* Define if you have the thr_setconcurrency function. */
|
||||
/* #undef HAVE_THR_SETCONCURRENCY */
|
||||
|
||||
/* Define if you have the vidattr function. */
|
||||
/* #undef HAVE_VIDATTR */
|
||||
|
||||
/* Define if you have the <alloca.h> header file. */
|
||||
/* #define HAVE_ALLOCA_H 1 */
|
||||
|
||||
/* Define if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define if you have the <asm/termbits.h> header file. */
|
||||
/* #undef HAVE_ASM_TERMBITS_H */
|
||||
|
||||
/* Define if you have the <crypt.h> header file. */
|
||||
#define HAVE_CRYPT_H 1
|
||||
|
||||
/* Define if you have the <curses.h> header file. */
|
||||
/* #define HAVE_CURSES_H 1 */
|
||||
|
||||
/* Define if you have the <dirent.h> header file. */
|
||||
/* #define HAVE_DIRENT_H 1 */
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define if you have the <float.h> header file. */
|
||||
#define HAVE_FLOAT_H 1
|
||||
|
||||
/* Define if you have the <floatingpoint.h> header file. */
|
||||
/* #undef HAVE_FLOATINGPOINT_H */
|
||||
|
||||
/* Define if you have the <grp.h> header file. */
|
||||
/* #define HAVE_GRP_H 1 */
|
||||
|
||||
/* Define if you have the <ieeefp.h> header file. */
|
||||
/* #undef HAVE_IEEEFP_H */
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have the <ndir.h> header file. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Define if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define if you have the <paths.h> header file. */
|
||||
/* #undef HAVE_PATHS_H */
|
||||
|
||||
/* Define if you have the <pwd.h> header file. */
|
||||
/* #define HAVE_PWD_H 1 */
|
||||
|
||||
/* Define if you have the <sched.h> header file. */
|
||||
/* #undef HAVE_SCHED_H */
|
||||
|
||||
/* Define if you have the <select.h> header file. */
|
||||
/* #undef HAVE_SELECT_H */
|
||||
|
||||
/* Define if you have the <stdarg.h> header file. */
|
||||
#define HAVE_STDARG_H 1
|
||||
|
||||
/* Define if you have the <stddef.h> header file. */
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
/* #define HAVE_STRINGS_H 1 */
|
||||
|
||||
/* Define if you have the <synch.h> header file. */
|
||||
/* #undef HAVE_SYNCH_H */
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file. */
|
||||
/* #define HAVE_SYS_DIR_H 1 */
|
||||
|
||||
/* Define if you have the <sys/file.h> header file. */
|
||||
/* #define HAVE_SYS_FILE_H 1 */
|
||||
|
||||
/* Define if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define if you have the <sys/mman.h> header file. */
|
||||
/* #undef HAVE_SYS_MMAN_H */
|
||||
|
||||
/* Define if you have the <sys/ndir.h> header file. */
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define if you have the <sys/pte.h> header file. */
|
||||
/* #undef HAVE_SYS_PTE_H */
|
||||
|
||||
/* Define if you have the <sys/ptem.h> header file. */
|
||||
/* #undef HAVE_SYS_PTEM_H */
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define if you have the <sys/stream.h> header file. */
|
||||
/* #undef HAVE_SYS_STREAM_H */
|
||||
|
||||
/* Define if you have the <sys/timeb.h> header file. */
|
||||
#define HAVE_SYS_TIMEB_H 1
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define if you have the <sys/un.h> header file. */
|
||||
#define HAVE_SYS_UN_H 1
|
||||
|
||||
/* Define if you have the <sys/utime.h> header file. */
|
||||
#define HAVE_SYS_UTIME_H 1
|
||||
|
||||
/* Define if you have the <sys/vadvise.h> header file. */
|
||||
/* #undef HAVE_SYS_VADVISE_H */
|
||||
|
||||
/* Define if you have the <sys/wait.h> header file. */
|
||||
/* #define HAVE_SYS_WAIT_H 1 */
|
||||
|
||||
/* Define if you have the <term.h> header file. */
|
||||
/* #undef HAVE_TERM_H */
|
||||
|
||||
/* Define if you have the <termbits.h> header file. */
|
||||
/* #undef HAVE_TERMBITS_H */
|
||||
|
||||
/* Define if you have the <termcap.h> header file. */
|
||||
/* #define HAVE_TERMCAP_H 1 */
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
/* /#define HAVE_TERMIO_H 1 */
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
/* #define HAVE_TERMIOS_H 1 */
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define if you have the <utime.h> header file. */
|
||||
#define HAVE_UTIME_H 1
|
||||
|
||||
/* Define if you have the <varargs.h> header file. */
|
||||
#define HAVE_VARARGS_H 1
|
||||
|
||||
/* Define if you have the bind library (-lbind). */
|
||||
/* #undef HAVE_LIBBIND */
|
||||
|
||||
/* Define if you have the c_r library (-lc_r). */
|
||||
/* #undef HAVE_LIBC_R */
|
||||
|
||||
/* Define if you have the compat library (-lcompat). */
|
||||
/* #undef HAVE_LIBCOMPAT */
|
||||
|
||||
/* Define if you have the crypt library (-lcrypt). */
|
||||
#define HAVE_LIBCRYPT 1
|
||||
|
||||
/* Define if you have the dl library (-ldl). */
|
||||
#define HAVE_LIBDL 1
|
||||
|
||||
/* Define if you have the gen library (-lgen). */
|
||||
/* #undef HAVE_LIBGEN */
|
||||
|
||||
/* Define if you have the m library (-lm). */
|
||||
#define HAVE_LIBM 1
|
||||
|
||||
/* Define if you have the nsl library (-lnsl). */
|
||||
/* #undef HAVE_LIBNSL */
|
||||
|
||||
/* Define if you have the nsl_r library (-lnsl_r). */
|
||||
/* #undef HAVE_LIBNSL_R */
|
||||
|
||||
/* Define if you have the pthread library (-lpthread). */
|
||||
/* #undef HAVE_LIBPTHREAD */
|
||||
|
||||
/* Define if you have the socket library (-lsocket). */
|
||||
/* #undef HAVE_LIBSOCKET */
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define to make fseeko etc. visible, on some hosts. */
|
||||
/* #undef _LARGEFILE_SOURCE */
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
#endif /* __CONFIG_OS2_H__ */
|
|
@ -24,13 +24,6 @@
|
|||
#define HAVE_EXTERNAL_CLIENT
|
||||
#endif
|
||||
|
||||
#if defined( __EMX__) && !defined( MYSQL_SERVER)
|
||||
/* moved here to use below VOID macro redefinition */
|
||||
#define INCL_BASE
|
||||
#define INCL_NOPMAPI
|
||||
#include <os2.h>
|
||||
#endif /* __EMX__ */
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
/* We use a Unix API, so pretend it's not Windows */
|
||||
#undef WIN
|
||||
|
@ -72,8 +65,6 @@
|
|||
|
||||
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
|
||||
#include <config-win.h>
|
||||
#elif defined(OS2)
|
||||
#include <config-os2.h>
|
||||
#elif defined(__NETWARE__)
|
||||
#include <my_config.h>
|
||||
#include <config-netware.h>
|
||||
|
|
|
@ -22,10 +22,7 @@ INCLUDES = @ZLIB_INCLUDES@ -I$(top_builddir)/include \
|
|||
pkglib_LIBRARIES = libmysys.a
|
||||
LDADD = libmysys.a ../dbug/libdbug.a \
|
||||
../strings/libmystrings.a
|
||||
noinst_HEADERS = mysys_priv.h my_static.h \
|
||||
my_os2cond.c my_os2dirsrch.c my_os2dirsrch.h \
|
||||
my_os2dlfcn.c my_os2file64.c my_os2mutex.c \
|
||||
my_os2thread.c my_os2tls.c
|
||||
noinst_HEADERS = mysys_priv.h my_static.h
|
||||
libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
|
||||
mf_path.c mf_loadpath.c my_file.c \
|
||||
my_open.c my_create.c my_dup.c my_seek.c my_read.c \
|
||||
|
|
|
@ -1,162 +0,0 @@
|
|||
/* Copyright (C) Yuri Dario & 2000 MySQL AB
|
||||
All the above parties has a full, independent copyright to
|
||||
the following code, including the right to use the code in
|
||||
any manner without any demands from the other parties.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
/*****************************************************************************
|
||||
** The following is a simple implementation of posix conditions
|
||||
*****************************************************************************/
|
||||
|
||||
#undef SAFE_MUTEX /* Avoid safe_mutex redefinitions */
|
||||
#include "mysys_priv.h"
|
||||
#if defined(THREAD) && defined(OS2)
|
||||
#include <m_string.h>
|
||||
#include <process.h>
|
||||
#include <sys/timeb.h>
|
||||
|
||||
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
|
||||
{
|
||||
cond->waiting= 0;
|
||||
/* Warp3 FP29 or Warp4 FP4 or better required */
|
||||
if (DosCreateEventSem(NULL, &cond->semaphore, 0x0800, 0))
|
||||
return ENOMEM;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_cond_destroy(pthread_cond_t *cond)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
APIRET rc;
|
||||
if ((rc= DosCloseEventSem(cond->semaphore)) != 301)
|
||||
return rc ? EINVAL : 0;
|
||||
DosPostEventSem(cond->semaphore);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
|
||||
{
|
||||
int rval= 0;
|
||||
cond->waiting++;
|
||||
if (mutex)
|
||||
pthread_mutex_unlock(mutex);
|
||||
if (DosWaitEventSem(cond->semaphore, SEM_INDEFINITE_WAIT))
|
||||
rval= EINVAL;
|
||||
if (mutex)
|
||||
pthread_mutex_lock(mutex);
|
||||
cond->waiting--;
|
||||
return rval;
|
||||
}
|
||||
|
||||
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
|
||||
struct timespec *abstime)
|
||||
{
|
||||
struct timeb curtime;
|
||||
int result;
|
||||
long timeout;
|
||||
int rval= 0;
|
||||
|
||||
_ftime(&curtime);
|
||||
timeout= ((long) (abstime->ts_sec - curtime.time) * 1000L +
|
||||
(long) ((abstime->ts_nsec / 1000) - curtime.millitm) / 1000L);
|
||||
if (timeout < 0) /* Some safety */
|
||||
timeout= 0L;
|
||||
|
||||
cond->waiting++;
|
||||
|
||||
if (mutex)
|
||||
pthread_mutex_unlock(mutex);
|
||||
if (DosWaitEventSem(cond->semaphore, timeout) != 0)
|
||||
rval= ETIMEDOUT;
|
||||
if (mutex)
|
||||
pthread_mutex_lock(mutex);
|
||||
|
||||
cond->waiting--;
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
|
||||
int pthread_cond_signal(pthread_cond_t *cond)
|
||||
{
|
||||
/* Bring the next thread off the condition queue: */
|
||||
DosPostEventSem(cond->semaphore);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int pthread_cond_broadcast(pthread_cond_t *cond)
|
||||
{
|
||||
int i;
|
||||
/* Enter a loop to bring all threads off the condition queue */
|
||||
for (i= cond->waiting; i--;)
|
||||
DosPostEventSem(cond->semaphore);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int pthread_attr_init(pthread_attr_t *connect_att)
|
||||
{
|
||||
connect_att->dwStackSize= 0;
|
||||
connect_att->dwCreatingFlag= 0;
|
||||
connect_att->priority= 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_attr_setstacksize(pthread_attr_t *connect_att, DWORD stack)
|
||||
{
|
||||
connect_att->dwStackSize= stack;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_attr_setprio(pthread_attr_t *connect_att, int priority)
|
||||
{
|
||||
connect_att->priority= priority;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_attr_destroy(pthread_attr_t *connect_att)
|
||||
{
|
||||
bzero((gptr) connect_att, sizeof(*connect_att));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
** Fix localtime_r() to be a bit safer
|
||||
****************************************************************************/
|
||||
|
||||
struct tm *localtime_r(const time_t *timep, struct tm *tmp)
|
||||
{
|
||||
if (*timep == (time_t) - 1) /* This will crash win32 */
|
||||
{
|
||||
bzero(tmp, sizeof(*tmp));
|
||||
}
|
||||
else
|
||||
{
|
||||
struct tm *res= localtime(timep);
|
||||
if (!res) /* Wrong date */
|
||||
{
|
||||
bzero(tmp, sizeof(*tmp)); /* Keep things safe */
|
||||
return 0;
|
||||
}
|
||||
*tmp= *res;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
#endif /* __WIN__ */
|
|
@ -1,184 +0,0 @@
|
|||
/* Copyright (C) Yuri Dario & 2000-2003 MySQL AB
|
||||
All the above parties has a full, independent copyright to
|
||||
the following code, including the right to use the code in
|
||||
any manner without any demands from the other parties.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
|
||||
/* Win32 directory search emulation */
|
||||
|
||||
#if defined(OS2)
|
||||
|
||||
long _findfirst( char* path, struct _finddata_t* dos_file)
|
||||
{
|
||||
HDIR hdir = HDIR_CREATE;
|
||||
APIRET rc;
|
||||
FILEFINDBUF3 buf3;
|
||||
ULONG entries = 1;
|
||||
|
||||
#ifdef _DEBUG
|
||||
printf( "_findfirst path %s\n", path);
|
||||
#endif
|
||||
|
||||
memset( &buf3, 0, sizeof( buf3));
|
||||
rc = DosFindFirst(
|
||||
path, /* The ASCIIZ path name of the file or subdirectory to be found. */
|
||||
&hdir, /* The handle associated with this DosFindFirst request. */
|
||||
FILE_NORMAL | FILE_DIRECTORY, /* Attribute value that determines the file objects to be searched for. */
|
||||
&buf3, /* Result buffer. */
|
||||
sizeof( buf3), /* The length, in bytes, of pfindbuf. */
|
||||
&entries, /* Pointer to the number of entries: */
|
||||
FIL_STANDARD); /* The level of file information required. */
|
||||
|
||||
#ifdef _DEBUG
|
||||
printf( "_findfirst rc=%d hdir=%d entries=%d->%s\n", rc, hdir, entries,
|
||||
buf3.achName);
|
||||
#endif
|
||||
|
||||
if (rc /* && entries == 0 */)
|
||||
return -1;
|
||||
|
||||
if (dos_file)
|
||||
{
|
||||
memset( dos_file, 0, sizeof( struct _finddata_t));
|
||||
strcpy( dos_file->name, buf3.achName);
|
||||
dos_file->size = buf3.cbFile;
|
||||
dos_file->attrib = buf3.attrFile;
|
||||
}
|
||||
return (ULONG) hdir;
|
||||
}
|
||||
|
||||
|
||||
long _findnext( long hdir, struct _finddata_t* dos_file)
|
||||
{
|
||||
APIRET rc;
|
||||
FILEFINDBUF3 buf3;
|
||||
ULONG entries = 1;
|
||||
|
||||
memset( &buf3, 0, sizeof( buf3));
|
||||
rc = DosFindNext(hdir,
|
||||
&buf3, /* Result buffer. */
|
||||
sizeof( buf3), /* Length, in bytes, of pfindbuf. */
|
||||
&entries); /* Pointer to the number of entries */
|
||||
|
||||
#ifdef _DEBUG
|
||||
printf( "_findnext rc=%d hdir=%d entries=%d->%s\n", rc, hdir, entries,
|
||||
buf3.achName);
|
||||
#endif
|
||||
|
||||
if (rc /* && entries == 0 */)
|
||||
return -1;
|
||||
|
||||
if (dos_file)
|
||||
{
|
||||
memset( dos_file, 0, sizeof( struct _finddata_t));
|
||||
strcpy( dos_file->name, buf3.achName);
|
||||
dos_file->size = buf3.cbFile;
|
||||
dos_file->attrib = buf3.attrFile;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void _findclose( long hdir)
|
||||
{
|
||||
APIRET rc;
|
||||
|
||||
rc = DosFindClose( hdir);
|
||||
#ifdef _DEBUG
|
||||
printf( "_findclose rc=%d hdir=%d\n", rc, hdir);
|
||||
#endif
|
||||
}
|
||||
|
||||
DIR* opendir(char* path)
|
||||
{
|
||||
DIR* dir = (DIR*) calloc(1, sizeof( DIR));
|
||||
char buffer[260];
|
||||
APIRET rc;
|
||||
ULONG entries = 1;
|
||||
|
||||
strmov(strmov(buffer, path), "*.*");
|
||||
|
||||
#ifdef _DEBUG
|
||||
printf( "_findfirst path %s\n", buffer);
|
||||
#endif
|
||||
|
||||
dir->hdir = HDIR_CREATE;
|
||||
memset( &dir->buf3, 0, sizeof( dir->buf3));
|
||||
rc = DosFindFirst(
|
||||
buffer, /* Address of the ASCIIZ path name of the file or subdirectory to be found. */
|
||||
&dir->hdir, /* Address of the handle associated with this DosFindFirst request. */
|
||||
FILE_NORMAL | FILE_DIRECTORY, /* Attribute value that determines the file objects to be searched for. */
|
||||
&dir->buf3, /* Result buffer. */
|
||||
sizeof( dir->buf3), /* The length, in bytes, of pfindbuf. */
|
||||
&entries, /* Pointer to the number of entries: */
|
||||
FIL_STANDARD); /* The level of file information required. */
|
||||
|
||||
#ifdef _DEBUG
|
||||
printf( "opendir rc=%d hdir=%d entries=%d->%s\n", rc, dir->hdir, entries, dir->buf3.achName);
|
||||
#endif
|
||||
|
||||
if (rc /* && entries == 0 */)
|
||||
return NULL;
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
||||
|
||||
struct dirent* readdir( DIR* dir)
|
||||
{
|
||||
APIRET rc;
|
||||
ULONG entries = 1;
|
||||
|
||||
if (!dir->buf3.achName[0]) /* file not found on previous query */
|
||||
return NULL;
|
||||
|
||||
/* copy last file name */
|
||||
strcpy( dir->ent.d_name, dir->buf3.achName);
|
||||
|
||||
/* query next file */
|
||||
memset( &dir->buf3, 0, sizeof( dir->buf3));
|
||||
rc= DosFindNext(
|
||||
dir->hdir,
|
||||
&dir->buf3, /* Result buffer. */
|
||||
sizeof(dir->buf3), /* Length, in bytes, of pfindbuf. */
|
||||
&entries); /* Pointer to the number of entries */
|
||||
|
||||
#ifdef _DEBUG
|
||||
printf( "_findnext rc=%d hdir=%d entries=%d->%s\n", rc, dir->hdir, entries,
|
||||
dir->buf3.achName);
|
||||
#endif
|
||||
|
||||
if (rc /* && entries == 0 */)
|
||||
*dir->buf3.achName= 0; /* reset name for next query */
|
||||
|
||||
return &dir->ent;
|
||||
}
|
||||
|
||||
|
||||
int closedir (DIR *dir)
|
||||
{
|
||||
APIRET rc;
|
||||
|
||||
rc = DosFindClose( dir->hdir);
|
||||
#ifdef _DEBUG
|
||||
printf( "_findclose rc=%d hdir=%d\n", rc, dir->hdir);
|
||||
#endif
|
||||
free(dir);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* OS2 */
|
|
@ -1,88 +0,0 @@
|
|||
/* Copyright (C) Yuri Dario & 2000 MySQL AB
|
||||
All the above parties has a full, independent copyright to
|
||||
the following code, including the right to use the code in
|
||||
any manner without any demands from the other parties.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
/* Win32 directory search emulation */
|
||||
|
||||
#ifndef __MY_OS2DIRSRCH2_H__
|
||||
#define __MY_OS2DIRSRCH2_H__
|
||||
|
||||
#ifdef __cplusplus_00
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _finddata_t
|
||||
{
|
||||
unsigned attrib;
|
||||
#ifdef NOT_USED
|
||||
unsigned long time_create; /* -1 for FAT file systems */
|
||||
unsigned long time_access; /* -1 for FAT file systems */
|
||||
unsigned long time_write;
|
||||
#endif
|
||||
unsigned long size;
|
||||
char name[260];
|
||||
#ifdef NOT_USED
|
||||
uint16 wr_date;
|
||||
uint16 wr_time;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
struct dirent
|
||||
{
|
||||
#ifdef NOT_USED
|
||||
unsigned attrib;
|
||||
unsigned long time_create; /* -1 for FAT file systems */
|
||||
unsigned long time_access; /* -1 for FAT file systems */
|
||||
unsigned long time_write;
|
||||
unsigned long size;
|
||||
#endif
|
||||
char d_name[260];
|
||||
#ifdef NOT_USED
|
||||
uint16 wr_date;
|
||||
uint16 wr_time;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct DIR
|
||||
{
|
||||
HDIR hdir;
|
||||
FILEFINDBUF3 buf3;
|
||||
struct dirent ent;
|
||||
};
|
||||
|
||||
DIR *opendir ( char *);
|
||||
struct dirent *readdir (DIR *);
|
||||
int closedir (DIR *);
|
||||
|
||||
#ifdef NOT_USED
|
||||
#define _A_NORMAL FILE_NORMAL
|
||||
#define _A_SUBDIR FILE_DIRECTORY
|
||||
#define _A_RDONLY FILE_READONLY
|
||||
|
||||
long _findfirst( char*, struct _finddata_t*);
|
||||
long _findnext( long, struct _finddata_t*);
|
||||
void _findclose( long);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus_00
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MY_OS2DIRSRCH2_H__ */
|
|
@ -1,74 +0,0 @@
|
|||
/* Copyright (C) Yuri Dario & 2000 MySQL AB
|
||||
All the above parties has a full, independent copyright to
|
||||
the following code, including the right to use the code in
|
||||
any manner without any demands from the other parties.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
/*
|
||||
* dlfcn::Unix dynamic loading for OS/2
|
||||
*
|
||||
* Compatibility layer for dynamic loading.
|
||||
* Only minimal implementation
|
||||
*
|
||||
*/
|
||||
|
||||
#define RTLD_LAZY 0
|
||||
#define RTLD_NOW 0
|
||||
|
||||
void* dlopen( char* path, int flag);
|
||||
char* dlerror( void);
|
||||
void* dlsym( void* hmod, char* fn);
|
||||
void dlclose( void* hmod);
|
||||
|
||||
char fail[ 256];
|
||||
|
||||
void* dlopen( char* path, int flag)
|
||||
{
|
||||
APIRET rc;
|
||||
HMODULE hmod;
|
||||
|
||||
rc = DosLoadModule( fail, sizeof( fail), path, &hmod);
|
||||
if (rc)
|
||||
return NULL;
|
||||
|
||||
return (void*) hmod;
|
||||
}
|
||||
|
||||
char* dlerror( void)
|
||||
{
|
||||
return fail;
|
||||
}
|
||||
|
||||
void* dlsym( void* hmod, char* fn)
|
||||
{
|
||||
APIRET rc;
|
||||
PFN addr;
|
||||
|
||||
rc = DosQueryProcAddr( (HMODULE) hmod, 0l, fn, &addr);
|
||||
if (rc)
|
||||
return NULL;
|
||||
|
||||
return (void*) addr;
|
||||
}
|
||||
|
||||
void dlclose( void* hmod)
|
||||
{
|
||||
APIRET rc;
|
||||
|
||||
rc = DosFreeModule( (HMODULE) hmod);
|
||||
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/* Copyright (C) Yuri Dario & 2000 MySQL AB
|
||||
All the above parties has a full, independent copyright to
|
||||
the following code, including the right to use the code in
|
||||
any manner without any demands from the other parties.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
/*
|
||||
* dlfcn::Unix dynamic loading for OS/2
|
||||
*
|
||||
* Compatibility layer for dynamic loading.
|
||||
* Only minimal implementation
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __DLFCN_H__
|
||||
#define __DLFCN_H__
|
||||
|
||||
#define RTLD_LAZY 0
|
||||
#define RTLD_NOW 0
|
||||
|
||||
void* dlopen( char* path, int flag);
|
||||
char* dlerror( void);
|
||||
void* dlsym( void* hmod, char* fn);
|
||||
void dlclose( void* hmod);
|
||||
|
||||
#endif
|
|
@ -1,394 +0,0 @@
|
|||
/* Copyright (C) Yuri Dario & 2000 MySQL AB
|
||||
All the above parties has a full, independent copyright to
|
||||
the following code, including the right to use the code in
|
||||
any manner without any demands from the other parties.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
void _OS2errno( APIRET rc);
|
||||
longlong _lseek64( int fd, longlong offset, int seektype);
|
||||
int _lock64( int fd, int locktype, my_off_t start,
|
||||
my_off_t length, myf MyFlags);
|
||||
int _sopen64( const char *name, int oflag, int shflag, int mask);
|
||||
|
||||
/*
|
||||
This class is used to define a global c++ variable, that
|
||||
is initialized before main() gets called.
|
||||
*/
|
||||
|
||||
class File64bit
|
||||
{
|
||||
public:
|
||||
File64bit(); /* default constructor */
|
||||
} initFile64bit;
|
||||
|
||||
static APIRET (* APIENTRY _DosOpenL)(PCSZ pszFileName,
|
||||
PHFILE phf,
|
||||
PULONG pulAction,
|
||||
LONGLONG cbFile,
|
||||
ULONG ulAttribute,
|
||||
ULONG fsOpenFlags,
|
||||
ULONG fsOpenMode,
|
||||
PEAOP2 peaop2);
|
||||
static APIRET (* APIENTRY _DosSetFilePtrL)(HFILE hFile,
|
||||
LONGLONG ib,
|
||||
ULONG method,
|
||||
PLONGLONG ibActual);
|
||||
static APIRET (* APIENTRY _DosSetFileLocksL)(HFILE hFile,
|
||||
PFILELOCKL pflUnlock,
|
||||
PFILELOCKL pflLock,
|
||||
ULONG timeout,
|
||||
ULONG flags);
|
||||
|
||||
#define EIO EINVAL
|
||||
#define ESPIPE EBADSEEK
|
||||
|
||||
|
||||
static unsigned char const errno_tab[] =
|
||||
{
|
||||
0 , EINVAL, ENOENT, ENOENT, EMFILE, /* 0..4 */
|
||||
EACCES, EBADF, EIO, ENOMEM, EIO, /* 5..9 */
|
||||
EINVAL, ENOEXEC,EINVAL, EINVAL, EINVAL, /* 10..14 */
|
||||
ENOENT, EBUSY, EXDEV, ENOENT, EROFS, /* 15..19 */
|
||||
EIO, EIO, EIO, EIO, EIO, /* 20..24 */
|
||||
EIO, EIO, EIO, ENOSPC, EIO, /* 25..29 */
|
||||
EIO, EIO, EACCES, EACCES, EIO, /* 30..34 */
|
||||
EIO, EIO, EIO, EIO, ENOSPC, /* 35..39 */
|
||||
EIO, EIO, EIO, EIO, EIO, /* 40..44 */
|
||||
EIO, EIO, EIO, EIO, EIO, /* 45..49 */
|
||||
EIO, EIO, EIO, EIO, EBUSY, /* 50..54 */
|
||||
EIO, EIO, EIO, EIO, EIO, /* 55..59 */
|
||||
EIO, ENOSPC, ENOSPC, EIO, EIO, /* 60..64 */
|
||||
EACCES, EIO, EIO, EIO, EIO, /* 65..69 */
|
||||
EIO, EIO, EIO, EROFS, EIO, /* 70..74 */
|
||||
EIO, EIO, EIO, EIO, EIO, /* 75..79 */
|
||||
EEXIST, EIO, ENOENT, EIO, EIO, /* 80..84 */
|
||||
EIO, EIO, EINVAL, EIO, EAGAIN, /* 85..89 */
|
||||
EIO, EIO, EIO, EIO, EIO, /* 90..94 */
|
||||
EINTR, EIO, EIO, EIO, EACCES, /* 95..99 */
|
||||
ENOMEM, EINVAL, EINVAL, ENOMEM, EINVAL, /* 100..104 */
|
||||
EINVAL, ENOMEM, EIO, EACCES, EPIPE, /* 105..109 */
|
||||
ENOENT, E2BIG, ENOSPC, ENOMEM, EBADF, /* 110..114 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 115..119 */
|
||||
EINVAL, EINVAL, EINVAL, ENOENT, EINVAL, /* 120..124 */
|
||||
ENOENT, ENOENT, ENOENT, ECHILD, ECHILD, /* 125..129 */
|
||||
EACCES, EINVAL, ESPIPE, EINVAL, EINVAL, /* 130..134 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 135..139 */
|
||||
EINVAL, EINVAL, EBUSY, EINVAL, EINVAL, /* 140..144 */
|
||||
EINVAL, EINVAL, EINVAL, EBUSY, EINVAL, /* 145..149 */
|
||||
EINVAL, EINVAL, ENOMEM, EINVAL, EINVAL, /* 150..154 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 155..159 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EAGAIN, /* 160..164 */
|
||||
EINVAL, EINVAL, EACCES, EINVAL, EINVAL, /* 165..169 */
|
||||
EBUSY, EINVAL, EINVAL, EINVAL, EINVAL, /* 170..174 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 175..179 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, ECHILD, /* 180..184 */
|
||||
EINVAL, EINVAL, ENOENT, EINVAL, EINVAL, /* 185..189 */
|
||||
ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC, /* 190..194 */
|
||||
ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC, /* 195..199 */
|
||||
ENOEXEC,ENOEXEC,ENOEXEC,ENOENT, EINVAL, /* 200..204 */
|
||||
EINVAL, ENAMETOOLONG, EINVAL, EINVAL, EINVAL, /* 205..209 */
|
||||
EINVAL, EINVAL, EACCES, ENOEXEC,ENOEXEC, /* 210..214 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 215..219 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 220..224 */
|
||||
EINVAL, EINVAL, EINVAL, ECHILD, EINVAL, /* 225..229 */
|
||||
EINVAL, EBUSY, EAGAIN, ENOTCONN, EINVAL, /* 230..234 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 235..239 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 240..244 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 245..249 */
|
||||
EACCES, EACCES, EINVAL, ENOENT, EINVAL, /* 250..254 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 255..259 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 260..264 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 265..269 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 270..274 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 275..279 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EEXIST, /* 280..284 */
|
||||
EEXIST, EINVAL, EINVAL, EINVAL, EINVAL, /* 285..289 */
|
||||
ENOMEM, EMFILE, EINVAL, EINVAL, EINVAL, /* 290..294 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 295..299 */
|
||||
EINVAL, EBUSY, EINVAL, ESRCH, EINVAL, /* 300..304 */
|
||||
ESRCH, EINVAL, EINVAL, EINVAL, ESRCH, /* 305..309 */
|
||||
EINVAL, ENOMEM, EINVAL, EINVAL, EINVAL, /* 310..314 */
|
||||
EINVAL, E2BIG, ENOENT, EIO, EIO, /* 315..319 */
|
||||
EINVAL, EINVAL, EINVAL, EINVAL, EAGAIN, /* 320..324 */
|
||||
EINVAL, EINVAL, EINVAL, EIO, ENOENT, /* 325..329 */
|
||||
EACCES, EACCES, EACCES, ENOENT, ENOMEM /* 330..334 */
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize 64bit file access: dynamic load of WSeB API
|
||||
*/
|
||||
File64bit :: File64bit()
|
||||
{
|
||||
HMODULE hDoscalls;
|
||||
|
||||
if (DosQueryModuleHandle("DOSCALLS", &hDoscalls) != NO_ERROR)
|
||||
return;
|
||||
|
||||
if (DosQueryProcAddr(hDoscalls, 981, NULL, (PFN *)&_DosOpenL) != NO_ERROR)
|
||||
return;
|
||||
|
||||
if (DosQueryProcAddr(hDoscalls, 988, NULL, (PFN *)&_DosSetFilePtrL) != NO_ERROR) {
|
||||
_DosOpenL = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (DosQueryProcAddr(hDoscalls, 986, NULL, (PFN *)&_DosSetFileLocksL) != NO_ERROR) {
|
||||
_DosOpenL = NULL;
|
||||
_DosSetFilePtrL = NULL;
|
||||
return;
|
||||
}
|
||||
/* notify success */
|
||||
#ifdef MYSQL_SERVER
|
||||
printf( "WSeB 64bit file API loaded.\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void _OS2errno( APIRET rc)
|
||||
{
|
||||
if (rc >= sizeof (errno_tab))
|
||||
errno = EINVAL;
|
||||
else
|
||||
errno = errno_tab[rc];
|
||||
}
|
||||
|
||||
|
||||
longlong _lseek64( int fd, longlong offset, int seektype)
|
||||
{
|
||||
APIRET rc;
|
||||
longlong actual;
|
||||
|
||||
if (_DosSetFilePtrL)
|
||||
rc = _DosSetFilePtrL( fd, offset, seektype, &actual);
|
||||
else
|
||||
{
|
||||
ULONG ulActual;
|
||||
rc = DosSetFilePtr( fd, (long) offset, seektype, &ulActual);
|
||||
actual = ulActual;
|
||||
}
|
||||
|
||||
if (!rc)
|
||||
return( actual); /* NO_ERROR */
|
||||
|
||||
_OS2errno( rc); /* set errno */
|
||||
return(-1); /* seek failed */
|
||||
}
|
||||
|
||||
|
||||
inline APIRET _SetFileLocksL(HFILE hFile,
|
||||
PFILELOCKL pflUnlock,
|
||||
PFILELOCKL pflLock,
|
||||
ULONG timeout,
|
||||
ULONG flags)
|
||||
{
|
||||
if (_DosSetFileLocksL)
|
||||
{
|
||||
APIRET rc;
|
||||
rc = _DosSetFileLocksL( hFile, pflUnlock, pflLock, timeout, flags);
|
||||
|
||||
/*
|
||||
on FAT/HPFS/LAN a INVALID_PARAMETER is returned, seems that
|
||||
only JFS can handle >2GB ranges.
|
||||
*/
|
||||
if (rc != 87)
|
||||
return rc;
|
||||
/* got INVALID_PARAMETER, fallback to standard call */
|
||||
}
|
||||
|
||||
FILELOCK flUnlock = { pflUnlock->lOffset, pflUnlock->lRange };
|
||||
FILELOCK flLock = { pflLock->lOffset, pflLock->lRange };
|
||||
return DosSetFileLocks( hFile, &flUnlock, &flLock, timeout, flags);
|
||||
}
|
||||
|
||||
|
||||
int _lock64( int fd, int locktype, my_off_t start,
|
||||
my_off_t length, myf MyFlags)
|
||||
{
|
||||
FILELOCKL LockArea = {0,0}, UnlockArea = {0,0};
|
||||
ULONG readonly = 0;
|
||||
APIRET rc = -1;
|
||||
|
||||
switch (locktype) {
|
||||
case F_UNLCK:
|
||||
UnlockArea.lOffset = start;
|
||||
UnlockArea.lRange = length ? length : LONGLONG_MAX;
|
||||
break;
|
||||
|
||||
case F_RDLCK:
|
||||
case F_WRLCK:
|
||||
LockArea.lOffset = start;
|
||||
LockArea.lRange = length ? length : LONGLONG_MAX;
|
||||
readonly = (locktype == F_RDLCK ? 1 : 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
errno = EINVAL;
|
||||
rc = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (MyFlags & MY_DONT_WAIT)
|
||||
{
|
||||
rc = _SetFileLocksL( fd, &UnlockArea, &LockArea, 0, readonly);
|
||||
/* printf("fd %d, locktype %d, rc %d (dont_wait)\n", fd, locktype, rc); */
|
||||
if (rc == 33) { /* Lock Violation */
|
||||
|
||||
DBUG_PRINT("info",("Was locked, trying with timeout"));
|
||||
rc = _SetFileLocksL( fd, &UnlockArea, &LockArea, 1 * 1000, readonly);
|
||||
/* printf( "fd %d, locktype %d, rc %d (dont_wait with timeout)\n", fd, locktype, rc); */
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (rc = _SetFileLocksL( fd, &UnlockArea, &LockArea, 0, readonly) &&
|
||||
(rc == 33))
|
||||
{
|
||||
printf(".");
|
||||
DosSleep(1 * 1000);
|
||||
}
|
||||
/* printf( "fd %d, locktype %d, rc %d (wait2)\n", fd, locktype, rc); */
|
||||
}
|
||||
if (!rc)
|
||||
return(0); /* NO_ERROR */
|
||||
_OS2errno( rc); /* set errno */
|
||||
return(-1); /* lock failed */
|
||||
}
|
||||
|
||||
|
||||
int sopen(const char *name, int oflag, int shflag, int mask)
|
||||
{
|
||||
int fail_errno;
|
||||
APIRET rc = 0;
|
||||
HFILE hf = 0;
|
||||
ULONG ulAction = 0;
|
||||
LONGLONG cbFile = 0;
|
||||
ULONG ulAttribute = FILE_NORMAL;
|
||||
ULONG fsOpenFlags = 0;
|
||||
ULONG fsOpenMode = 0;
|
||||
|
||||
/* Extract the access mode and sharing mode bits. */
|
||||
fsOpenMode = (shflag & 0xFF) | (oflag & 0x03);
|
||||
|
||||
/*
|
||||
Translate ERROR_OPEN_FAILED to ENOENT unless O_EXCL is set (see
|
||||
below).
|
||||
*/
|
||||
fail_errno = ENOENT;
|
||||
|
||||
/*
|
||||
Compute `open_flag' depending on `flags'. Note that _SO_CREAT is
|
||||
set for O_CREAT.
|
||||
*/
|
||||
|
||||
if (oflag & O_CREAT)
|
||||
{
|
||||
if (oflag & O_EXCL)
|
||||
{
|
||||
fsOpenFlags = OPEN_ACTION_FAIL_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW;
|
||||
fail_errno = EEXIST;
|
||||
}
|
||||
else if (oflag & O_TRUNC)
|
||||
fsOpenFlags = OPEN_ACTION_REPLACE_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW;
|
||||
else
|
||||
fsOpenFlags = OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW;
|
||||
|
||||
if (mask & S_IWRITE)
|
||||
ulAttribute = FILE_NORMAL;
|
||||
else
|
||||
ulAttribute = FILE_READONLY;
|
||||
|
||||
}
|
||||
else if (oflag & O_TRUNC)
|
||||
fsOpenFlags = OPEN_ACTION_REPLACE_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW;
|
||||
else
|
||||
fsOpenFlags = OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW;
|
||||
|
||||
/* Try to open the file and handle errors. */
|
||||
if (_DosOpenL)
|
||||
rc = _DosOpenL( name, &hf, &ulAction, cbFile,
|
||||
ulAttribute, fsOpenFlags, fsOpenMode, NULL);
|
||||
else
|
||||
rc = DosOpen( name, &hf, &ulAction, (LONG) cbFile,
|
||||
ulAttribute, fsOpenFlags, fsOpenMode, NULL);
|
||||
|
||||
if (rc == ERROR_OPEN_FAILED)
|
||||
{
|
||||
errno = fail_errno;
|
||||
return -1;
|
||||
}
|
||||
if (rc != 0)
|
||||
{
|
||||
_OS2errno( rc); /* set errno */
|
||||
return -1;
|
||||
}
|
||||
if (oflag & O_APPEND)
|
||||
_lseek64( hf, 0L, SEEK_END);
|
||||
return hf;
|
||||
}
|
||||
|
||||
|
||||
int read(int fd, void *buffer, unsigned int count)
|
||||
{
|
||||
APIRET rc;
|
||||
ULONG actual;
|
||||
|
||||
rc= DosRead( fd, (PVOID) buffer, count, &actual);
|
||||
|
||||
if (!rc)
|
||||
return( actual); /* NO_ERROR */
|
||||
_OS2errno( rc); /* set errno */
|
||||
return(-1); /* read failed */
|
||||
}
|
||||
|
||||
|
||||
int write(int fd, const void *buffer, unsigned int count)
|
||||
{
|
||||
APIRET rc;
|
||||
ULONG actual;
|
||||
|
||||
rc = DosWrite( fd, (PVOID) buffer, count, &actual);
|
||||
|
||||
if (!rc)
|
||||
return( actual); /* NO_ERROR */
|
||||
_OS2errno( rc); /* set errno */
|
||||
return(-1); /* write failed */
|
||||
}
|
||||
|
||||
|
||||
int close( int fd)
|
||||
{
|
||||
APIRET rc;
|
||||
ULONG actual;
|
||||
|
||||
rc = DosClose( fd);
|
||||
|
||||
if (!rc)
|
||||
return( 0); /* NO_ERROR */
|
||||
_OS2errno( rc); /* set errno */
|
||||
return(-1); /* close failed */
|
||||
}
|
||||
|
||||
|
||||
int open( const char *name, int oflag)
|
||||
{
|
||||
return sopen( name, oflag, OPEN_SHARE_DENYNONE, S_IREAD | S_IWRITE);
|
||||
}
|
||||
|
||||
|
||||
int open( const char *name, int oflag, int mask)
|
||||
{
|
||||
return sopen( name, oflag, OPEN_SHARE_DENYNONE, mask);
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Modified and extended by Antony T Curtis <antony.curtis@olcs.net>
|
||||
* for use with OS/2.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by John Birrell.
|
||||
* 4. Neither the name of the author nor the names of any co-contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#ifdef _THREAD_SAFE
|
||||
|
||||
int
|
||||
pthread_mutex_init(pthread_mutex_t * mutex,
|
||||
const pthread_mutexattr_t * mutex_attr)
|
||||
{
|
||||
(void) DosCreateMutexSem(NULL,mutex,0,0);
|
||||
return (0); /* Return the completion status: */
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
pthread_mutex_destroy(pthread_mutex_t * mutex)
|
||||
{
|
||||
APIRET rc;
|
||||
|
||||
do
|
||||
{
|
||||
rc = DosCloseMutexSem(*mutex);
|
||||
if (rc == 301) DosReleaseMutexSem(*mutex);
|
||||
} while (rc == 301);
|
||||
|
||||
*mutex = 0;
|
||||
return (0); /* Return the completion status: */
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
pthread_mutex_lock(pthread_mutex_t * mutex)
|
||||
{
|
||||
APIRET rc;
|
||||
|
||||
rc = DosRequestMutexSem(*mutex,SEM_INDEFINITE_WAIT);
|
||||
if (rc)
|
||||
return(EINVAL);
|
||||
return (0); /* Return the completion status: */
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
pthread_mutex_unlock(pthread_mutex_t * mutex)
|
||||
{
|
||||
(void) DosReleaseMutexSem(*mutex);
|
||||
return (0); /* Return the completion status: */
|
||||
}
|
||||
#endif
|
|
@ -1,128 +0,0 @@
|
|||
/* Copyright (C) Yuri Dario & 2000 MySQL AB
|
||||
All the above parties has a full, independent copyright to
|
||||
the following code, including the right to use the code in
|
||||
any manner without any demands from the other parties.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
/*****************************************************************************
|
||||
** Simulation of posix threads calls for OS/2
|
||||
*****************************************************************************/
|
||||
|
||||
#include "mysys_priv.h"
|
||||
#if defined(THREAD) && defined(OS2)
|
||||
#include <m_string.h>
|
||||
#include <process.h>
|
||||
|
||||
static pthread_mutex_t THR_LOCK_thread;
|
||||
|
||||
struct pthread_map
|
||||
{
|
||||
HANDLE pthreadself;
|
||||
pthread_handler func;
|
||||
void * param;
|
||||
};
|
||||
|
||||
void win_pthread_init(void)
|
||||
{
|
||||
pthread_mutex_init(&THR_LOCK_thread,NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
** We have tried to use '_beginthreadex' instead of '_beginthread' here
|
||||
** but in this case the program leaks about 512 characters for each
|
||||
** created thread !
|
||||
** As we want to save the created thread handler for other threads to
|
||||
** use and to be returned by pthread_self() (instead of the Win32 pseudo
|
||||
** handler), we have to go trough pthread_start() to catch the returned handler
|
||||
** in the new thread.
|
||||
*/
|
||||
|
||||
pthread_handler_t pthread_start(void *param)
|
||||
{
|
||||
DBUG_ENTER("pthread_start");
|
||||
pthread_handler func=((struct pthread_map *) param)->func;
|
||||
void *func_param=((struct pthread_map *) param)->param;
|
||||
my_thread_init(); /* Will always succeed in windows */
|
||||
pthread_mutex_lock(&THR_LOCK_thread); /* Wait for beginthread to return */
|
||||
win_pthread_self=((struct pthread_map *) param)->pthreadself;
|
||||
pthread_mutex_unlock(&THR_LOCK_thread);
|
||||
free((char*) param); /* Free param from create */
|
||||
/* pthread_exit((void*) (*func)(func_param)); */
|
||||
(*func)(func_param);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
int pthread_create(pthread_t *thread_id, pthread_attr_t *attr,
|
||||
pthread_handler func, void *param)
|
||||
{
|
||||
HANDLE hThread;
|
||||
struct pthread_map *map;
|
||||
DBUG_ENTER("pthread_create");
|
||||
|
||||
if (!(map=(struct pthread_map *)malloc(sizeof(*map))))
|
||||
DBUG_RETURN(-1);
|
||||
map->func=func;
|
||||
map->param=param;
|
||||
pthread_mutex_lock(&THR_LOCK_thread);
|
||||
#ifdef __BORLANDC__
|
||||
hThread=(HANDLE)_beginthread((void(_USERENTRY *)(void *)) pthread_start,
|
||||
attr->dwStackSize ? attr->dwStackSize :
|
||||
65535, (void*) map);
|
||||
#elif defined( OS2)
|
||||
hThread=(HANDLE)_beginthread((void( _Optlink *)(void *)) pthread_start, NULL,
|
||||
attr->dwStackSize ? attr->dwStackSize :
|
||||
65535, (void*) map);
|
||||
#else
|
||||
hThread=(HANDLE)_beginthread((void( __cdecl *)(void *)) pthread_start,
|
||||
attr->dwStackSize ? attr->dwStackSize :
|
||||
65535, (void*) map);
|
||||
#endif
|
||||
DBUG_PRINT("info", ("hThread=%lu",(long) hThread));
|
||||
*thread_id=map->pthreadself=hThread;
|
||||
pthread_mutex_unlock(&THR_LOCK_thread);
|
||||
|
||||
if (hThread == (HANDLE) -1)
|
||||
{
|
||||
int error=errno;
|
||||
DBUG_PRINT("error",
|
||||
("Can't create thread to handle request (error %d)",error));
|
||||
DBUG_RETURN(error ? error : -1);
|
||||
}
|
||||
#ifdef OS2
|
||||
my_pthread_setprio(hThread, attr->priority);
|
||||
#else
|
||||
VOID(SetThreadPriority(hThread, attr->priority)) ;
|
||||
#endif
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
void pthread_exit(void *a)
|
||||
{
|
||||
_endthread();
|
||||
}
|
||||
|
||||
/* This is neaded to get the macro pthread_setspecific to work */
|
||||
|
||||
int win_pthread_setspecific(void *a,void *b,uint length)
|
||||
{
|
||||
memcpy(a,b,length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,151 +0,0 @@
|
|||
/* Copyright (C) Yuri Dario & 2000 MySQL AB
|
||||
All the above parties has a full, independent copyright to
|
||||
the following code, including the right to use the code in
|
||||
any manner without any demands from the other parties.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
DWORD TlsAlloc( void);
|
||||
BOOL TlsFree( DWORD);
|
||||
PVOID TlsGetValue( DWORD);
|
||||
BOOL TlsSetValue( DWORD, PVOID);
|
||||
|
||||
#define TLS_MINIMUM_AVAILABLE 64
|
||||
|
||||
|
||||
PULONG tls_storage; /* TLS local storage */
|
||||
DWORD tls_bits[2]; /* TLS in-use bits */
|
||||
pthread_mutex_t tls_mutex; /* TLS mutex for in-use bits */
|
||||
|
||||
|
||||
DWORD TlsAlloc( void)
|
||||
{
|
||||
DWORD index = -1;
|
||||
DWORD mask, tibidx;
|
||||
int i;
|
||||
|
||||
if (tls_storage == NULL)
|
||||
{
|
||||
|
||||
APIRET rc;
|
||||
|
||||
/* allocate memory for TLS storage */
|
||||
rc = DosAllocThreadLocalMemory( 1, &tls_storage);
|
||||
if (rc)
|
||||
fprintf( stderr, "DosAllocThreadLocalMemory error: return code = %u\n",
|
||||
rc);
|
||||
/* create a mutex */
|
||||
if (pthread_mutex_init( &tls_mutex, NULL))
|
||||
fprintf( stderr, "Failed to init TLS mutex\n");
|
||||
}
|
||||
|
||||
pthread_mutex_lock( &tls_mutex);
|
||||
|
||||
tibidx = 0;
|
||||
if (tls_bits[0] == 0xFFFFFFFF)
|
||||
{
|
||||
if (tls_bits[1] == 0xFFFFFFFF)
|
||||
{
|
||||
fprintf( stderr, "tid#%d, no more TLS bits available\n", _threadid);
|
||||
pthread_mutex_unlock( &tls_mutex);
|
||||
return -1;
|
||||
}
|
||||
tibidx = 1;
|
||||
}
|
||||
|
||||
for (i=0; i<32; i++)
|
||||
{
|
||||
mask = (1 << i);
|
||||
if ((tls_bits[ tibidx] & mask) == 0)
|
||||
{
|
||||
tls_bits[ tibidx] |= mask;
|
||||
index = (tibidx*32) + i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
tls_storage[index] = 0;
|
||||
|
||||
pthread_mutex_unlock( &tls_mutex);
|
||||
/* fprintf( stderr, "tid#%d, TlsAlloc index %d\n", _threadid, index); */
|
||||
return index;
|
||||
}
|
||||
|
||||
BOOL TlsFree( DWORD index)
|
||||
{
|
||||
int tlsidx;
|
||||
DWORD mask;
|
||||
|
||||
if (index >= TLS_MINIMUM_AVAILABLE)
|
||||
return NULL;
|
||||
|
||||
pthread_mutex_lock( &tls_mutex);
|
||||
|
||||
tlsidx = 0;
|
||||
if (index > 32)
|
||||
tlsidx++;
|
||||
|
||||
mask = (1 << index);
|
||||
if (tls_bits[ tlsidx] & mask)
|
||||
{
|
||||
tls_bits[tlsidx] &= ~mask;
|
||||
tls_storage[index] = 0;
|
||||
pthread_mutex_unlock( &tls_mutex);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock( &tls_mutex);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
PVOID TlsGetValue( DWORD index)
|
||||
{
|
||||
if (index >= TLS_MINIMUM_AVAILABLE)
|
||||
return NULL;
|
||||
|
||||
/* verify if memory has been allocated for this thread */
|
||||
if (*tls_storage == NULL)
|
||||
{
|
||||
/* allocate memory for indexes */
|
||||
*tls_storage = (ULONG)calloc( TLS_MINIMUM_AVAILABLE, sizeof(int));
|
||||
/* fprintf(stderr, "tid#%d, tls_storage %x\n", _threadid, *tls_storage); */
|
||||
}
|
||||
|
||||
ULONG* tls_array = (ULONG*) *tls_storage;
|
||||
return (PVOID) tls_array[index];
|
||||
}
|
||||
|
||||
|
||||
BOOL TlsSetValue( DWORD index, PVOID val)
|
||||
{
|
||||
|
||||
/* verify if memory has been allocated for this thread */
|
||||
if (*tls_storage == NULL)
|
||||
{
|
||||
/* allocate memory for indexes */
|
||||
*tls_storage = (ULONG)calloc( TLS_MINIMUM_AVAILABLE, sizeof(int));
|
||||
/* fprintf(stderr, "tid#%d, tls_storage %x\n", _threadid, *tls_storage); */
|
||||
}
|
||||
|
||||
if (index >= TLS_MINIMUM_AVAILABLE)
|
||||
return FALSE;
|
||||
|
||||
ULONG* tls_array = (ULONG*) *tls_storage;
|
||||
/* fprintf( stderr, "tid#%d, TlsSetValue array %08x index %d -> %08x (old)\n", _threadid, tls_array, index, tls_array[ index]); */
|
||||
tls_array[ index] = (ULONG) val;
|
||||
/* fprintf( stderr, "tid#%d, TlsSetValue array %08x index %d -> %08x\n", _threadid, tls_array, index, val); */
|
||||
return TRUE;
|
||||
}
|
BIN
os2/BldLevel.RES
BIN
os2/BldLevel.RES
Binary file not shown.
|
@ -1,10 +0,0 @@
|
|||
@echo off
|
||||
|
||||
REM I'm using resources for BLDLEVEL info, because VA4 linker has the bad
|
||||
REM feature of using versionstring content for padding files.
|
||||
|
||||
REM To set fixpak level: -P"fixpak level"
|
||||
SET MYSQL_VERSION=3.23.50
|
||||
SET MYSQL_BUILD=B1
|
||||
|
||||
BldLevelInf -V%MYSQL_VERSION% -N"MySQL AB, Yuri Dario" -D"MySQL %MYSQL_VERSION% for OS/2 - Build %MYSQL_BUILD%" -Len BldLevel.rc
|
|
@ -1 +0,0 @@
|
|||
RCDATA 1 { "@#MySQL AB, Yuri Dario:3.23.50#@##1## 24 Jun 2002 22:42:20 paperino::en::::@@MySQL 3.23.50 for OS/2 - Build B1" }
|
|
@ -1,570 +0,0 @@
|
|||
/* $Id: BldLevelInf.cmd,v 1.5 2001/01/26 21:33:13 phaller Exp $
|
||||
*
|
||||
* Adds a Description string to the given .def-file.
|
||||
* Fills in default values; like build time and host.
|
||||
*
|
||||
*/
|
||||
|
||||
if RxFuncQuery('SysLoadFuncs') = 1 then
|
||||
do
|
||||
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';
|
||||
call SysLoadFuncs;
|
||||
end
|
||||
|
||||
|
||||
/*
|
||||
* Set default parameter values.
|
||||
*/
|
||||
sDefFileIn = '';
|
||||
sDefFileOut = '';
|
||||
sASDFeatureId = '';
|
||||
sCountryCode = '';
|
||||
sDateTime = left(' 'date()' 'time(), 26);
|
||||
sDescription = 'Odin32';
|
||||
sFixPakVer = '';
|
||||
sHostname = strip(substr(VALUE('HOSTNAME',,'OS2ENVIRONMENT'), 1, 11));
|
||||
sLanguageCode = '';
|
||||
sMiniVer = '';
|
||||
sVendor = 'Project Odin';
|
||||
sVersion = '0.5';
|
||||
|
||||
|
||||
/*
|
||||
* Parse parameters.
|
||||
*/
|
||||
parse arg sArgs
|
||||
if (sArgs = '') then
|
||||
do
|
||||
call syntax;
|
||||
exit(1);
|
||||
end
|
||||
|
||||
do while (sArgs <> '')
|
||||
sArgs = strip(sArgs);
|
||||
if (substr(sArgs, 1, 1) = '-' | substr(sArgs, 1, 1) = '/') then
|
||||
do /*
|
||||
* Option.
|
||||
*/
|
||||
ch = translate(substr(sArgs, 2, 1));
|
||||
if (pos(ch, 'ACDHLMNPRTV') < 1) then
|
||||
do
|
||||
say 'invalid option:' substr(sArgs, 1, 2);
|
||||
call syntax;
|
||||
exit(2);
|
||||
end
|
||||
|
||||
/* get value and advance sArgs to next or to end. */
|
||||
if (substr(sArgs, 3, 1) = '"') then
|
||||
do
|
||||
iNext = pos('"', sArgs, 4);
|
||||
fQuote = 1;
|
||||
end
|
||||
else
|
||||
do
|
||||
iNext = pos(' ', sArgs, 3);
|
||||
if (iNext <= 0) then
|
||||
iNext = length(sArgs);
|
||||
fQuote = 0;
|
||||
end
|
||||
|
||||
if (iNext > 3 | ch = 'R') then
|
||||
do
|
||||
sValue = substr(sArgs, 3 + fQuote, iNext - 3 - fQuote);
|
||||
sArgs = strip(substr(sArgs, iNext+1));
|
||||
/*say 'iNext:' iNext 'sValue:' sValue 'sArgs:' sArgs; */
|
||||
|
||||
/* check if we're gonna search for something in an file. */
|
||||
if (sValue <> '' & pos('#define=', sValue) > 0) then
|
||||
sValue = LookupDefine(sValue);
|
||||
end
|
||||
else
|
||||
do
|
||||
say 'syntax error near' substr(sArgs, 1, 2)'.';
|
||||
call syntax;
|
||||
exit(3);
|
||||
end
|
||||
|
||||
|
||||
/* set value */
|
||||
select
|
||||
when (ch = 'A') then /* ASD Feature Id */
|
||||
sASDFeatureId = sValue;
|
||||
|
||||
when (ch = 'C') then /* Country code */
|
||||
sCountryCode = sValue;
|
||||
|
||||
when (ch = 'D') then /* Description */
|
||||
sDescription = sValue;
|
||||
|
||||
when (ch = 'H') then /* Hostname */
|
||||
sHostname = sValue;
|
||||
|
||||
when (ch = 'L') then /* Language code */
|
||||
sLanguageCode = sValue;
|
||||
|
||||
when (ch = 'M') then /* MiniVer */
|
||||
sMiniVer = sValue;
|
||||
|
||||
when (ch = 'N') then /* Vendor */
|
||||
sVendor = sValue;
|
||||
|
||||
when (ch = 'R') then /* Vendor */
|
||||
sDescription = ReadDescription(sValue, sDefFile);
|
||||
|
||||
when (ch = 'P') then /* Fixpak version */
|
||||
sFixPakVer = sValue;
|
||||
|
||||
when (ch = 'T') then /* Date Time */
|
||||
sDateTime = sValue;
|
||||
|
||||
when (ch = 'V') then /* Version */
|
||||
sVersion = sValue;
|
||||
|
||||
/* Otherwise it's an illegal option */
|
||||
otherwise
|
||||
say 'invalid option:' substr(sArgs, 1, 2);
|
||||
call syntax;
|
||||
exit(2);
|
||||
end /* select */
|
||||
end
|
||||
else
|
||||
do /*
|
||||
* Defition file...
|
||||
*/
|
||||
if (sDefFileOut <> '') then
|
||||
do
|
||||
say 'Syntax error: Can''t specify more than two defintion files!';
|
||||
exit(4);
|
||||
end
|
||||
if (sDefFileIn = '') then
|
||||
parse value sArgs with sDefFileIn' 'sArgs
|
||||
else
|
||||
parse value sArgs with sDefFileOut' 'sArgs
|
||||
sArgs = strip(sArgs);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
/* check that a defintion file was specified. */
|
||||
if (sDefFileIn = '') then
|
||||
do
|
||||
say 'Syntax error: Will have to specify a .def-file to update.';
|
||||
call syntax;
|
||||
exit(5);
|
||||
end
|
||||
|
||||
|
||||
/*
|
||||
* Trim strings to correct lengths.
|
||||
*/
|
||||
sVendor = strip(substr(sVendor, 1, 31));
|
||||
if (substr(sDateTime, 1, 1) <> ' ') then
|
||||
sDateTime = ' ' || sDateTime;
|
||||
sDateTime = left(sDateTime, 26);
|
||||
sHostname = strip(substr(sHostname, 1, 11));
|
||||
sMiniVer = strip(substr(sMiniVer, 1, 11));
|
||||
sDescription = strip(substr(sDescription, 1, 80));
|
||||
sCountryCode = strip(substr(sCountryCode, 1, 4));
|
||||
sLanguageCode = strip(substr(sLanguageCode, 1, 4));
|
||||
sASDFeatureId = strip(substr(sASDFeatureId, 1, 11));
|
||||
sFixPakVer = strip(substr(sFixPakVer, 1, 11));
|
||||
|
||||
|
||||
/*
|
||||
* Signature
|
||||
*/
|
||||
sEnhSign = '##1##'
|
||||
|
||||
/*
|
||||
* Build description string.
|
||||
*/
|
||||
sDescription = '@#'sVendor':'sVersion'#@'sEnhSign||,
|
||||
sDateTime||sHostname||,
|
||||
':'sASDFeatureId':'sLanguageCode':'sCountryCode':'sMiniVer||,
|
||||
'::'sFixPakVer'@@'sDescription;
|
||||
|
||||
/*
|
||||
* Update .def-file.
|
||||
*/
|
||||
call SysFileDelete(sDefFileIn);
|
||||
rc = lineout( sDefFileIn, 'RCDATA 1 { "' || sDescription || '" }');
|
||||
|
||||
/*rc = UpdateDefFile(sDefFileIn, sDefFileOut, sDescription);*/
|
||||
exit(rc);
|
||||
|
||||
|
||||
/**
|
||||
* Display script syntax.
|
||||
*/
|
||||
syntax: procedure
|
||||
say 'Syntax: MakeDesc.cmd [options] <deffile in> <deffile out> [options]'
|
||||
say ' <deffile> Defitionfile which will have an DESCRIPTION appended.'
|
||||
say 'Options:'
|
||||
say ' -A<string> ASD Feature Id.'
|
||||
say ' -C<string> Country code.'
|
||||
say ' -D<string> Description.'
|
||||
say ' -R[deffile] Read description from .def file.'
|
||||
say ' -H<string> Hostname.'
|
||||
say ' -L<string> Language code.'
|
||||
say ' -M<string> MiniVer.'
|
||||
say ' -N<string> Vendor.'
|
||||
say ' -P<string> Fixpak version.'
|
||||
say ' -T<string> Date Time.'
|
||||
say ' -V<string> Version.'
|
||||
say '<string> could be a double qoute qouted string or a single word.'
|
||||
say ' You could also reference #defines in C/C++ include files.'
|
||||
say ' The string should then have this form:'
|
||||
say ' "#define=<DEFINE_NAME>,<includefile.h>"'
|
||||
say '';
|
||||
|
||||
return;
|
||||
|
||||
|
||||
/**
|
||||
* Search for a #define in an C/C++ header or source file.
|
||||
*
|
||||
* @returns String containing the defined value
|
||||
* found for the define in the header file.
|
||||
* Quits on fatal errors.
|
||||
* @param A string on the form: "#define=DEFINETOFIND,includefile.h"
|
||||
* @remark Write only code... - let's hope it works.
|
||||
*/
|
||||
LookupDefine: procedure
|
||||
parse arg '#'sDefine'='sMacro','sIncludeFile
|
||||
|
||||
/*
|
||||
* Validate parameters.
|
||||
*/
|
||||
sMacro = strip(sMacro);
|
||||
sIncludeFile = strip(sIncludeFile);
|
||||
if (sMacro = '') then
|
||||
do
|
||||
say 'syntax error: #define=<DEFINE_NAME>,<includefile.h>.';
|
||||
say ' <DEFINE_NAME> was empty.';
|
||||
exit(-20);
|
||||
end
|
||||
if (sIncludeFile = '') then
|
||||
do
|
||||
say 'syntax error: #define=<DEFINE_NAME>,<includefile.h>.';
|
||||
say ' <includefile.h> was empty.';
|
||||
exit(-20);
|
||||
end
|
||||
|
||||
|
||||
sIllegal = translate(translate(sMacro),,
|
||||
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!',,
|
||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_');
|
||||
|
||||
if (strip(translate(sIllegal, ' ', '!')) <> '') then
|
||||
do
|
||||
say 'syntax error: #define=<DEFINE_NAME>,<includefile.h>.';
|
||||
say ' <DEFINE_NAME> contains illegal charater(s).'
|
||||
say ' 'sMacro;
|
||||
say ' 'translate(sIllegal, ' ', '!');
|
||||
exit(-20);
|
||||
end
|
||||
|
||||
/*
|
||||
* Open include file.
|
||||
*/
|
||||
sRc = stream(sIncludeFile, 'c', 'open read');
|
||||
if (pos('READY', sRc) <> 1) then
|
||||
do /* search INCLUDE variable */
|
||||
sFile = SysSearchPath('INCLUDE', sIncludeFile);
|
||||
if (sFile = '') then
|
||||
do
|
||||
say 'Can''t find include file 'sIncludeFile'.';
|
||||
exit(-20);
|
||||
end
|
||||
sIncludeFile = sFile;
|
||||
|
||||
sRc = stream(sIncludeFile, 'c', 'open read');
|
||||
if (pos('READY', sRc) <> 1) then
|
||||
do
|
||||
say 'Failed to open include file' sIncludeFile'.';
|
||||
exit(-20);
|
||||
end
|
||||
end
|
||||
|
||||
/*
|
||||
* Search the file line by line.
|
||||
* We'll check for lines starting with a hash (#) char.
|
||||
* Then check that the word after the hash is 'define'.
|
||||
* Then match the next word with the macro name.
|
||||
* Then then get the next rest of the line to comment or continuation char.
|
||||
* (continuation is not supported)
|
||||
* Finally strip quotes.
|
||||
*/
|
||||
sValue = '';
|
||||
do while (lines(sIncludeFile) > 0)
|
||||
sLine = strip(linein(sIncludeFile));
|
||||
if (sLine = '') then
|
||||
iterate;
|
||||
if (substr(sLine, 1, 1) <> '#') then
|
||||
iterate;
|
||||
sLine = substr(sLine, 2);
|
||||
if (word(sLine, 1) <> 'define') then
|
||||
iterate;
|
||||
sLine = strip(substr(sLine, wordpos(sLine, 1) + length('define')+1));
|
||||
if ( substr(sLine, 1, length(sMacro)) <> sMacro,
|
||||
| substr(sLine, length(sMacro)+1, 1) <> ' ') then
|
||||
iterate;
|
||||
sLine = strip(substr(sLine, length(sMacro) + 1));
|
||||
if (sLine = '') then
|
||||
do
|
||||
say 'error: #define' sMacro' is empty.';
|
||||
call stream sIncludeFile, 'c', 'close';
|
||||
exit(-20);
|
||||
end
|
||||
|
||||
chQuote = substr(sLine, 1, 1);
|
||||
if (chQuote = '"' | chQuote = "'") then
|
||||
do /* quoted string */
|
||||
iLastQuote = 0;
|
||||
do forever
|
||||
iLast = pos(chQuote, sLine, 2);
|
||||
if (iLast <= 0) then
|
||||
leave;
|
||||
if (substr(sLine, iLast, 1) = '\') then
|
||||
iterate;
|
||||
iLastQuote = iLast;
|
||||
leave;
|
||||
end
|
||||
|
||||
if (iLastQuote <= 0) then
|
||||
do
|
||||
say 'C/C++ syntax error in 'sIncludefile': didn''t find end quote.';
|
||||
call stream sIncludeFile, 'c', 'close';
|
||||
exit(-20);
|
||||
end
|
||||
|
||||
call stream sIncludeFile, 'c', 'close';
|
||||
sValue = substr(sLine, 2, iLastQuote - 2);
|
||||
say 'Found 'sMacro'='sValue;
|
||||
return sValue;
|
||||
end
|
||||
else
|
||||
do
|
||||
iCommentCPP = pos('//',sLine);
|
||||
iCommentC = pos('/*',sLine);
|
||||
if (iCommentC > 0 & iCommentCPP > 0 & iCommentC > iCommentCPP) then
|
||||
iComment = iCommentCPP;
|
||||
else if (iCommentC > 0 & iCommentCPP > 0 & iCommentC < iCommentCPP) then
|
||||
iComment = iCommentC;
|
||||
else if (iCommentCPP > 0) then
|
||||
iComment = iCommentCPP;
|
||||
else if (iCommentC > 0) then
|
||||
iComment = iCommentC;
|
||||
else
|
||||
iComment = 0;
|
||||
|
||||
if (iComment > 0) then
|
||||
sValue = strip(substr(sLine, 1, iComment-1));
|
||||
else
|
||||
sValue = strip(sLine);
|
||||
|
||||
if (sValue <> '') then
|
||||
do
|
||||
if (substr(sValue, length(sValue)) = '\') then
|
||||
do
|
||||
say 'Found continuation char: Multiline definitions are not supported!\n';
|
||||
call stream sIncludeFile, 'c', 'close';
|
||||
exit(-20);
|
||||
end
|
||||
end
|
||||
|
||||
if (sValue = '') then
|
||||
say 'warning: The #define has no value.';
|
||||
|
||||
call stream sIncludeFile, 'c', 'close';
|
||||
say 'Found 'sMacro'='sValue;
|
||||
return sValue;
|
||||
end
|
||||
end
|
||||
|
||||
call stream sIncludeFile, 'c', 'close';
|
||||
say 'error: didn''t find #define' sMacro'.';
|
||||
exit(-20);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reads the description line for a .def-file.
|
||||
* @returns The Description string, with quotes removed.
|
||||
* Empty string is acceptable.
|
||||
* On error we'll terminate the script.
|
||||
* @param sDefFile Filaname of .def-file to read the description from.
|
||||
* @param sDefFile2 Used if sDefFile is empty.
|
||||
* @author knut st. osmundsen (knut.stange.osmundsen@mynd.no)
|
||||
*/
|
||||
ReadDescription: procedure;
|
||||
parse arg sDefFile, sDefFile2
|
||||
|
||||
/*
|
||||
* Validate parameters.
|
||||
*/
|
||||
if (sDefFile = '') then
|
||||
sDefFile = sDefFile2;
|
||||
if (sDefFile = '') then
|
||||
do
|
||||
say 'error: no definition file to get description from.'
|
||||
exit(-1);
|
||||
end
|
||||
|
||||
/*
|
||||
* Open file
|
||||
*/
|
||||
rc = stream(sDefFile, 'c', 'open read');
|
||||
if (pos('READY', rc) <> 1) then
|
||||
do
|
||||
say 'error: failed to open deffile file.';
|
||||
exit(-1);
|
||||
end
|
||||
|
||||
|
||||
/*
|
||||
* Search for the 'DESCRIPTION' line.
|
||||
*/
|
||||
do while (lines(sDefFile) > 0)
|
||||
sLine = strip(linein(sDefFile));
|
||||
if (sLine = '') then
|
||||
iterate;
|
||||
if (translate(word(sLine, 1)) <> 'DESCRIPTION') then
|
||||
iterate;
|
||||
sLine = strip(substr(sLine, wordpos(sLine, 1) + length('DESCRIPTION')+1));
|
||||
|
||||
ch = substr(sLine, 1, 1);
|
||||
if (ch <> "'" & ch <> '"') then
|
||||
do
|
||||
say 'syntax error: description line in' sDefFile 'is misformed.';
|
||||
call stream sDefFile, 'c', 'close';
|
||||
exit(-10);
|
||||
end
|
||||
|
||||
iEnd = pos(ch, sLine, 2);
|
||||
if (iEnd <= 0) then
|
||||
do
|
||||
say 'syntax error: description line in' sDefFile 'is misformed.';
|
||||
call stream sDefFile, 'c', 'close';
|
||||
exit(-10);
|
||||
end
|
||||
|
||||
call stream sDefFile, 'c', 'close';
|
||||
sValue = substr(sLine, 2, iEnd - 2);
|
||||
say 'Found Description:' sValue;
|
||||
return sValue;
|
||||
end
|
||||
|
||||
call stream sDefFile, 'c', 'close';
|
||||
say 'info: Didn''t find description line in' sDefFile'.';
|
||||
return '';
|
||||
|
||||
|
||||
/**
|
||||
* This is a function which reads sDefFileIn into and
|
||||
* internal array and changes the DESCRIPTION text if found.
|
||||
* If DESCRIPTION isn't found, it is added at the end.
|
||||
* The array is written to sDefFileOut.
|
||||
* @returns 0 on succes.
|
||||
* Errorcode on error.
|
||||
* @param sDefFileIn Input .def-file.
|
||||
* @param sDefFileOut Output .def-file. Overwritten.
|
||||
* @param sDescription New description string.
|
||||
* @author knut st. osmundsen (knut.stange.osmundsen@mynd.no)
|
||||
*/
|
||||
UpdateDefFile: procedure;
|
||||
parse arg sDefFileIn, sDefFileOut, sDescription
|
||||
|
||||
/*
|
||||
* Validate parameters.
|
||||
*/
|
||||
if (sDefFileOut = '') then
|
||||
sDefFileOut = sDefFileIn;
|
||||
|
||||
/*
|
||||
* Open file input file.
|
||||
*/
|
||||
rc = stream(sDefFileIn, 'c', 'open read');
|
||||
if (pos('READY', rc) <> 1) then
|
||||
do
|
||||
say 'error: failed to open' sDefFileIn 'file.';
|
||||
return 110;
|
||||
end
|
||||
|
||||
|
||||
/*
|
||||
* Search for the 'BLDLEVEL' line.
|
||||
*/
|
||||
i = 0;
|
||||
fDescription = 0;
|
||||
do while (lines(sDefFileIn) > 0)
|
||||
/*
|
||||
* Read line.
|
||||
*/
|
||||
i = i + 1;
|
||||
asFile.i = linein(sDefFileIn);
|
||||
|
||||
/*
|
||||
* Look for BLDLEVEL;
|
||||
*/
|
||||
if (asFile.i = '') then
|
||||
iterate;
|
||||
if (translate(word(strip(asFile.i), 1)) <> 'BLDLEVEL') then
|
||||
iterate;
|
||||
if (fDescription) then
|
||||
do
|
||||
say 'warning: multiple descriptions lines. Line' i 'removed';
|
||||
i = i - 1;
|
||||
iterate;
|
||||
end
|
||||
|
||||
/*
|
||||
* Found description - replace with new description.
|
||||
*/
|
||||
asFile.i = "BldLevel = '"||sDescription||"'";
|
||||
fDescription = 1;
|
||||
end
|
||||
|
||||
/*
|
||||
* Add description is none was found.
|
||||
*/
|
||||
if (\fDescription) then
|
||||
do
|
||||
i = i + 1;
|
||||
asFile.i = "BldLevel = '"||sDescription||"'";
|
||||
end
|
||||
asFile.0 = i;
|
||||
|
||||
|
||||
/*
|
||||
* Close input file and open output file.
|
||||
*/
|
||||
call stream sDefFileIn, 'c', 'close';
|
||||
call SysFileDelete(sDefFileOut);
|
||||
rc = stream(sDefFileOut, 'c', 'open write');
|
||||
if (pos('READY', rc) <> 1) then
|
||||
do
|
||||
say 'error: failed to open outputfile' sDefFileOut 'file.';
|
||||
return 110;
|
||||
end
|
||||
|
||||
/*
|
||||
* Make firstline and write all the lines to the output file.
|
||||
*/
|
||||
/*call lineout sDefFileOut, '; Updated by makedesc.cmd', 1;*/
|
||||
do i = 1 to asFile.0
|
||||
rc = lineout(sDefFileOut, asFile.i);
|
||||
if (rc > 0) then
|
||||
do
|
||||
say 'error: failed to write line' i 'to' sDefFileOut'.'
|
||||
call stream sDefFileOut, 'c', 'close';
|
||||
return 5;
|
||||
end
|
||||
end
|
||||
|
||||
/*
|
||||
* Close output file and return succesfully.
|
||||
*/
|
||||
call stream sDefFileOut, 'c', 'close';
|
||||
return 0;
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
|
||||
|
||||
2005/01/01
|
||||
- removed references to ISAM and MERGE
|
||||
|
||||
2002/05/02
|
||||
- now libinit is automatically called on client dll startup
|
||||
|
||||
2002/01/27
|
||||
- fixed console output for get_password
|
||||
|
||||
2002/01/20
|
||||
- back-ported fix for fulltext indexes (wrong report by myisamchk)
|
||||
|
||||
2001/11/21
|
||||
- MySQL 3.32.42 build 3 released.
|
||||
|
||||
2001/11/19
|
||||
- got GNU Readline to compile with VAC++, now console has a working
|
||||
history.
|
||||
|
||||
2001/11/10
|
||||
- fixed file locking on non-JFS disks; DosSetFileLocksL does not
|
||||
support ranges > 2GB on non-JFS disks.
|
||||
|
||||
2001/09/16
|
||||
- fixed creation directory of temporary files
|
||||
- enabled cached list file for deleting temp open files
|
||||
|
||||
2001/09/10
|
||||
- Build source 3.23.42, released
|
||||
|
||||
2001/09/08
|
||||
- fixed file api
|
||||
|
||||
2001/06/12
|
||||
- fixed support for > 2GB file size, needs also DosOpenL
|
||||
- mixed 64bit/32bit file size support, dinamic loading of
|
||||
64bit API.
|
||||
|
||||
2001/06/03
|
||||
- added support for > 2GB file size
|
||||
|
||||
2001/06/02
|
||||
- fixed file locking code
|
||||
|
||||
2001/05/29
|
||||
- 3.23.38 build
|
||||
|
||||
2001/05/20
|
||||
- rint fix
|
||||
- isam O_RDONLY table handled fix
|
||||
|
||||
2001/05/19
|
||||
- new TLS code, fixed parser crashes and many other problems.
|
||||
- fixed pthread_cond_timedwait, now handle manager expires
|
|
@ -1,28 +0,0 @@
|
|||
# Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
## Process this file with automake to create Makefile.in
|
||||
|
||||
EXTRA_DIST = BldLevel.RES BldLevel.cmd BldLevel.rc \
|
||||
BldLevelInf.cmd ChangeLog.os2 MySQL-Client.icc \
|
||||
MySQL-Opt.icc MySQL-Source.icc MySQL-Sql.icc \
|
||||
MySQL-Sql.irs MySQL-Util.icc MySQL-Util.irs \
|
||||
ReadMe.txt build-all.cmd mysql-inf.wis \
|
||||
mysql.wis mysqlalt.wis rint.cmd rint.obj rint.s
|
||||
SUBDIRS = include
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
|
@ -1,122 +0,0 @@
|
|||
// disable code inlining when building static libs
|
||||
InlineCode = "no"
|
||||
|
||||
// include common options
|
||||
include "MySQL-Opt.icc"
|
||||
include "MySQL-Source.icc"
|
||||
|
||||
option ProjectOptions = MySQLOptions
|
||||
{
|
||||
|
||||
option file(genobject, "..\\OBJ\\ZLIB\\")
|
||||
{
|
||||
target "..\\bin\\mysql.dll"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
// target source files
|
||||
source zlib
|
||||
if debug_build {
|
||||
source type('cpp') dbug
|
||||
}
|
||||
source type('cpp') my_sys
|
||||
source type('cpp') my_sys_cli
|
||||
source type('cpp') strings
|
||||
source type('cpp') mysqlclientlib
|
||||
source type('cpp') '..\libmysql\dll.c'
|
||||
source BldLevelInfo
|
||||
}
|
||||
}
|
||||
|
||||
option file(genobject, "..\\OBJ\\READLINE\\")
|
||||
{
|
||||
target "..\\bin\\mysql.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
// target source files
|
||||
source type('cpp') "..\\client\\mysql.cc"
|
||||
source BldLevelInfo
|
||||
option define("HAVE_STRING_H", ), define("HAVE_CONFIG_H", )
|
||||
{
|
||||
source GnuReadline
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
target "..\\bin\\mysqladmin.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
// target source files
|
||||
source type('cpp') "..\\client\\mysqladmin.c"
|
||||
source BldLevelInfo
|
||||
}
|
||||
|
||||
target "..\\bin\\mysqldump.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
// target source files
|
||||
source type('cpp') "..\\client\\mysqldump.c"
|
||||
source BldLevelInfo
|
||||
}
|
||||
|
||||
target "..\\bin\\mysqlshow.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\client\\mysqlshow.c"
|
||||
source BldLevelInfo
|
||||
}
|
||||
|
||||
target "..\\bin\\mysqlimport.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\client\\mysqlimport.c"
|
||||
source BldLevelInfo
|
||||
}
|
||||
|
||||
target "..\\bin\\mysqltest.exe"
|
||||
{
|
||||
source type('cpp') "..\\client\\mysqltest.c"
|
||||
source BldLevelInfo
|
||||
}
|
||||
|
||||
target "..\\bin\\mysqlbinlog.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
// target source files
|
||||
source type('cpp') "..\\client\\mysqlbinlog.cc"
|
||||
source BldLevelInfo
|
||||
}
|
||||
|
||||
target "..\\bin\\mysqlcheck.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
|
||||
// target source files
|
||||
source type('cpp') "..\\client\\mysqlcheck.c"
|
||||
source BldLevelInfo
|
||||
}
|
||||
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
// set to 1 to enable debug code
|
||||
debug_build = 0
|
||||
|
||||
// set to zlib relative directory name
|
||||
zlib_dir = '../../zlib-1.1.4'
|
||||
|
||||
// common options
|
||||
option BaseOptions = link(defaultlibsname, "tcpip32.lib")
|
||||
, link(libsearchpath, "..\\lib\\")
|
||||
, link(libsearchpath, "..\\bin\\")
|
||||
, link(pmtype, vio)
|
||||
, link(padding, no)
|
||||
, link(linkwithmultithreadlib, "yes")
|
||||
, link(linkwithsharedlib, "no")
|
||||
, link(stack, 131072, 131072)
|
||||
, gen(initauto, "yes")
|
||||
, define("__MT__", )
|
||||
, define("HAVE_BSD_SIGNALS", )
|
||||
, define("INCL_DOS", )
|
||||
, define("INCL_DOSERRORS", )
|
||||
, define("INCL_LONGLONG", )
|
||||
, define("OS2", )
|
||||
, define("USE_TLS", )
|
||||
, lang(signedchars, yes)
|
||||
, incl(searchpath, "..")
|
||||
, incl(searchpath, "include")
|
||||
, incl(searchpath, "..\\include")
|
||||
, incl(searchpath, "..\\my_sys")
|
||||
, incl(searchpath, "..\\regex")
|
||||
, incl(searchpath, "..\\sql")
|
||||
, incl(searchpath, zlib_dir)
|
||||
, incl(searchpath, "..\\..\\ufc")
|
||||
, incl(searchpath, "..\\os2")
|
||||
|
||||
option ReleaseOptions = link(debug, "no")
|
||||
, define("DBUG_OFF", )
|
||||
, gen(arch, "pentium")
|
||||
, opt(tune, "pentium2")
|
||||
, opt(level, "0")
|
||||
, opt(stackchaining, no)
|
||||
, opt(size, yes)
|
||||
, opt(autoinline, InlineCode)
|
||||
, opt(inline, InlineCode)
|
||||
, opt(schedule, no)
|
||||
|
||||
option DebugOptions = link(debug, "yes")
|
||||
, gen(debug, "yes")
|
||||
, define("DBUG_ON", )
|
||||
|
||||
|
||||
if debug_build {
|
||||
|
||||
option MySQLOptions = BaseOptions, DebugOptions
|
||||
|
||||
} else {
|
||||
|
||||
option MySQLOptions = BaseOptions, ReleaseOptions
|
||||
|
||||
}
|
|
@ -1,324 +0,0 @@
|
|||
group client_global_pch =
|
||||
'os2.h',
|
||||
'assert.h', 'direct.h', 'errno.h', 'nerrno.h',
|
||||
'limits.h', 'io.h', 'math.h',
|
||||
'stdio.h', 'stdlib.h', 'stddef.h',
|
||||
'sys/stat.h', 'sys/types.h', 'sys/time.h',
|
||||
'types.h', 'string.h', 'stdarg.h',
|
||||
|
||||
'my_base.h', 'config-os2.h', 'my_dir.h',
|
||||
'global.h', 'thr_alarm.h', 'm_string.h',
|
||||
'mysql.h', 'zconf.h', 'zlib.h', 'mysys_err.h',
|
||||
'm_ctype.h', 'mysqld_error.h',
|
||||
'my_list.h', 'my_sys.h', 'my_net.h',
|
||||
'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h',
|
||||
'.\regex\my_regex.h'
|
||||
|
||||
group server_global_pch =
|
||||
'os2.h',
|
||||
'string.h', 'assert.h', 'share.h', 'stdarg.h', 'stdio.h',
|
||||
'stdlib.h', 'stddef.h', 'math.h', 'io.h', 'limits.h',
|
||||
'process.h', 'errno.h', 'nerrno.h', 'sys/types.h',
|
||||
'sys/time.h', 'sys/stat.h', 'sys/param.h', 'sys/ioccom.h',
|
||||
'sys/filio.h', 'sys/sockio.h', 'sys/ioctlos2.h','sys/ioctl.h', 'types.h',
|
||||
'sys/utime.h', 'sys/select.h', 'sys/un.h',
|
||||
'netinet/in_systm.h', 'netinet/tcp.h',
|
||||
|
||||
'global.h', 'my_base.h', 'config-os2.h',
|
||||
'my_dir.h', 'my_sys.h', 'mysql.h',
|
||||
'my_bitmap.h', 'violite.h', 'mysql_priv.h',
|
||||
'm_string.h', 'm_ctype.h',
|
||||
'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h',
|
||||
'sql_string.h', 'item.h', 'unireg.h',
|
||||
'field.h', 'sql_lex.h', 'sql_list.h', 'sql_repl.h',
|
||||
'md5.h', 'sql_acl.h', 'slave.h',
|
||||
'ha_myisam.h', 'procedure.h', 'sql_select.h',
|
||||
'errmsg.h', 't_ctype.h', 'direct.h',
|
||||
'mysys_err.h', 'zconf.h', 'zlib.h',
|
||||
'my_tree.h', '..\mysys\my_static.h', 'netdb.h',
|
||||
'thr_alarm.h', 'heap.h', '..\myisam\fulltext.h',
|
||||
'..\myisam\ftdefs.h', 'myisammrg.h',
|
||||
'.\regex\my_regex.h'
|
||||
|
||||
group server_pch =
|
||||
'ha_heap.h', 'ha_myisammrg.h', 'opt_ft.h',
|
||||
'hash_filo.h', 'mini_client.h', 'sql_repl.h',
|
||||
'sql_analyse.h', 'item_create.h', '..\mysys\mysys_priv.h'
|
||||
|
||||
group mysqlclientlib =
|
||||
"..\\client\\readline.cc",
|
||||
"..\\client\\sql_string.cc",
|
||||
"..\\client\\completion_hash.cc",
|
||||
"..\\libmysql\\libmysql.c",
|
||||
"..\\libmysql\\errmsg.c",
|
||||
"..\\libmysql\\get_password.c",
|
||||
"..\\libmysql\\net.c",
|
||||
"..\\libmysql\\password.c",
|
||||
"..\\libmysql\\violite.c"
|
||||
|
||||
group zlib =
|
||||
zlib_dir "/compress.c",
|
||||
zlib_dir "/crc32.c",
|
||||
zlib_dir "/deflate.c",
|
||||
zlib_dir "/gzio.c",
|
||||
zlib_dir "/infblock.c",
|
||||
zlib_dir "/infcodes.c",
|
||||
zlib_dir "/inffast.c",
|
||||
zlib_dir "/inflate.c",
|
||||
zlib_dir "/inftrees.c",
|
||||
zlib_dir "/infutil.c",
|
||||
zlib_dir "/trees.c",
|
||||
zlib_dir "/uncompr.c",
|
||||
zlib_dir "/zutil.c",
|
||||
zlib_dir "/adler32.c"
|
||||
|
||||
group ufc =
|
||||
"..\\..\\ufc\\crypt.c",
|
||||
"..\\..\\ufc\\crypt_util.c",
|
||||
"..\\..\\ufc\\crypt-entry.c"
|
||||
|
||||
group sql =
|
||||
"..\\sql\\convert.cc",
|
||||
"..\\sql\\derror.cc",
|
||||
"..\\sql\\field.cc",
|
||||
"..\\sql\\field_conv.cc",
|
||||
"..\\sql\\filesort.cc",
|
||||
"..\\sql\\ha_heap.cc",
|
||||
"..\\sql\\ha_myisam.cc",
|
||||
"..\\sql\\ha_myisammrg.cc",
|
||||
"..\\sql\\handler.cc",
|
||||
"..\\sql\\hash_filo.cc",
|
||||
"..\\sql\\hostname.cc",
|
||||
"..\\sql\\init.cc",
|
||||
"..\\sql\\item.cc",
|
||||
"..\\sql\\item_buff.cc",
|
||||
"..\\sql\\item_cmpfunc.cc",
|
||||
"..\\sql\\item_create.cc",
|
||||
"..\\sql\\item_func.cc",
|
||||
"..\\sql\\item_strfunc.cc",
|
||||
"..\\sql\\item_sum.cc",
|
||||
"..\\sql\\item_timefunc.cc",
|
||||
"..\\sql\\item_uniq.cc",
|
||||
"..\\sql\\key.cc",
|
||||
"..\\sql\\lock.cc",
|
||||
"..\\sql\\log.cc",
|
||||
"..\\sql\\log_event.cc",
|
||||
"..\\sql\\md5.c",
|
||||
"..\\sql\\mf_iocache.cc",
|
||||
"..\\sql\\mini_client.cc",
|
||||
"..\\sql\\mini_client_errors.c",
|
||||
"..\\sql\\mysqld.cc",
|
||||
"..\\sql\\net_pkg.cc",
|
||||
"..\\sql\\net_serv.cc",
|
||||
"..\\sql\\opt_ft.cc",
|
||||
"..\\sql\\opt_range.cc",
|
||||
"..\\sql\\OPT_SUM.cc",
|
||||
"..\\sql\\password.c",
|
||||
"..\\sql\\procedure.cc",
|
||||
"..\\sql\\records.cc",
|
||||
"..\\sql\\slave.cc",
|
||||
"..\\sql\\sql_acl.cc",
|
||||
"..\\sql\\sql_analyse.cc",
|
||||
"..\\sql\\sql_base.cc",
|
||||
"..\\sql\\sql_cache.cc",
|
||||
"..\\sql\\sql_class.cc",
|
||||
"..\\sql\\sql_crypt.cc",
|
||||
"..\\sql\\sql_db.cc",
|
||||
"..\\sql\\sql_do.cc",
|
||||
"..\\sql\\sql_delete.cc",
|
||||
"..\\sql\\sql_insert.cc",
|
||||
"..\\sql\\sql_lex.cc",
|
||||
"..\\sql\\sql_list.cc",
|
||||
"..\\sql\\sql_load.cc",
|
||||
"..\\sql\\sql_manager.cc",
|
||||
"..\\sql\\sql_map.cc",
|
||||
"..\\sql\\sql_parse.cc",
|
||||
"..\\sql\\sql_rename.cc",
|
||||
"..\\sql\\sql_repl.cc",
|
||||
"..\\sql\\sql_select.cc",
|
||||
"..\\sql\\sql_show.cc",
|
||||
"..\\sql\\sql_string.cc",
|
||||
"..\\sql\\sql_table.cc",
|
||||
"..\\sql\\sql_test.cc",
|
||||
"..\\sql\\sql_update.cc",
|
||||
"..\\sql\\sql_udf.cc",
|
||||
"..\\sql\\sql_yacc.c",
|
||||
"..\\sql\\table.cc",
|
||||
"..\\sql\\thr_malloc.cc",
|
||||
"..\\sql\\time.cc",
|
||||
"..\\sql\\unireg.cc",
|
||||
"..\\sql\\violite.c"
|
||||
|
||||
group strings =
|
||||
"..\\strings\\bchange.c",
|
||||
"..\\strings\\bmove.c",
|
||||
"..\\strings\\bmove_upp.c",
|
||||
"..\\strings\\ctype-big5.c",
|
||||
"..\\strings\\ctype-czech.c",
|
||||
"..\\strings\\ctype-euc_kr.c",
|
||||
"..\\strings\\ctype-gb2312.c",
|
||||
"..\\strings\\ctype-gbk.c",
|
||||
"..\\strings\\ctype-sjis.c",
|
||||
"..\\strings\\ctype-tis620.c",
|
||||
"..\\strings\\ctype-ujis.c",
|
||||
"..\\strings\\ctype.c",
|
||||
"..\\strings\\int2str.c",
|
||||
"..\\strings\\is_prefix.c",
|
||||
"..\\strings\\llstr.c",
|
||||
"..\\strings\\longlong2str.c",
|
||||
"..\\strings\\str2int.c",
|
||||
"..\\strings\\strappend.c",
|
||||
"..\\strings\\strcend.c",
|
||||
"..\\strings\\strcont.c",
|
||||
"..\\strings\\strend.c",
|
||||
"..\\strings\\strfill.c",
|
||||
"..\\strings\\strinstr.c",
|
||||
"..\\strings\\strmake.c",
|
||||
"..\\strings\\strmov.c",
|
||||
"..\\strings\\strnlen.c",
|
||||
"..\\strings\\strnmov.c",
|
||||
"..\\strings\\strtoull.c",
|
||||
"..\\strings\\strxmov.c",
|
||||
"..\\strings\\strxnmov.c"
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
group heap = "..\\heap\\hp_block.c", "..\\heap\\hp_clear.c",
|
||||
"..\\heap\\hp_close.c", "..\\heap\\hp_create.c", "..\\heap\\hp_delete.c",
|
||||
"..\\heap\\hp_extra.c", "..\\heap\\hp_hash.c",
|
||||
"..\\heap\\hp_info.c", "..\\heap\\hp_open.c",
|
||||
"..\\heap\\hp_panic.c", "..\\heap\\hp_rename.c",
|
||||
"..\\heap\\hp_rfirst.c", "..\\heap\\hp_rkey.c",
|
||||
"..\\heap\\hp_rlast.c", "..\\heap\\hp_rnext.c",
|
||||
"..\\heap\\hp_rprev.c", "..\\heap\\hp_rrnd.c",
|
||||
"..\\heap\\hp_rsame.c", "..\\heap\\hp_scan.c",
|
||||
"..\\heap\\hp_static.c", "..\\heap\\hp_update.c",
|
||||
"..\\heap\\hp_write.c", "..\\heap\\_check.c", "..\\heap\\_rectest.c"
|
||||
|
||||
|
||||
group myisammrg = "..\\myisammrg\\myrg_close.c",
|
||||
"..\\myisammrg\\myrg_create.c", "..\\myisammrg\\myrg_delete.c",
|
||||
"..\\myisammrg\\myrg_extra.c", "..\\myisammrg\\myrg_info.c",
|
||||
"..\\myisammrg\\myrg_locking.c",
|
||||
"..\\myisammrg\\myrg_open.c", "..\\myisammrg\\myrg_panic.c",
|
||||
"..\\myisammrg\\myrg_queue.c",
|
||||
"..\\myisammrg\\myrg_rfirst.c", "..\\myisammrg\\myrg_rkey.c",
|
||||
"..\\myisammrg\\myrg_rlast.c", "..\\myisammrg\\myrg_rnext.c",
|
||||
"..\\myisammrg\\myrg_rprev.c", "..\\myisammrg\\myrg_rrnd.c",
|
||||
"..\\myisammrg\\myrg_rsame.c",
|
||||
"..\\myisammrg\\myrg_static.c",
|
||||
"..\\myisammrg\\myrg_update.c"
|
||||
|
||||
group my_sys = "..\\mysys\\array.c", "..\\mysys\\charset.c",
|
||||
"..\\mysys\\checksum.c", "..\\mysys\\default.c", "..\\mysys\\errors.c",
|
||||
"..\\mysys\\getopt.c", "..\\mysys\\getopt1.c",
|
||||
"..\\mysys\\getvar.c", "..\\mysys\\hash.c", "..\\mysys\\list.c",
|
||||
"..\\mysys\\mf_brkhant.c", "..\\mysys\\mf_cache.c",
|
||||
"..\\mysys\\mf_casecnv.c", "..\\mysys\\mf_dirname.c",
|
||||
"..\\mysys\\mf_fn_ext.c", "..\\mysys\\mf_format.c",
|
||||
"..\\mysys\\mf_getdate.c",
|
||||
"..\\mysys\\mf_iocache2.c", "..\\mysys\\mf_keycache.c",
|
||||
"..\\mysys\\mf_loadpath.c", "..\\mysys\\mf_pack.c",
|
||||
"..\\mysys\\mf_pack2.c", "..\\mysys\\mf_path.c",
|
||||
"..\\mysys\\mf_qsort2.c",
|
||||
//"..\\mysys\\mf_qsort.c",
|
||||
"..\\mysys\\mf_radix.c", "..\\mysys\\mf_same.c",
|
||||
"..\\mysys\\mf_sort.c", "..\\mysys\\mf_soundex.c",
|
||||
"..\\mysys\\mf_stripp.c", "..\\mysys\\mf_tempfile.c",
|
||||
"..\\mysys\\mf_unixpath.c", "..\\mysys\\mf_wcomp.c",
|
||||
"..\\mysys\\mf_wfile.c", "..\\mysys\\mulalloc.c",
|
||||
"..\\mysys\\my_alarm.c", "..\\mysys\\my_alloc.c",
|
||||
"..\\mysys\\my_append.c", "..\\mysys\\my_bitmap.c",
|
||||
"..\\mysys\\my_chsize.c", "..\\mysys\\my_clock.c",
|
||||
"..\\mysys\\my_compress.c", "..\\mysys\\my_copy.c",
|
||||
"..\\mysys\\my_create.c", "..\\mysys\\my_delete.c",
|
||||
"..\\mysys\\my_div.c", "..\\mysys\\my_error.c",
|
||||
"..\\mysys\\my_fopen.c", "..\\mysys\\my_fstream.c",
|
||||
"..\\mysys\\my_getwd.c", "..\\mysys\\my_init.c",
|
||||
"..\\mysys\\my_lib.c", "..\\mysys\\my_lock.c",
|
||||
"..\\mysys\\my_lockmem.c", "..\\mysys\\my_lread.c",
|
||||
"..\\mysys\\my_lwrite.c", "..\\mysys\\my_malloc.c",
|
||||
"..\\mysys\\my_messnc.c", "..\\mysys\\my_mkdir.c",
|
||||
"..\\mysys\\my_net.c", "..\\mysys\\my_once.c",
|
||||
"..\\mysys\\my_open.c",
|
||||
"..\\mysys\\my_os2cond.c",
|
||||
"..\\mysys\\my_os2dlfcn.c",
|
||||
"..\\mysys\\my_os2dirsrch.c",
|
||||
"..\\mysys\\my_os2mutex.c", "..\\mysys\\my_os2thread.c",
|
||||
"..\\mysys\\my_os2tls.c",
|
||||
"..\\mysys\\my_os2file64.c",
|
||||
"..\\mysys\\my_pread.c", "..\\mysys\\my_pthread.c",
|
||||
"..\\mysys\\my_quick.c", "..\\mysys\\my_read.c",
|
||||
"..\\mysys\\my_realloc.c", "..\\mysys\\my_redel.c",
|
||||
"..\\mysys\\my_rename.c", "..\\mysys\\my_seek.c",
|
||||
"..\\mysys\\my_static.c", "..\\mysys\\my_tempnam.c",
|
||||
"..\\mysys\\my_thr_init.c", "..\\mysys\\my_vsnprintf.c",
|
||||
"..\\mysys\\my_write.c", "..\\mysys\\ptr_cmp.c",
|
||||
"..\\mysys\\queues.c", "..\\mysys\\raid.cc",
|
||||
//"..\\mysys\\safemalloc.c",
|
||||
"..\\mysys\\string.c",
|
||||
"..\\mysys\\thr_alarm.c",
|
||||
"..\\mysys\\thr_mutex.c", "..\\mysys\\thr_rwlock.c",
|
||||
"..\\mysys\\tree.c", "..\\mysys\\typelib.c"
|
||||
|
||||
group my_sys_cli = "..\\mysys\\mf_iocache.c"
|
||||
group my_sys_sql = "..\\mysys\\thr_lock.c"
|
||||
|
||||
group myisam = "..\\myisam\\ft_parser.c",
|
||||
"..\\myisam\\ft_search.c", "..\\myisam\\ft_static.c",
|
||||
"..\\myisam\\ft_stopwords.c", "..\\myisam\\ft_update.c",
|
||||
"..\\myisam\\mi_cache.c", "..\\myisam\\mi_changed.c",
|
||||
//"..\\myisam\\mi_check.c",
|
||||
"..\\myisam\\mi_checksum.c",
|
||||
"..\\myisam\\mi_close.c", "..\\myisam\\mi_create.c",
|
||||
"..\\myisam\\mi_dbug.c", "..\\myisam\\mi_delete.c",
|
||||
"..\\myisam\\mi_delete_all.c", "..\\myisam\\mi_delete_table.c",
|
||||
"..\\myisam\\mi_dynrec.c", "..\\myisam\\mi_extra.c",
|
||||
//"..\\myisam\\mi_error.c",
|
||||
"..\\myisam\\mi_info.c", "..\\myisam\\mi_key.c",
|
||||
"..\\myisam\\mi_locking.c", "..\\myisam\\mi_log.c",
|
||||
"..\\myisam\\mi_open.c", "..\\myisam\\mi_packrec.c",
|
||||
"..\\myisam\\mi_page.c", "..\\myisam\\mi_panic.c",
|
||||
"..\\myisam\\mi_range.c", "..\\myisam\\mi_rename.c",
|
||||
"..\\myisam\\mi_rfirst.c", "..\\myisam\\mi_rkey.c",
|
||||
"..\\myisam\\mi_rlast.c", "..\\myisam\\mi_rnext.c",
|
||||
"..\\myisam\\mi_rnext_same.c", "..\\myisam\\mi_rprev.c",
|
||||
"..\\myisam\\mi_rrnd.c", "..\\myisam\\mi_rsame.c",
|
||||
"..\\myisam\\mi_rsamepos.c", "..\\myisam\\mi_scan.c",
|
||||
"..\\myisam\\mi_search.c", "..\\myisam\\mi_static.c",
|
||||
"..\\myisam\\mi_statrec.c", "..\\myisam\\mi_unique.c",
|
||||
"..\\myisam\\mi_update.c", "..\\myisam\\mi_write.c"
|
||||
//"..\\myisam\\sort.c"
|
||||
|
||||
group dbug = "..\\dbug\\dbug.c", "..\\dbug\\factorial.c", "..\\dbug\\sanity.c"
|
||||
|
||||
group regex = "..\\regex\\regcomp.c", "..\\regex\\regerror.c",
|
||||
"..\\regex\\regexec.c", "..\\regex\\regfree.c", "..\\regex\\reginit.c"
|
||||
|
||||
group BldLevelInfo = 'os2\BldLevel.rc'
|
||||
|
||||
group GnuReadline =
|
||||
"..\\readline\\bind.c",
|
||||
"..\\readline\\callback.c",
|
||||
"..\\readline\\complete.c",
|
||||
"..\\readline\\display.c",
|
||||
"..\\readline\\funmap.c",
|
||||
"..\\readline\\histexpand.c", "..\\readline\\histfile.c",
|
||||
"..\\readline\\history.c", "..\\readline\\histsearch.c",
|
||||
"..\\readline\\input.c", "..\\readline\\isearch.c",
|
||||
"..\\readline\\keymaps.c",
|
||||
"..\\readline\\kill.c",
|
||||
"..\\readline\\macro.c",
|
||||
"..\\readline\\nls.c", "..\\readline\\parens.c",
|
||||
"..\\readline\\readline.c",
|
||||
"..\\readline\\rltty.c",
|
||||
"..\\readline\\search.c",
|
||||
"..\\readline\\shell.c",
|
||||
"..\\readline\\signals.c",
|
||||
"..\\readline\\terminal.c",
|
||||
"..\\readline\\tilde.c",
|
||||
"..\\readline\\undo.c",
|
||||
"..\\readline\\util.c",
|
||||
"..\\readline\\vi_mode.c",
|
||||
"..\\readline\\xmalloc.c"
|
|
@ -1,44 +0,0 @@
|
|||
// disable code inlining when building static libs
|
||||
InlineCode = "no"
|
||||
|
||||
// include common options
|
||||
include "MySQL-Opt.icc"
|
||||
include "MySQL-Source.icc"
|
||||
|
||||
run before sources('..\sql\sql_yacc.yy') targets('..\sql\sql_yacc.c')
|
||||
'bison -y -d -o ..\sql\sql_yacc.c ..\sql\sql_yacc.yy'
|
||||
|
||||
option ProjectOptions = MySQLOptions
|
||||
, define( "MYSQL_SERVER", "")
|
||||
{
|
||||
|
||||
option file(genobject, "..\\OBJ\\ZLIB\\")
|
||||
{
|
||||
target "..\\bin\\mysqld.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') server_global_pch
|
||||
}
|
||||
source type('cpp') server_pch
|
||||
|
||||
// target source files
|
||||
source "rint.obj"
|
||||
source zlib, ufc, regex, 'strings\bmove_upp.c'
|
||||
if debug_build {
|
||||
source type('cpp') dbug
|
||||
}
|
||||
source type('cpp') heap
|
||||
source type('cpp') myisam
|
||||
source type('cpp') myisammrg
|
||||
source type('cpp') my_sys
|
||||
source type('cpp') my_sys_sql
|
||||
source type('cpp') strings
|
||||
source type('cpp') sql,
|
||||
"..\\myisam\\mi_check.c",
|
||||
"..\\myisam\\sort.c"
|
||||
source BldLevelInfo
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
31 Run Specifications: Version 1.1
|
||||
40 E:\rd\MySQL\vacpp-3.23.50\bin\mysqld.exe
|
||||
1
|
||||
0
|
||||
0
|
||||
5 Local
|
||||
0
|
|
@ -1,171 +0,0 @@
|
|||
// disable code inlining when building static libs
|
||||
InlineCode = "no"
|
||||
|
||||
// include common options
|
||||
include "MySQL-Opt.icc"
|
||||
include "MySQL-Source.icc"
|
||||
|
||||
option ProjectOptions = MySQLOptions
|
||||
, link(defaultlibsname, "mysql.lib")
|
||||
{
|
||||
|
||||
option file(genobject, "..\\OBJ\\ZLIB\\")
|
||||
,link(exportAll)
|
||||
{
|
||||
target "..\\bin\\mysqlu.dll"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
// target source files
|
||||
source zlib, ufc, regex, 'strings\bmove_upp.c'
|
||||
if debug_build {
|
||||
source type('cpp') dbug
|
||||
}
|
||||
source type('cpp') heap
|
||||
source type('cpp') myisam
|
||||
source type('cpp') myisammrg
|
||||
source type('cpp') my_sys
|
||||
source type('cpp') my_sys_cli
|
||||
source type('cpp') my_sys_sql
|
||||
source type('cpp') strings
|
||||
source type('cpp') '..\libmysql\dll.c'
|
||||
source BldLevelInfo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
target "..\\bin\\myisamchk.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
// target source files
|
||||
source type('cpp') "..\\myisam\\myisamchk.c",
|
||||
"..\\myisam\\mi_check.c",
|
||||
"..\\myisam\\sort.c"
|
||||
source BldLevelInfo
|
||||
}
|
||||
|
||||
target "..\\bin\\myisamlog.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
// target source files
|
||||
source type('cpp') "..\\myisam\\myisamlog.c"
|
||||
source BldLevelInfo
|
||||
}
|
||||
|
||||
target "..\\bin\\myisampack.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
// target source files
|
||||
source type('cpp') "..\\myisam\\myisampack.c"
|
||||
source BldLevelInfo
|
||||
}
|
||||
|
||||
target "..\\bin\\test\\comp_err.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\extra\\comp_err.c"
|
||||
}
|
||||
|
||||
target "..\\bin\\gen_lex_hash.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\sql\\gen_lex_hash.cc"
|
||||
}
|
||||
|
||||
target "..\\bin\\test\\mi_test1.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\myisam\\mi_test1.c"
|
||||
}
|
||||
target "..\\bin\\test\\mi_test2.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\myisam\\mi_test2.c"
|
||||
}
|
||||
target "..\\bin\\test\\ft_eval.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\myisam\\ft_eval.c"
|
||||
}
|
||||
target "..\\bin\\test\\ft_test1.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\myisam\\ft_test1.c"
|
||||
}
|
||||
/*
|
||||
target "..\\bin\\test\\testhash.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\mysys\\testhash.c"
|
||||
}
|
||||
*/
|
||||
target "..\\bin\\test\\test_charset.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\mysys\\test_charset.c"
|
||||
}
|
||||
|
||||
target "..\\bin\\test\\hp_test1.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\heap\\hp_test1.c"
|
||||
}
|
||||
target "..\\bin\\test\\hp_test2.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\heap\\hp_test2.c"
|
||||
}
|
||||
|
||||
/*
|
||||
option define( "MAIN", "")
|
||||
{
|
||||
target "..\\bin\\test\\thr_lock.exe"
|
||||
{
|
||||
// target source files
|
||||
source type('cpp') "..\\mysys\\thr_lock.c"
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
target "..\\bin\\test\\insert_test.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
source type('cpp') "..\\client\\insert_test.c"
|
||||
}
|
||||
target "..\\bin\\test\\select_test.exe"
|
||||
{
|
||||
source type('cpp') "..\\client\\select_test.c"
|
||||
}
|
||||
target "..\\bin\\test\\thread_test.exe"
|
||||
{
|
||||
// optimized precompiled headers
|
||||
option macros('global', 'yes')
|
||||
{
|
||||
source type('cpp') client_global_pch
|
||||
}
|
||||
source type('cpp') "..\\client\\thread_test.c"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
run after sources('..\bin\gen_lex_hash.exe') targets('..\sql\lex_hash.h')
|
||||
'cd ..\bin & ..\bin\gen_lex_hash.exe > ..\sql\lex_hash.h'
|
3271
os2/MySQL-Util.irs
3271
os2/MySQL-Util.irs
File diff suppressed because it is too large
Load diff
205
os2/ReadMe.txt
205
os2/ReadMe.txt
|
@ -1,205 +0,0 @@
|
|||
====================================================
|
||||
|
||||
Contents
|
||||
--------
|
||||
Welcome to the latest port of MySQL for OS/2 and eComStation.
|
||||
|
||||
Modules included in this build:
|
||||
- protocol data compression
|
||||
- perl BDB/BDI support (not in this package)
|
||||
- Library and header files for C/CPP developers included
|
||||
|
||||
This package has been built using IBM VAC++ 4.0
|
||||
|
||||
The MySQL server is distributed under the GPL license. Please refer to
|
||||
the file COPYING for the license information.
|
||||
|
||||
The MySQL client library is distributed under the LGPL license.
|
||||
Please refer to the file COPYING for the license information.
|
||||
|
||||
Most of the MySQL clients are distributed under the GPL license, but
|
||||
some files may be in the public domain.
|
||||
|
||||
The latest information about MySQL can be found at: http://www.mysql.com
|
||||
|
||||
To get the latest information about this port please subscribe to our
|
||||
newsgroup/mailinglist mysql2 at groups.yahoo.com.
|
||||
|
||||
To see what MySQL can do, take a look at the features section in the
|
||||
manual. For future plans see the TODO appendix in the manual.
|
||||
|
||||
New features/bug fixes history is in the news appendix in the manual.
|
||||
|
||||
For the currently known bugs/misfeatures (known errors) see the bugs
|
||||
appendix in the manual. The OS/2 section contains notes that are
|
||||
specific to the MySQL OS/2 and eComStation version.
|
||||
|
||||
Please note that MySQL is a constantly moving target. New builds for
|
||||
Linux are made available every week. This port may therefore be a few
|
||||
minor versions after the latest Linux/Win32 builds but its generally
|
||||
more stable than the "latest and greates" port.
|
||||
|
||||
MySQL is brought to you by: TcX DataKonsult AB & MySQL Finland AB
|
||||
|
||||
This port is brought to you by:
|
||||
|
||||
Yuri Dario <mc6530@mclink.it>, development, porting
|
||||
Timo Maier <tam@gmx.de>, documentation, testing
|
||||
John M Alfredsson <jma@jmast.se>, documentation, testing
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
Prerequisite:
|
||||
|
||||
- OS/2 Warp 3 with FP ?? or later,
|
||||
OS/2 Warp 4 with FP ?? or later,
|
||||
OS/2 Warp Server for e-Business,
|
||||
eComStation 1.0 (prev 1/2 OK)
|
||||
- TCPIP 4.x installed (requires 32-bit tcpip stack)
|
||||
- WarpIN installer 0.9.16 (ftp://ftp.os2.org/xworkplace/warpin-0-9-16.exe)
|
||||
|
||||
Note: probably some fixpak level is required on both Warp3&Warp4 to
|
||||
support >2GB file sizes.
|
||||
|
||||
Save the installation archives into a temporary folder and double click
|
||||
on the main package; otherwise you can drop the mysql package in your
|
||||
WarpIN object or type
|
||||
|
||||
WARPIN MYSQL-3-23-??-B1.WPI
|
||||
|
||||
from the command line.
|
||||
The configuration file for MySQL is named my.cnf and it is placed into
|
||||
your %ETC% directory. Usually it located into the boot driver under
|
||||
|
||||
x:\MPTN\ETC
|
||||
|
||||
If the installation detect an existing configuration file, it will not be
|
||||
overwritten, keeping you settings; see x:\...\mysql\data\my.cnf.sample
|
||||
for new settings. This file is not deleted by uninstall process.
|
||||
Startup options for MySQL daemon could be added there.
|
||||
|
||||
As default, client connections uses data compression: if you don't like it,
|
||||
remove the following from your %ETC%\my.cnf
|
||||
|
||||
[client]
|
||||
compress
|
||||
|
||||
The server switches automatically compression mode on client request.
|
||||
|
||||
This release comes with DLL client library MYSQL.DLL: it is installed by
|
||||
default into mysql\bin together with client applications. Copy it to your
|
||||
x:\OS2\DLL or another directory in your LIBPATH to run command line
|
||||
utilities from every place.
|
||||
|
||||
See documentation for manuals installation.
|
||||
|
||||
|
||||
New features
|
||||
------------
|
||||
With build 4, the sql daemon supports a new option
|
||||
|
||||
--preload-client-dll
|
||||
|
||||
that enables preloading of mysql.dll and mysqlu.dll directly by the
|
||||
server. This way, client programs doesn't need to have the dll's in
|
||||
the current libpath.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
Documentation is provided in separate files. You can use either
|
||||
the PDF documentation (requires Adobe Acrobat Reader) or the
|
||||
INF documentation (requires OS/2 view or NewView).
|
||||
|
||||
The PDF documentation is found in
|
||||
|
||||
MYSQL-3-23-??-PDF.WPI
|
||||
|
||||
and the INF documentation is found in
|
||||
|
||||
MYSQL-3-23-28-INF.WPI
|
||||
|
||||
The latest documentation in other formats can always be downloaded from
|
||||
http://www.mysql.com. However this documentation may not fully apply to
|
||||
this port.
|
||||
The INF documentation could contain errors because of semi-automatic
|
||||
translation from texi original. Also it is not updated as the latest PDF
|
||||
manual (sorry, but conversion from texi to ipf requires quite a lot of
|
||||
work).
|
||||
To install the manuals, their WPI must be placed in the same directory
|
||||
of the main WPI package: once the main package installation is started,
|
||||
new install options will be available (inf or pdf manual).
|
||||
|
||||
|
||||
Support
|
||||
-------
|
||||
Since MySQL is a OpenSource freeware product there are no
|
||||
formal support options available.
|
||||
|
||||
Please subscribe to mysql2 at www.yahoogroups.com to get in contact
|
||||
with other users using this port.
|
||||
|
||||
http://www.yahoogroups.com/group/mysql2
|
||||
|
||||
This newsgroup/mailinglist is the official "home" of this port.
|
||||
|
||||
|
||||
Donations
|
||||
---------
|
||||
Since this software is ported for free, donations are welcome!
|
||||
You can get also an extended support, which is not free and subject to
|
||||
custom rates.
|
||||
Ask in the mailing list for details.
|
||||
At least, a post card is welcome!
|
||||
|
||||
|
||||
Know problems
|
||||
-------------
|
||||
alter_table.test and show_check are failing, reporting a different status
|
||||
message: actually seems only a different text, no bugs in table checking.
|
||||
|
||||
|
||||
Apache/2 + PHP
|
||||
--------------
|
||||
To avoid problems with different socket when you use PHP and Apache
|
||||
webserver, get the PHP4 module from the Apache Server for OS/2 homepage
|
||||
http://silk.apana.org.au/apache/
|
||||
|
||||
|
||||
Developing MySQL
|
||||
----------------
|
||||
If you want to help us develop MySQL for OS2/eComStation please join
|
||||
the mysql2 mailinglist at www.egroups.com and ask for help to set up
|
||||
your environment!
|
||||
|
||||
All questions that are specific to the OS2/eComStation version should
|
||||
be posted to this list! Please remember to include all relevant
|
||||
information that may help solve your problem.
|
||||
|
||||
|
||||
Building MySQL (VAC++ 4)
|
||||
------------------------
|
||||
Place zlib-1.1.4 at the same level of mysql-3.23.50
|
||||
Place ufc lib at the same level of mysql-3.23.50
|
||||
|
||||
Add the following files:
|
||||
include\config-os2.h
|
||||
include\mysql_version.h
|
||||
mysys\my_os2*.*
|
||||
Get the following files from Windows source distribution:
|
||||
strings\ctype_extra_sources.c
|
||||
libmysql\dll.c
|
||||
|
||||
Apply file and patches found in the src\ directory (if exists).
|
||||
Create the following subdirectories
|
||||
|
||||
bin\
|
||||
bin\test
|
||||
lib\
|
||||
obj\
|
||||
obj\zlib
|
||||
|
||||
Build os2\MySQL-Client.icc project first.
|
||||
Then os2\MySQL-Util.icc; last is os2\MySQL-Sql.icc
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
mkdir ..\bin
|
||||
mkdir ..\bin\test
|
||||
mkdir ..\lib
|
||||
mkdir ..\obj
|
||||
mkdir ..\obj\zlib
|
||||
|
||||
vacbld MySQL-Client.icc -showprogress=10 -showwarning >> build-all.log
|
||||
vacbld MySQL-Sql.icc -showprogress=10 -showwarning >> build-all.log
|
||||
vacbld MySQL-Util.icc -showprogress=10 -showwarning >> build-all.log
|
|
@ -1,23 +0,0 @@
|
|||
# Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
## Process this file with automake to create Makefile.in
|
||||
|
||||
EXTRA_DIST = config.h pwd.h sgtty.h termio.h
|
||||
SUBDIRS = sys
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
|
@ -1,13 +0,0 @@
|
|||
#include <config-os2.h>
|
||||
#include <types.h>
|
||||
|
||||
#undef HAVE_POSIX_SIGNALS
|
||||
#undef HAVE_BSD_SIGNALS
|
||||
#define TERMIO_TTY_DRIVER
|
||||
|
||||
#define ScreenCols() 80
|
||||
#define ScreenRows() 25
|
||||
|
||||
#define tputs(a,b,c) puts(a)
|
||||
#define kbhit _kbhit
|
||||
//#define _read_kbd(a, b, c) _kbhit()
|
|
@ -1 +0,0 @@
|
|||
/* dummy */
|
|
@ -1 +0,0 @@
|
|||
/* dummy */
|
|
@ -1,22 +0,0 @@
|
|||
# Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
## Process this file with automake to create Makefile.in
|
||||
|
||||
EXTRA_DIST = file.h
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
|
@ -1 +0,0 @@
|
|||
/* dummy */
|
|
@ -1,156 +0,0 @@
|
|||
/* sys/termio.h (emx+gcc) */
|
||||
|
||||
#ifndef _SYS_TERMIO_H
|
||||
#define _SYS_TERMIO_H
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Request codes */
|
||||
|
||||
#if !defined (TCGETA)
|
||||
#define TCGETA 1
|
||||
#define TCSETA 2
|
||||
#define TCSETAW 3
|
||||
#define TCSETAF 4
|
||||
#define TCFLSH 5
|
||||
#define TCSBRK 6
|
||||
#define TCXONC 7
|
||||
#endif
|
||||
|
||||
/* c_cc indexes */
|
||||
|
||||
#if !defined (VINTR) /* Symbols common to termio.h and termios.h */
|
||||
#define VINTR 0
|
||||
#define VQUIT 1
|
||||
#define VERASE 2
|
||||
#define VKILL 3
|
||||
#define VEOF 4
|
||||
#define VEOL 5
|
||||
#define VMIN 6
|
||||
#define VTIME 7
|
||||
#endif
|
||||
|
||||
#define NCC 8 /* Number of the above */
|
||||
|
||||
/* c_iflag, emx ignores most of the following bits */
|
||||
|
||||
#if !defined (IGNBRK) /* Symbols common to termio.h and termios.h */
|
||||
#define IGNBRK 0x0001
|
||||
#define BRKINT 0x0002
|
||||
#define IGNPAR 0x0004
|
||||
#define PARMRK 0x0008
|
||||
#define INPCK 0x0010
|
||||
#define ISTRIP 0x0020
|
||||
#define INLCR 0x0040
|
||||
#define IGNCR 0x0080
|
||||
#define ICRNL 0x0100
|
||||
#define IUCLC 0x0200
|
||||
#define IXON 0x0400
|
||||
#define IXANY 0x0800
|
||||
#define IXOFF 0x1000
|
||||
#define IDELETE 0x8000 /* Extension (emx) */
|
||||
#endif
|
||||
|
||||
/* c_oflag, emx ignores all of the following bits */
|
||||
|
||||
#if !defined (OPOST) /* Symbols common to termio.h and termios.h */
|
||||
#define OPOST 0x0001
|
||||
#endif
|
||||
#define OLCUC 0x0002
|
||||
#define ONLCR 0x0004
|
||||
#define OCRNL 0x0008
|
||||
#define ONOCR 0x0010
|
||||
#define ONLRET 0x0020
|
||||
#define OFILL 0x0040
|
||||
#define OFDEL 0x0080
|
||||
#define NLDLY 0x0100 /* Mask */
|
||||
#define NL0 0x0000
|
||||
#define NL1 0x0100
|
||||
#define CRDLY 0x0600 /* Mask */
|
||||
#define CR0 0x0000
|
||||
#define CR1 0x0200
|
||||
#define CR2 0x0400
|
||||
#define CR3 0x0600
|
||||
#define TABDLY 0x1800 /* Mask */
|
||||
#define TAB0 0x0000
|
||||
#define TAB1 0x0800
|
||||
#define TAB2 0x1000
|
||||
#define TAB3 0x1800
|
||||
#define BSDLY 0x2000 /* Mask */
|
||||
#define BS0 0x0000
|
||||
#define BS1 0x2000
|
||||
#define VTDLY 0x4000 /* Mask */
|
||||
#define VT0 0x0000
|
||||
#define VT1 0x4000
|
||||
#define FFDLY 0x8000 /* Mask */
|
||||
#define FF0 0x0000
|
||||
#define FF1 0x8000
|
||||
|
||||
/* c_cflag, emx ignores all of the following bits */
|
||||
|
||||
#if !defined (CBAUD)
|
||||
#define CBAUD 0x000f /* Mask */
|
||||
#endif
|
||||
#if !defined (B0) /* Symbols common to termio.h and termios.h */
|
||||
#define B0 0x0000
|
||||
#define B50 0x0001
|
||||
#define B75 0x0002
|
||||
#define B110 0x0003
|
||||
#define B134 0x0004
|
||||
#define B150 0x0005
|
||||
#define B200 0x0006
|
||||
#define B300 0x0007
|
||||
#define B600 0x0008
|
||||
#define B1200 0x0009
|
||||
#define B1800 0x000a
|
||||
#define B2400 0x000b
|
||||
#define B4800 0x000c
|
||||
#define B9600 0x000d
|
||||
#define B19200 0x000e
|
||||
#define B38400 0x000f
|
||||
#define CSIZE 0x0030 /* Mask */
|
||||
#define CS5 0x0000
|
||||
#define CS6 0x0010
|
||||
#define CS7 0x0020
|
||||
#define CS8 0x0030
|
||||
#define CSTOPB 0x0040
|
||||
#define CREAD 0x0080
|
||||
#define PARENB 0x0100
|
||||
#define PARODD 0x0200
|
||||
#define HUPCL 0x0400
|
||||
#define CLOCAL 0x0800
|
||||
#define LOBLK 0x1000
|
||||
#endif
|
||||
|
||||
/* c_lflag, emx ignores some of the following bits */
|
||||
|
||||
#if !defined (ISIG) /* Symbols common to termio.h and termios.h */
|
||||
#define ISIG 0x0001
|
||||
#define ICANON 0x0002
|
||||
#define XCASE 0x0004
|
||||
#define ECHO 0x0008
|
||||
#define ECHOE 0x0010
|
||||
#define ECHOK 0x0020
|
||||
#define ECHONL 0x0040
|
||||
#define NOFLSH 0x0080
|
||||
#define IDEFAULT 0x8000 /* Extension (emx) */
|
||||
#endif
|
||||
|
||||
|
||||
struct termio
|
||||
{
|
||||
unsigned int c_iflag;
|
||||
unsigned int c_oflag;
|
||||
unsigned int c_cflag;
|
||||
unsigned int c_lflag;
|
||||
unsigned int c_line;
|
||||
unsigned char c_cc[NCC];
|
||||
};
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* not _SYS_TERMIO_H */
|
|
@ -1,15 +0,0 @@
|
|||
#include "mysql.ih"
|
||||
|
||||
<WARPIN VERSION <$WARPIN_VERSION>>
|
||||
<HEAD>
|
||||
<MSG>
|
||||
This is not an installable archive.
|
||||
|
||||
Please download and install the main archive:
|
||||
|
||||
mysql-<$MySQL-Ver>-bld1.wpi
|
||||
|
||||
</MSG>
|
||||
</HEAD>
|
||||
</WARPIN>
|
||||
|
127
os2/mysql.wis
127
os2/mysql.wis
|
@ -1,127 +0,0 @@
|
|||
#include "mysql.ih"
|
||||
|
||||
<WARPIN VERSION <$WARPIN_VERSION>>
|
||||
<HEAD>
|
||||
|
||||
<PCK INDEX=1
|
||||
PACKAGEID="TCX Datakonsult AB\MySQL for OS/2\SQL Database Engine\<$MySQL\Ver>"
|
||||
TARGET="?:\usr\local\mysql" BASE
|
||||
TITLE="SQL Database Engine"
|
||||
EXECUTE="$(1)\bootstrap.cmd [bootstrap]"
|
||||
CONFIG.SYS="SET EMXOPT=-h1024 | UNIQUE(-h)"
|
||||
CREATEOBJECT="WPFolder|MySQL <$MySQL.Ver>|<WP_DESKTOP>|OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>"
|
||||
CREATEOBJECT="WPProgram|Console|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=$(1)\bin\mysql.exe;STARTUPDIR=$(1)\bin;ICONFILE=$(1)\bin\icons\mysql-client.ico;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_CONSOLE>;"
|
||||
CREATEOBJECT="WPProgram|Start server|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=$(1)\bin\mysqld.exe;ICONFILE=$(1)\bin\icons\mysql-startserver.ico;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_START>;"
|
||||
CREATEOBJECT="WPProgram|Shutdown server|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=$(1)\bin\mysqladmin.exe;STARTUPDIR=$(1)\bin;PARAMETERS=-u root shutdown;ICONFILE=$(1)\bin\icons\mysql-shutdownserver.ico;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_SHUTDOWN>;"
|
||||
CREATEOBJECT="WPProgram|Readme first|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=e.exe;PARAMETERS=$(1)\ReadMe.txt;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_README>;"
|
||||
SELECT
|
||||
>This package will install MySQL for OS/2 SQL engine
|
||||
</PCK>
|
||||
|
||||
<PCK INDEX=2
|
||||
PACKAGEID="TCX Datakonsult AB\MySQL for OS/2\Developement Kit\<$MySQL\Ver>"
|
||||
TARGET="?:\usr\local\mysql"
|
||||
TITLE="Developement Kit"
|
||||
SELECT
|
||||
>This package will install MySQL for OS/2 sdk
|
||||
</PCK>
|
||||
|
||||
<PCK INDEX=3
|
||||
PACKAGEID="TCX Datakonsult AB\MySQL for OS/2\PDF manual\<$MySQL\Ver>"
|
||||
TARGET="?:\usr\local\mysql"
|
||||
TITLE="PDF manual"
|
||||
EXTERNAL="mysql-<$MySQL-Ver>-pdf.wpi"
|
||||
CREATEOBJECT="WPShadow|PDF Manual|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|SHADOWID=$(1)\docs\manual.pdf"
|
||||
SELECT
|
||||
>This package will install MySQL for OS/2 documentation
|
||||
</PCK>
|
||||
|
||||
<PCK INDEX=4
|
||||
PACKAGEID="TCX Datakonsult AB\MySQL for OS/2\INF manual\3\23\28"
|
||||
TARGET="?:\usr\local\mysql"
|
||||
TITLE="INF manual"
|
||||
EXTERNAL="mysql-3-23-28-gamma-inf.wpi"
|
||||
CREATEOBJECT="WPProgram|MySQL Manual|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=view.exe;PARAMETERS=$(1)\docs\manual.inf;ICONFILE=$(1)\bin\icons\mysql-manual.ico;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_INFMANUAL>;"
|
||||
SELECT
|
||||
>This package will install MySQL for OS/2 documentation
|
||||
</PCK>
|
||||
|
||||
<PCK INDEX=5
|
||||
PACKAGEID="TCX Datakonsult AB\MySQL for OS/2\Test suite\<$MySQL\Ver>"
|
||||
TARGET="?:\usr\local\mysql"
|
||||
TITLE="Test suite"
|
||||
EXTERNAL="mysql-<$MySQL-Ver>-test.wpi"
|
||||
CREATEOBJECT="WPProgram|Run MySQL Test Suite|<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_FOLDER>|EXENAME=$(5)\mysql-test\mysql-test.cmd;PARAMETERS=$(1)\docs\manual.inf;ICONFILE=$(1)\bin\icons\mysql-manual.ico;OBJECTID=<MYSQL_<$MySQL.Major>_<$MySQL.Minor>_TESTSUITE>;"
|
||||
SELECT
|
||||
>This package will install MySQL for OS/2 test suite
|
||||
</PCK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<!-- Here come the different pages. They are linked by
|
||||
the <NEXTBUTTON> tags, which must have a target.
|
||||
Each page must have a TYPE= attribute, which tells
|
||||
WarpIn what will be visible on that page. -->
|
||||
|
||||
<BODY>
|
||||
|
||||
<!-- page1: introduction ->>
|
||||
<PAGE INDEX=1 TYPE=README>
|
||||
<TEXT>
|
||||
</TEXT>
|
||||
<NEXTBUTTON TARGET=2>~Next</NEXTBUTTON>
|
||||
<README FORMAT=HTML>
|
||||
|
||||
<P>Welcome to the latest port of <B>MySQL for OS/2 and eComStation</B>.
|
||||
<BR>
|
||||
<P>You are about to install <B>MySQL <$MySQL.Ver></B>
|
||||
|
||||
<BR>
|
||||
<BR>
|
||||
<P>Select "Next" to continue.
|
||||
|
||||
<P>Select "Cancel" to abort installation.
|
||||
</README>
|
||||
</PAGE>
|
||||
|
||||
<!-- show ReadMe.txt -->
|
||||
<PAGE INDEX=2 TYPE=README>
|
||||
<NEXTBUTTON TARGET=3>~Next</NEXTBUTTON>
|
||||
<TEXT>
|
||||
</TEXT>
|
||||
<README FORMAT=PLAIN EXTRACTFROMPCK="1">ReadMe.txt</README>
|
||||
</PAGE>
|
||||
|
||||
<!-- show GPL license -->
|
||||
<PAGE INDEX=3 TYPE=README>
|
||||
<NEXTBUTTON TARGET=4>~I agree</NEXTBUTTON>
|
||||
<TEXT>
|
||||
By pressing the "I agree" button, you agree to all terms and conditions to the below licence agreement.
|
||||
</TEXT>
|
||||
<README FORMAT=HTML EXTRACTFROMPCK="1">license.htm</README>
|
||||
</PAGE>
|
||||
|
||||
|
||||
<!-- The TYPE=CONTAINER will list the packages which can be installed. -->
|
||||
|
||||
<PAGE INDEX=4 TYPE=CONTAINER>
|
||||
<NEXTBUTTON TARGET=5>~Next</NEXTBUTTON>
|
||||
<TEXT>
|
||||
Please select the packages which are to be installed. You may change the target paths for the packages.
|
||||
</TEXT>
|
||||
</PAGE>
|
||||
|
||||
<!-- Here's another TYPE=TEXT page before we install.
|
||||
The special target "0" indicates that after this page we
|
||||
should start installation.
|
||||
Note that the TYPE=INSTALL page (which we had in Alpha #3)
|
||||
is no longer supported. -->
|
||||
|
||||
<PAGE INDEX=5 TYPE=TEXT>
|
||||
<NEXTBUTTON TARGET=0>I~nstall</NEXTBUTTON>
|
||||
<TEXT>
|
||||
Press "Install" to begin installing this archive.</TEXT>
|
||||
</PAGE>
|
||||
|
||||
</BODY>
|
||||
</WARPIN>
|
|
@ -1,15 +0,0 @@
|
|||
#include "mysql.ih"
|
||||
|
||||
<WARPIN VERSION <$WARPIN_VERSION>>
|
||||
<HEAD>
|
||||
<MSG>
|
||||
This is not an installable archive.
|
||||
|
||||
Please download and install the main archive:
|
||||
|
||||
mysql-<$MySQL-Ver>-bld1.wpi
|
||||
|
||||
</MSG>
|
||||
</HEAD>
|
||||
</WARPIN>
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
REM -DLONG_DOUBLE
|
||||
REM -DFLOAT
|
||||
REM none -> double
|
||||
gcc -Zomf -c -x assembler-with-cpp rint.s
|
BIN
os2/rint.obj
BIN
os2/rint.obj
Binary file not shown.
32
os2/rint.s
32
os2/rint.s
|
@ -1,32 +0,0 @@
|
|||
/ rint.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
|
||||
|
||||
#include <emx/asm386.h>
|
||||
|
||||
#define FUNC MATHSUFFIX2(rint)
|
||||
|
||||
.globl LABEL(FUNC)
|
||||
|
||||
.text
|
||||
|
||||
ALIGN
|
||||
|
||||
/ double _rint (double x)
|
||||
|
||||
#define cw1 0(%esp)
|
||||
#define cw2 2(%esp)
|
||||
/define ret_addr 4(%esp)
|
||||
#define x 8(%esp)
|
||||
|
||||
LABEL(FUNC):
|
||||
PROFILE_NOFRAME
|
||||
subl $4, %esp
|
||||
fstcww cw1
|
||||
movw cw1, %ax
|
||||
andw $0xf3ff, %ax /* round to nearest or even */
|
||||
movw %ax, cw2
|
||||
fldcww cw2
|
||||
FLD x /* x */
|
||||
frndint
|
||||
fldcww cw1
|
||||
addl $4, %esp
|
||||
EPILOGUE(FUNC)
|
Loading…
Reference in a new issue