Commit 561d3b12 authored by unknown's avatar unknown

Drop a number of OS2 specific files.


BitKeeper/deleted/.del-BldLevel.cmd~d1a41ef0712190e1:
  Delete: os2/BldLevel.cmd
BitKeeper/deleted/.del-BldLevelInf.cmd~49e29c82b3527c4a:
  Delete: os2/BldLevelInf.cmd
BitKeeper/deleted/.del-BldLevel.RES~6701a23a4d0b0f33:
  Delete: os2/BldLevel.RES
BitKeeper/deleted/.del-BldLevel.rc~fdab305a1b550012:
  Delete: os2/BldLevel.rc
BitKeeper/deleted/.del-ChangeLog.os2~c473e6f17539eb4:
  Delete: os2/ChangeLog.os2
BitKeeper/deleted/.del-Makefile.am~e5b911533dad2713:
  Delete: os2/Makefile.am
BitKeeper/deleted/.del-build-all.cmd~68479264bb9abe:
  Delete: os2/build-all.cmd
BitKeeper/deleted/.del-MySQL-Client.icc~1d41cb9ed34c28ce:
  Delete: os2/MySQL-Client.icc
BitKeeper/deleted/.del-mysql-inf.wis~fce577336b6bb0e:
  Delete: os2/mysql-inf.wis
BitKeeper/deleted/.del-mysqlalt.wis~409d76f4dfd1e4c4:
  Delete: os2/mysqlalt.wis
BitKeeper/deleted/.del-MySQL-Opt.icc~b9517e18e6cf6c05:
  Delete: os2/MySQL-Opt.icc
BitKeeper/deleted/.del-MySQL-Source.icc~edded3c3a5cf83b1:
  Delete: os2/MySQL-Source.icc
BitKeeper/deleted/.del-MySQL-Sql.icc~2ec2a87f4a096d31:
  Delete: os2/MySQL-Sql.icc
BitKeeper/deleted/.del-MySQL-Sql.irs~266e93e2c9003567:
  Delete: os2/MySQL-Sql.irs
BitKeeper/deleted/.del-MySQL-Util.icc~e6288097ceb9cbd2:
  Delete: os2/MySQL-Util.icc
BitKeeper/deleted/.del-MySQL-Util.irs~cc5eb078dbc0605c:
  Delete: os2/MySQL-Util.irs
BitKeeper/deleted/.del-mysql.wis~95ebdebeb470c823:
  Delete: os2/mysql.wis
BitKeeper/deleted/.del-ReadMe.txt~573b1e4ebab241e1:
  Delete: os2/ReadMe.txt
BitKeeper/deleted/.del-rint.cmd~49a7df1e6a4214af:
  Delete: os2/rint.cmd
BitKeeper/deleted/.del-rint.obj~e6bbb137ffb2f3d1:
  Delete: os2/rint.obj
BitKeeper/deleted/.del-rint.s~82358ca146718a12:
  Delete: os2/rint.s
BitKeeper/deleted/.del-config.h~1e58e9b6b3735392:
  Delete: os2/include/config.h
BitKeeper/deleted/.del-Makefile.am~f87185e232d7c4f:
  Delete: os2/include/Makefile.am
BitKeeper/deleted/.del-pwd.h~b26f27954da3a1be:
  Delete: os2/include/pwd.h
BitKeeper/deleted/.del-sgtty.h~4321c310847cb55c:
  Delete: os2/include/sgtty.h
BitKeeper/deleted/.del-termio.h~b136a899c396cb69:
  Delete: os2/include/termio.h
BitKeeper/deleted/.del-Makefile.am~ead19441cc5ff35c:
  Delete: os2/include/sys/Makefile.am
BitKeeper/deleted/.del-file.h~90a5c4f6c7dfb5a:
  Delete: os2/include/sys/file.h
BitKeeper/deleted/.del-config-os2.h~a16b51851ddd317b:
  Delete: include/config-os2.h
BitKeeper/deleted/.del-my_os2cond.c~e3b520af1c371bb5:
  Delete: mysys/my_os2cond.c
BitKeeper/deleted/.del-my_os2dirsrch.c~4e2479b2abb2eb5a:
  Delete: mysys/my_os2dirsrch.c
BitKeeper/deleted/.del-my_os2dirsrch.h~5011cbc657537d0:
  Delete: mysys/my_os2dirsrch.h
BitKeeper/deleted/.del-my_os2dlfcn.c~6d94b488717683dd:
  Delete: mysys/my_os2dlfcn.c
BitKeeper/deleted/.del-my_os2dlfcn.h0~eae8edb8555eff87:
  Delete: mysys/my_os2dlfcn.h0
BitKeeper/deleted/.del-my_os2file64.c~251fb8a1e950c31b:
  Delete: mysys/my_os2file64.c
BitKeeper/deleted/.del-my_os2mutex.c~79f7438bfde5132a:
  Delete: mysys/my_os2mutex.c
BitKeeper/deleted/.del-my_os2thread.c~65dca991548cec2a:
  Delete: mysys/my_os2thread.c
BitKeeper/deleted/.del-my_os2tls.c~58ade7a0f70ad5ea:
  Delete: mysys/my_os2tls.c
Makefile.am:
  Removed os2 reference
configure.in:
  Removed OS2 specific os2 files.
include/Makefile.am:
  Removed os2 specific config file.
include/my_global.h:
  Removed OS2 specific files.
mysys/Makefile.am:
  Removed OS2 specific files.
parent 02f84a6f
......@@ -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 \
......
This diff is collapsed.
......@@ -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 \
......
/* 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__ */
/* 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 */
/* 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__ */
/* 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);
}
/* 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
This diff is collapsed.
/*
* 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
/* 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
/* 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;
}
@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
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" }
This diff is collapsed.
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
# 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.%
// 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
}
}
// 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
}
This diff is collapsed.
// 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
}
}
}
31 Run Specifications: Version 1.1
40 E:\rd\MySQL\vacpp-3.23.50\bin\mysqld.exe
1
0
0
5 Local
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'
This diff is collapsed.
====================================================
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
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
# 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.%
#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()
# 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.%
/* 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 */
#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>

\ No newline at end of file
#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>
#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>

\ No newline at end of file
REM -DLONG_DOUBLE
REM -DFLOAT
REM none -> double
gcc -Zomf -c -x assembler-with-cpp rint.s
/ 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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment