From a6c7bc93b388bf8ab68439942488e7d7290dbfb5 Mon Sep 17 00:00:00 2001
From: zesstra <zesstra@zesstra.de>
Date: Wed, 15 Apr 2009 23:33:08 +0200
Subject: [PATCH 03/12] Removed checks for OS2, __EMX_

These systems are anyway not supported any longer.

Signed-off-by: zesstra <zesstra@zesstra.de>
---
 src/autoconf/configure.in |   12 ------------
 src/comm.c                |    2 +-
 src/files.c               |    4 ----
 src/object.c              |    4 ++--
 src/pkg-pgsql.c           |    2 +-
 src/port.c                |   13 +------------
 src/port.h                |    4 ++--
 7 files changed, 7 insertions(+), 34 deletions(-)

diff --git a/src/autoconf/configure.in b/src/autoconf/configure.in
index e031ec4..b520626 100644
--- a/src/autoconf/configure.in
+++ b/src/autoconf/configure.in
@@ -636,13 +636,6 @@ dnl Not all checks happen here - the check for solaris for example requires
 dnl some library checks first.
 
 AC_EGREP_CPP(yes,[
-#if defined(__EMX__)
-yes
-#endif
-],
-[ EXTRA_CFLAGS="${EXTRA_CFLAGS} -DOS2" ])
-
-AC_EGREP_CPP(yes,[
 #if defined(__CYGWIN32__) || defined(__CYGWIN__)
 yes
 #endif
@@ -2434,8 +2427,6 @@ yes
 [ EXTRA_CFLAGS="${EXTRA_CFLAGS} -Dsolaris" ])
 fi
 
-AC_ARG_WITH(target,[  --with-target    ?? (OS2/WIN32/solaris)], EXTRA_CFLAGS="${EXTRA_CFLAGS} -D${withval}")
-
 # Some Unixes require the -n parameter for tail to work properly
 AC_MSG_CHECKING(if tail accepts the -n parameter)
 TAIL_N=""
@@ -2640,9 +2631,6 @@ case "$EXTRA_CFLAGS" in
         -ltcpip -lsocket -lnsl -lgcc -lc /usr/ucblib/libucb.a"
       LDFLAGS= "-u dgettext -lintl"
   fi ;;
- *-DOS2*)
-      LDFLAGS= "$LDFLAGS -Zbsd-signals -Zexe"
-      ;;
  *-MSWIN*)
       LDFLAGS= "$LDFLAGS -luser32 -lwinmm -lkernel32 -lwsock32"
       ;;
diff --git a/src/comm.c b/src/comm.c
index 0cd14c4..5dd5dbf 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -93,7 +93,7 @@
 
 #include <signal.h>
 
-#if defined(_AIX) || defined(__EMX__) || defined(OS2)
+#if defined(_AIX)
 #    include <sys/select.h>
 #endif
 
diff --git a/src/files.c b/src/files.c
index 6ef59c8..11da1dc 100644
--- a/src/files.c
+++ b/src/files.c
@@ -51,10 +51,6 @@ extern int lstat (CONST char *, struct stat *);
 extern int fchmod(int, int);
 #endif
 
-#if defined(OS2) || defined(__EMX__)
-#    define lstat stat
-#endif
-
 /*-------------------------------------------------------------------------*/
 
 #include "files.h"
diff --git a/src/object.c b/src/object.c
index b3a8516..225d903 100644
--- a/src/object.c
+++ b/src/object.c
@@ -6871,7 +6871,7 @@ v_save_object (svalue_t *sp, int numarg)
         i = 0; /* Result from efun */
 
         unlink(name);
-#if !defined(MSDOS_FS) && !defined(AMIGA) && !(defined(OS2) || defined(__EMX__)) && !defined(__BEOS__)
+#if !defined(MSDOS_FS) && !defined(AMIGA) && !defined(__BEOS__)
         if (link(tmp_name, name) == -1)
 #else
         close(f);
@@ -6884,7 +6884,7 @@ v_save_object (svalue_t *sp, int numarg)
             add_message("Failed to save object !\n");
             i = 1;
         }
-#if !defined(MSDOS_FS) && !defined(AMIGA) && !(defined(__EMX__) || defined(OS2)) && !defined(__BEOS__)
+#if !defined(MSDOS_FS) && !defined(AMIGA) && !defined(__BEOS__)
         close(f);
         unlink(tmp_name);
 #endif
diff --git a/src/pkg-pgsql.c b/src/pkg-pgsql.c
index a201b2f..497ecb5 100644
--- a/src/pkg-pgsql.c
+++ b/src/pkg-pgsql.c
@@ -77,7 +77,7 @@
 
 #else
 
-#    if defined(_AIX) || defined(__EMX__) || defined(OS2)
+#    if defined(_AIX)
 #        include <sys/select.h>
 #    endif
 
diff --git a/src/port.c b/src/port.c
index a1ab31a..05d9f36 100644
--- a/src/port.c
+++ b/src/port.c
@@ -197,17 +197,6 @@ xmemmem ( const char *haystack, size_t haystacklen
 } /* xmemmem() */
 
 /*-------------------------------------------------------------------------*/
-/* Some UNIX functions which are not supported on all platforms. */
-
-#if defined(__EMX__) || defined(OS2)
-int socketpair (int a, int b, int c, int *d)
-{
-    errno = EPERM;
-    return -1;
-}
-#endif
-
-/*-------------------------------------------------------------------------*/
 #ifdef STRTOL_BROKEN
 
 #define DIGIT(x)        (isdigit(x) ? (x) - '0' : \
@@ -378,7 +367,7 @@ getrusage (int who, struct rusage *rusage)
 }
 #endif /* getrusage implemented using times() */
 
-#if defined(CYGWIN) || defined(__EMX__) || defined(OS2)
+#if defined(CYGWIN)
 /*-----------------------------------------------------------------------
 ** void init_rusage (void)
 ** int getrusage (int who, struct rusage *rusage)
diff --git a/src/port.h b/src/port.h
index 79a2991..9a966a5 100644
--- a/src/port.h
+++ b/src/port.h
@@ -199,7 +199,7 @@ extern int errno;
 #    undef USE_MYSQL
 #endif
 
-#if defined( MSDOS ) || defined(CYGWIN) || defined(__EMX__) || defined(OS2)
+#if defined( MSDOS ) || defined(CYGWIN)
 #define MSDOS_FS
 #endif
 
@@ -602,7 +602,7 @@ extern char *crypt(const char *, const char *);
 #    define crypt(pass, salt) _crypt(pass, salt)
 #endif
 
-#if defined(CYGWIN) || defined(__EMX__) || defined(OS2)
+#if defined(CYGWIN)
 extern void init_rusage(void);
 #else
 #define init_rusage()
-- 
1.6.1

