Changed the order of -kPIC and -kpic.
authorJeremy Allison <jra@samba.org>
Wed, 11 Apr 2001 02:02:45 +0000 (02:02 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 11 Apr 2001 02:02:45 +0000 (02:02 +0000)
Added patch from Michael Davidson <md@sco.COM> for Solaris/Unixware ACLS.
Jeremy.
(This used to be commit 144a2906810e8d4414d627835eb80f60bd1d88a4)

source3/config.guess
source3/configure
source3/configure.in
source3/lib/sysacls.c

index 695867b068e64d76fed4a3786a3e809791e6eb30..9161c8a573a09c8437eb4d4fb6b0f92226d79cbd 100755 (executable)
@@ -428,9 +428,9 @@ EOF
                echo ${UNAME_MACHINE}-unknown-sysv32
        fi
        exit 0 ;;
-       *:UnixWare:*:*)
-               echo ${UNAME_MACHINE}-UnixWare-sysv${UNAME_RELEASE}
-               exit 0 ;;
+    *:UnixWare:*:* | *:OpenUNIX:*:*)
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
+       exit 0 ;;
     Intel:Mach:3*:*)
        echo i386-unknown-mach3
        exit 0 ;;
index bcff6d76ed4fe9dbf9ecd674abfbe54a8c0c533a..570d741314e3c7eb9d9955adad9de6c7e6e8607f 100755 (executable)
@@ -935,7 +935,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -8151,45 +8151,45 @@ if test $ac_cv_prog_cc_fpic = yes; then
     PICFLAG="-fpic";
 fi
 if test x$PICFLAG = x; then
-  echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
-echo "configure:8156: checking whether ${CC-cc} accepts -Kpic" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
+  echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
+echo "configure:8156: checking whether ${CC-cc} accepts -KPIC" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_Kpic=yes
+if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_KPIC=yes
 else
-  ac_cv_prog_cc_Kpic=no
+  ac_cv_prog_cc_KPIC=no
 fi
 rm -f conftest*
 
 fi
 
-echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
-  if test $ac_cv_prog_cc_Kpic = yes; then
-    PICFLAG="-Kpic";
+echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
+  if test $ac_cv_prog_cc_KPIC = yes; then
+    PICFLAG="-KPIC";
   fi
 fi
 if test x$PICFLAG = x; then
-  echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
-echo "configure:8177: checking whether ${CC-cc} accepts -KPIC" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
+  echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
+echo "configure:8177: checking whether ${CC-cc} accepts -Kpic" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_KPIC=yes
+if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_Kpic=yes
 else
-  ac_cv_prog_cc_KPIC=no
+  ac_cv_prog_cc_Kpic=no
 fi
 rm -f conftest*
 
 fi
 
-echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
-  if test $ac_cv_prog_cc_KPIC = yes; then
-    PICFLAG="-KPIC";
+echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
+  if test $ac_cv_prog_cc_Kpic = yes; then
+    PICFLAG="-Kpic";
   fi
 fi
 
@@ -11603,8 +11603,8 @@ if test "${with_acl_support+set}" = set; then
   yes)
 
         case "$host_os" in
-        *unixware*)
-            echo "$ac_t""Using SVR4 ACLs" 1>&6
+        *sysv5*)
+            echo "$ac_t""Using UnixWare ACLs" 1>&6
             cat >> confdefs.h <<\EOF
 #define HAVE_UNIXWARE_ACLS 1
 EOF
index 6b84c69ef6af64a13c2230389082703fc61dde96..3d32346821ae813d77c6a357c600adfc0ecf3852 100644 (file)
@@ -592,18 +592,18 @@ AC_PROG_CC_FLAG(fpic)
 if test $ac_cv_prog_cc_fpic = yes; then
     PICFLAG="-fpic";
 fi
-if test x$PICFLAG = x; then
-  AC_PROG_CC_FLAG(Kpic)
-  if test $ac_cv_prog_cc_Kpic = yes; then
-    PICFLAG="-Kpic";
-  fi
-fi
 if test x$PICFLAG = x; then
   AC_PROG_CC_FLAG(KPIC)
   if test $ac_cv_prog_cc_KPIC = yes; then
     PICFLAG="-KPIC";
   fi
 fi
+if test x$PICFLAG = x; then
+  AC_PROG_CC_FLAG(Kpic)
+  if test $ac_cv_prog_cc_Kpic = yes; then
+    PICFLAG="-Kpic";
+  fi
+fi
 
 ################
 
@@ -1984,8 +1984,8 @@ AC_ARG_WITH(acl-support,
   yes)
 
         case "$host_os" in
-        *unixware*)
-            AC_MSG_RESULT(Using SVR4 ACLs)
+        *sysv5*)
+            AC_MSG_RESULT(Using UnixWare ACLs)
             AC_DEFINE(HAVE_UNIXWARE_ACLS)
             ;;
         *solaris*)
index b0ba2075ab2a5c83498045031df1db175003e0ef..778f467c12be2932203379f1049e4e01dc40a97b 100644 (file)
@@ -302,18 +302,19 @@ SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type)
        while ((count = acl(path_p, GETACL, count, &acl_d->acl[0])) < 0
            && errno == ENOSPC) {
 
+               sys_acl_free_acl(acl_d);
+
                if ((count = acl(path_p, GETACLCNT, 0, NULL)) < 0) {
                        return NULL;
                }
 
-               sys_acl_free_acl(acl_d);
-
                if ((acl_d = sys_acl_init(count)) == NULL) {
                        return NULL;
                }
        }
 
        if (count < 0) {
+               sys_acl_free_acl(acl_d);
                return NULL;
        }
 
@@ -365,18 +366,19 @@ SMB_ACL_T sys_acl_get_fd(int fd)
        while ((count = facl(fd, GETACL, count, &acl_d->acl[0])) < 0
            && errno == ENOSPC) {
 
+               sys_acl_free_acl(acl_d);
+
                if ((count = facl(fd, GETACLCNT, 0, NULL)) < 0) {
                        return NULL;
                }
 
-               sys_acl_free_acl(acl_d);
-
                if ((acl_d = sys_acl_init(count)) == NULL) {
                        return NULL;
                }
        }
 
        if (count < 0) {
+               sys_acl_free_acl(acl_d);
                return NULL;
        }