tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkgtools/libnbcompat diffs for A/UX



Following are the changes I made to get libnbcompat to compile on A/UX.  I
can't say this is ready to commit yet, as I have not completed the entire
bootstrap process to be able to see if this actually _works_.  But I wanted
to post it here and solicit feedback, in case I've committed any egregious
pkgsrc sins or something like that.  :)  I made changes in
bootstrap/bootstrap also but I'll post that separately.


Thanks,
Tim

PS  If it's bad form to post patches like this, please let me know.



Index: pkgtools/libnbcompat/files/configure
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/libnbcompat/files/configure,v
retrieving revision 1.62
diff -u -p -r1.62 configure
--- pkgtools/libnbcompat/files/configure        19 May 2008 12:52:57 -0000
1.62
+++ pkgtools/libnbcompat/files/configure        30 Jun 2008 19:02:51 -0000
@@ -11797,8 +11797,10 @@ done



-for ac_func in gid_from_group group_from_gid pwcache_groupdb \
-       pwcache_userdb uid_from_user user_from_uid \
+
+
+for ac_func in endgrent endpwent gid_from_group group_from_gid \
+       pwcache_groupdb pwcache_userdb uid_from_user user_from_uid \

 do
 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -11904,8 +11906,10 @@ done



-for ac_func in gid_from_group group_from_gid pwcache_groupdb \
-       pwcache_userdb uid_from_user user_from_uid \
+
+
+for ac_func in endgrent endpwent gid_from_group group_from_gid \
+       pwcache_groupdb pwcache_userdb uid_from_user user_from_uid \

 do
 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -13177,6 +13181,114 @@ else
   :
 fi

+{ $as_echo "$as_me:$LINENO: checking for struct statfs.f_flags" >&5
+$as_echo_n "checking for struct statfs.f_flags... " >&6; }
+if test "${ac_cv_member_struct_statfs_f_flags+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+ #include <sys/statfs.h>
+
+int
+main ()
+{
+static struct statfs ac_aggr;
+if (ac_aggr.f_flags)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_member_struct_statfs_f_flags=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+ #include <sys/statfs.h>
+
+int
+main ()
+{
+static struct statfs ac_aggr;
+if (sizeof ac_aggr.f_flags)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_member_struct_statfs_f_flags=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_member_struct_statfs_f_flags=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_statfs_f_flags"
>&5
+$as_echo "$ac_cv_member_struct_statfs_f_flags" >&6; }
+if test $ac_cv_member_struct_statfs_f_flags = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STATFS_F_FLAGS 1
+_ACEOF
+
+:
+else
+  :
+fi
+
 { $as_echo "$as_me:$LINENO: checking for struct dirent.d_namlen" >&5
 $as_echo_n "checking for struct dirent.d_namlen... " >&6; }
 if test "${ac_cv_member_struct_dirent_d_namlen+set}" = set; then
Index: pkgtools/libnbcompat/files/configure.ac
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/libnbcompat/files/configure.ac,v
retrieving revision 1.63
diff -u -p -r1.63 configure.ac
--- pkgtools/libnbcompat/files/configure.ac     19 May 2008 12:52:57 -0000
1.63
+++ pkgtools/libnbcompat/files/configure.ac     30 Jun 2008 19:02:51 -0000
@@ -260,11 +260,11 @@ AC_CHECK_FUNCS([getmode setmode], [:], [
        break
 ])

-AC_CHECK_FUNCS([gid_from_group group_from_gid pwcache_groupdb \
-       pwcache_userdb uid_from_user user_from_uid \
+AC_CHECK_FUNCS([endgrent endpwent gid_from_group group_from_gid \
+       pwcache_groupdb pwcache_userdb uid_from_user user_from_uid \
 ])
-AC_CHECK_FUNCS([gid_from_group group_from_gid pwcache_groupdb \
-       pwcache_userdb uid_from_user user_from_uid \
+AC_CHECK_FUNCS([endgrent endpwent gid_from_group group_from_gid \
+       pwcache_groupdb pwcache_userdb uid_from_user user_from_uid \
 ], [:], [
        AC_LIBOBJ(pwcache)
        break
@@ -330,6 +330,8 @@ AC_CHECK_MEMBERS([struct statfs.f_fsize]
        [ #include <sys/statfs.h> ])
 AC_CHECK_MEMBERS([struct statfs.f_iosize], [:], [:],
        [ #include <sys/statfs.h> ])
+AC_CHECK_MEMBERS([struct statfs.f_flags], [:], [:],
+       [ #include <sys/statfs.h> ])
 AC_CHECK_MEMBERS([struct dirent.d_namlen, DIR.dd_fd], [:], [:],
        [ #include <sys/types.h>
          #if HAVE_DIRENT_H
Index: pkgtools/libnbcompat/files/statvfs.c
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/libnbcompat/files/statvfs.c,v
retrieving revision 1.4
diff -u -p -r1.4 statvfs.c
--- pkgtools/libnbcompat/files/statvfs.c        29 Apr 2008 05:46:08 -0000
1.4
+++ pkgtools/libnbcompat/files/statvfs.c        30 Jun 2008 19:02:51 -0000
@@ -39,10 +39,12 @@ static void
 fs2vfs(struct statvfs *vfs, const struct statfs *sfs)
 {
        vfs->f_flag = 0;
+#if HAVE_STRUCT_STATFS_F_FLAGS
        if (sfs->f_flags & MNT_RDONLY)
                vfs->f_flag |= ST_RDONLY;
        if (sfs->f_flags & MNT_NOSUID)
                vfs->f_flag |= ST_NOSUID;
+#endif

 #if HAVE_STRUCT_STATFS_F_FSIZE
        vfs->f_bsize = sfs->f_fsize
Index: pkgtools/libnbcompat/files/nbcompat/grp.h
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/libnbcompat/files/nbcompat/grp.h,v
retrieving revision 1.2
diff -u -p -r1.2 grp.h
--- pkgtools/libnbcompat/files/nbcompat/grp.h   29 Apr 2008 05:46:08 -0000
1.2
+++ pkgtools/libnbcompat/files/nbcompat/grp.h   30 Jun 2008 19:02:51 -0000
@@ -52,4 +52,8 @@ const char *group_from_gid(gid_t, int);
 int gid_from_group(const char *, gid_t *);
 #endif

+#if !HAVE_ENDGRENT
+void endgrent(void);
+#endif
+
 #endif /* !_NBCOMPAT_GRP_H_ */
Index: pkgtools/libnbcompat/files/nbcompat/pwd.h
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/libnbcompat/files/nbcompat/pwd.h,v
retrieving revision 1.2
diff -u -p -r1.2 pwd.h
--- pkgtools/libnbcompat/files/nbcompat/pwd.h   29 Apr 2008 05:46:08 -0000
1.2
+++ pkgtools/libnbcompat/files/nbcompat/pwd.h   30 Jun 2008 19:02:51 -0000
@@ -52,4 +52,8 @@ const char *user_from_uid(uid_t, int);
 int uid_from_user(const char *, uid_t *);
 #endif

+#if !HAVE_ENDPWENT
+void endpwent(void);
+#endif
+
 #endif /* !_NBCOMPAT_PWD_H_ */

-- 
Tim Larson        AMT2 Unix Systems Administrator
    InterCall, a division of West Corporation

               Eschew obfuscation!

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Home | Main Index | Thread Index | Old Index