Compiling on HP-UX 10.10

Gerhard Klein G.Klein at edelmann.de
Tue Apr 6 06:55:12 GMT 1999


There are two bugs in shadow.h.

Bug 1:
If you haven't patched your system, you will find following lines in
/usr/include/shadow.h:
     extern struct spwd * getspnam(char *);
     extern int lckpwdf(void),                                    <-------
replace , with ;
     extern int ulckpwdf(void);
Delete config.cache and run configure again.

Bug 2:
If you make 2.0.3 you get a lot of warnings like:
In file included from /usr/include/hpsecurity.h:22,
                 from /usr/include/shadow.h:8,
                 from include/includes.h:285,
                 from smbd/server.c:22:
/usr/include/values.h:27: warning: `MAXINT' redefined
The warnings are o.k. :)

If you make 2.1.0 you get your errors again:

> Compiling passdb/pass_check.c
> passdb/pass_check.c: In function `password_check':
> passdb/pass_check.c:728: warning: passing arg 1 of `strcmp' makes
> pointer from
> nteger without a cast
> passdb/pass_check.c: In function `pass_check':
> passdb/pass_check.c:792: warning: assignment makes pointer from integer
> without
> a cast
> passdb/pass_check.c:793: dereferencing pointer to incomplete type
> passdb/pass_check.c:794: dereferencing pointer to incomplete type
> passdb/pass_check.c:812: warning: initialization makes pointer from
> integer wit
> out a cast
> passdb/pass_check.c:813: dereferencing pointer to incomplete type
> passdb/pass_check.c:814: dereferencing pointer to incomplete type
> *** Error exit code 1

In 2.0.3 there is a workaround in configure for the second HPUX bug. The
samba-team leave it out in 2.1.0 :((
Try the attached patch to put in the workaround.


Gerhard
--
http://www.edelmann.de
mailto:G.Klein at edelmann.de
Phone: +49 7321 340 368
Fax: +49 7321 340 363

-------------- next part --------------
*** configure.orig	Fri Mar 19 09:47:08 1999
--- configure	Fri Mar 19 09:44:27 1999
***************
*** 1811,1816 ****
--- 1811,1851 ----
  fi
  done
  
+ #
+ # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
+ # This causes configure to fail to detect it. Check for shadow separately on HPU
+ X.
+ #
+ case "$host_os" in
+     *hpux*)
+                 cat > conftest.$ac_ext <<EOF
+ #line 2021 "configure"
+ #include "confdefs.h"
+ #include <shadow.h>
+ int main() {
+ struct spwd testme
+ ; return 0; }
+ EOF
+ if { (eval echo configure:2028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5;
+ }; then
+   rm -rf conftest*
+   ac_cv_header_shadow_h=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   ac_cv_header_shadow_h=no
+ fi
+ rm -f conftest*
+                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
+                    cat >> confdefs.h <<\EOF
+ #define HAVE_SHADOW_H 1
+ EOF
+ 
+                 fi
+         ;;
+ esac
+ 
  for ac_hdr in shadow.h netinet/tcp.h sys/security.h security/pam_appl.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`


More information about the samba-ntdom mailing list