Look for S_IFSOCK and define it as 0 if it doesn't exist (this is for SCO).
authorewt <devnull@localhost>
Wed, 30 Apr 1997 15:32:40 +0000 (15:32 +0000)
committerewt <devnull@localhost>
Wed, 30 Apr 1997 15:32:40 +0000 (15:32 +0000)
CVS patchset: 1563
CVS date: 1997/04/30 15:32:40

config.h.in
configure.in
misc/miscfn.h

index dc6ce8a..86576c7 100644 (file)
@@ -37,6 +37,9 @@
 /* Define as 1 if <sys/stat.h> defines S_ISLNK */
 #define HAVE_S_ISLNK 0
 
+/* Define as 1 if <sys/stat.h> defines S_IFSOCK */
+#define HAVE_S_IFSOCK 0
+
 /* Define as 1 if <sys/stat.h> defines S_ISSOCK */
 #define HAVE_S_ISSOCK 0
 
index 811bfa6..4e2bf56 100644 (file)
@@ -212,6 +212,16 @@ if test $PROVIDES_ERRNO = yes; then
        AC_DEFINE(HAVE_HERRNO)
 fi
 
+dnl If a system doesn't have S_IFSOCK, define it as 0 which will
+dnl make S_ISSOCK always return false (nice, eh?)
+AC_MSG_CHECKING(checking if <sys/stat.h> defines S_IFSOCK...)
+AC_TRY_LINK([#include <sys/stat.h>],printf("%d", S_IFSOCK),
+       HAS_S_IFSOCK=yes,HAS_S_IFSOCK=no)
+AC_MSG_RESULT($HAS_S_IFSOCK)
+if test $HAS_S_ISLNK=yes; then
+       AC_DEFINE(HAVE_S_IFSOCK)
+fi
+
 dnl Some Unix's are missing S_ISLNK, S_ISSOCK
 AC_MSG_CHECKING(checking if <sys/stat.h> defines S_ISLNK...)
 AC_TRY_LINK([#include <sys/stat.h>],printf("%d", S_ISLNK(0755)),
@@ -254,13 +264,15 @@ if test "x$tmpdir" = "x"; then
     fi
 fi
 
-if echo "$build" | egrep 'solaris|hpux10' >/dev/null ; then
+if echo "$build" | egrep 'solaris|hpux10|sco' >/dev/null ; then
        # Solaris needs -ldl to use -lnsl, and it can't build static
        # binaries if you use -ldl
        RPM=rpm.shared
        if echo "$build" | grep solaris >/dev/null; then
                echo "hacking things up for solaris"
                LIBDL=-ldl
+       elif echo "$build" | grep sco > /dev/null; then
+               echo "hacking things up for sco"
        else
                echo "hacking things up for hpux"
        fi
index 3d174ce..e543069 100644 (file)
 char *realpath(char *path, char resolved_path[]);
 #endif
 
+#if ! HAVE_S_IFSOCK
+#define S_IFSOCK (0)
+#endif
+
 #if ! HAVE_S_ISLNK
 #define S_ISLNK(mode) ((mode) & S_IFLNK)
 #endif