Commit 3258f23d authored by lenz@mysql.com's avatar lenz@mysql.com
Browse files

- Updated OS/2 port with files provided by Yuri Dario <mc6530@mclink.it>

  from TeamOS/2 Italy
- removed some obsolete files on Yuri's request
- Added missing os2 related files outside the os2 subdirectory
  to the distribution
parent c6204862
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2264,7 +2264,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile \
 strings/Makefile regex/Makefile heap/Makefile \
 bdb/Makefile \
 myisam/Makefile myisammrg/Makefile \
 man/Makefile os2/Makefile \
 man/Makefile os2/Makefile os2/include/Makefile os2/include/sys/Makefile \
 readline/Makefile libmysql_r/Makefile libmysql/Makefile client/Makefile \
 sql/Makefile sql/share/Makefile \
 merge/Makefile dbug/Makefile scripts/Makefile \
+2 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ pkginclude_HEADERS = dbug.h m_string.h my_sys.h mysql.h mysql_com.h \
			my_global.h my_net.h \
			sslopt-case.h sslopt-longopts.h sslopt-usage.h \
			sslopt-vars.h $(BUILT_SOURCES)
noinst_HEADERS =	global.h config-win.h \
noinst_HEADERS =	global.h config-win.h config-os2.h\
			nisam.h heap.h merge.h my_bitmap.h\
			myisam.h myisampack.h myisammrg.h ft_global.h\
			my_dir.h mysys_err.h my_base.h \
+5 −2
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#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"
@@ -55,6 +56,8 @@
#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() */
@@ -84,7 +87,7 @@
#define F_WRLCK		2	    /* Write lock.  */
#define F_UNLCK		0	    /* Remove lock.  */

#define S_IFMT		0xF000	    /* Mask for file type */
#define S_IFMT		0x17000	    /* Mask for file type */
#define F_TO_EOF	0L	    /* Param to lockf() to lock rest of file */

#define HUGE_PTR
@@ -268,7 +271,7 @@ typedef unsigned long long os_off_t;
/* #undef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */

/* READLINE: */
#define HAVE_POSIX_SIGNALS 1
#define HAVE_POSIX_SIGNALS 0

/* sigwait with one argument */
/* #undef HAVE_NONPOSIX_SIGWAIT */
+4 −1
Original line number Diff line number Diff line
@@ -21,7 +21,10 @@ INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include -I.. -I$(srcdir)
pkglib_LIBRARIES =	libmysys.a
LDADD =			libmysys.a ../dbug/libdbug.a \
			../strings/libmystrings.a
noinst_HEADERS =	mysys_priv.h my_static.h
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
libmysys_a_SOURCES =	my_init.c my_getwd.c mf_getdate.c\
			mf_path.c mf_loadpath.c\
			my_open.c my_create.c my_seek.c my_read.c \
+13 −3
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ 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
@@ -191,8 +192,17 @@ inline _SetFileLocksL(HFILE hFile,
                          ULONG timeout,
                          ULONG flags)
{
   if (_DosSetFileLocksL)
      return _DosSetFileLocksL( hFile, pflUnlock, pflLock, timeout, 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 };
@@ -254,7 +264,7 @@ int _lock64( int fd, int locktype, my_off_t start,
   return(-1);
}

int         _sopen( const char *name, int oflag, int shflag, int mask)
int         sopen( const char *name, int oflag, int shflag, int mask)
{
   int      fail_errno;
   APIRET   rc = 0;
Loading