[Samba] Add -D_XOPEN_SOURCE_EXTENDED definition for HP/UX 11.00 platform

René Nieuwenhuizen R.Nieuwenhuizen at cpb.nl
Fri Nov 22 11:59:01 GMT 2002


Hi,

Sorry the previous sending had the wrong attachments!!!

I suggest to add the following definition to configure and its template
configure.in to allow samba-2.2.x to be compiled on HP/UX 11.00 with
some lesser warnings. Without this definition you'll get warnings on all
socket operation because the socket operations are UNIX98 specific and
HP/UX 11.00 will support this when _XOPEN_SOURCE_EXTENDED is defined.

-- 
René Nieuwenhuizen
Afdeling Informatietechnologie
Centraal Planbureau

Bezoekadres: Van Stolkweg 14, 2585 JR Den Haag
Postadres: Postbus 80510, 2508 GM Den Haag

T (070) 3383 342
F (070) 3383 350
I http://www.cpb.nl/nl/general/org/afdelingen/it/




--
================================================================================
Aan dit bericht kunnen geen rechten worden ontleend.
Het bericht is alleen bestemd voor de geadresseerde.
Indien dit bericht niet voor u is bestemd, verzoeken wij u dit onmiddellijk aan
ons te melden en de inhoud van het bericht te vernietigen.

This message shall not constitute any obligations.
This message is intended solely for the addressee.
If you have received this message in error, please inform us immediately and
delete its contents.
================================================================================
-------------- next part --------------
*** configure.orig	Tue Nov 19 19:44:19 2002
--- configure	Fri Nov 22 12:36:17 2002
***************
*** 1474,1480 ****
  
  				;;
  			*11*)
! 				CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
  				cat >> confdefs.h <<\EOF
  #define _HPUX_SOURCE 1
  EOF
--- 1474,1480 ----
  
  				;;
  			*11*)
! 				CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4 -D_XOPEN_SOURCE_EXTENDED"
  				cat >> confdefs.h <<\EOF
  #define _HPUX_SOURCE 1
  EOF
***************
*** 1488,1498 ****
--- 1488,1506 ----
  EOF
  
  				cat >> confdefs.h <<\EOF
+ #define _FILE_OFFSET_BITS 64
+ EOF
+ 
+ 				cat >> confdefs.h <<\EOF
  #define _ALIGNMENT_REQUIRED 1
  EOF
  
  				cat >> confdefs.h <<\EOF
  #define _MAX_ALIGNMENT 4
+ EOF
+ 
+ 				cat >> confdefs.h <<\EOF
+ #define _XOPEN_SOURCE_EXTENDED 1
  EOF
  
  		   		cat >> confdefs.h <<\EOF
-------------- next part --------------
*** configure.in.orig	Tue Nov 19 19:44:19 2002
--- configure.in	Fri Nov 22 12:37:03 2002
***************
*** 247,258 ****
  				AC_DEFINE(_MAX_ALIGNMENT,4)
  				;;
  			*11*)
! 				CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
  				AC_DEFINE(_HPUX_SOURCE)
  				AC_DEFINE(_POSIX_SOURCE)
  				AC_DEFINE(_LARGEFILE64_SOURCE)
  				AC_DEFINE(_ALIGNMENT_REQUIRED,1)
  				AC_DEFINE(_MAX_ALIGNMENT,4)
  		   		AC_DEFINE(USE_BOTH_CRYPT_CALLS)
  				;;
        esac
--- 247,260 ----
  				AC_DEFINE(_MAX_ALIGNMENT,4)
  				;;
  			*11*)
! 				CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4 -D_XOPEN_SOURCE_EXTENDED"
  				AC_DEFINE(_HPUX_SOURCE)
  				AC_DEFINE(_POSIX_SOURCE)
  				AC_DEFINE(_LARGEFILE64_SOURCE)
+ 				AC_DEFINE(_FILE_OFFSET_BITS,64)
  				AC_DEFINE(_ALIGNMENT_REQUIRED,1)
  				AC_DEFINE(_MAX_ALIGNMENT,4)
+ 				AC_DEFINE(_XOPEN_SOURCE_EXTENDE,1)
  		   		AC_DEFINE(USE_BOTH_CRYPT_CALLS)
  				;;
        esac


More information about the samba mailing list