summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-11 02:02:55 +0000
committerJeremy Allison <jra@samba.org>2001-04-11 02:02:55 +0000
commit7d65f57dcef12a62dca0b9d00c133930594f92d6 (patch)
tree069f3e6f5da1b31f4d082aa1e5d702757f3659cf
parent4f75b0d619e051270d5e7c5e262c9e47c6aef96b (diff)
downloadsamba-7d65f57dcef12a62dca0b9d00c133930594f92d6.tar.gz
Changed the order of -kPIC and -kpic.
Added patch from Michael Davidson <md@sco.COM> for Solaris/Unixware ACLS. Jeremy.
-rwxr-xr-xsource/config.guess6
-rwxr-xr-xsource/configure36
-rw-r--r--source/configure.in12
-rw-r--r--source/lib/sysacls.c10
4 files changed, 33 insertions, 31 deletions
diff --git a/source/config.guess b/source/config.guess
index 695867b068e..9161c8a573a 100755
--- a/source/config.guess
+++ b/source/config.guess
@@ -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 ;;
diff --git a/source/configure b/source/configure
index a638ec3c452..4bb6e2554ba 100755
--- a/source/configure
+++ b/source/configure
@@ -8261,45 +8261,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:8266: 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:8266: 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:8287: 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:8287: 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
diff --git a/source/configure.in b/source/configure.in
index 5dc5be3ed07..910447d57a4 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -685,17 +685,17 @@ 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
################
diff --git a/source/lib/sysacls.c b/source/lib/sysacls.c
index b0ba2075ab2..778f467c12b 100644
--- a/source/lib/sysacls.c
+++ b/source/lib/sysacls.c
@@ -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;
}