From xemacs-m  Tue Feb 18 11:57:58 1997
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id LAA29256
	for <xemacs-beta@xemacs.org>; Tue, 18 Feb 1997 11:57:57 -0600 (CST)
Received: from Canada.Sun.COM ([129.155.5.101]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id JAA19649 for <xemacs-beta@xemacs.org>; Tue, 18 Feb 1997 09:56:54 -0800
Received: from scooter.canada.sun.com by Canada.Sun.COM (SMI-8.6/SMI-5.3)
	id MAA18601; Tue, 18 Feb 1997 12:56:24 -0500
Received: from verve.canada.sun.com by scooter.canada.sun.com (SMI-8.6/SMI-SVR4)
	id MAA20021; Tue, 18 Feb 1997 12:56:25 -0500
Received: by verve.canada.sun.com (SMI-8.6/SMI-SVR4)
	id MAA02028; Tue, 18 Feb 1997 12:56:25 -0500
Date: Tue, 18 Feb 1997 12:56:25 -0500
Message-Id: <199702181756.MAA02028@verve.canada.sun.com>
From: Georg Nikodym <georgn@Canada.Sun.COM>
To: XEmacs Beta Mailing List <xemacs-beta@xemacs.org>
Subject: 19.15 b94 build failure, solution and subsequent success
Reply-To: georgn@Canada.Sun.COM
X-Face:  ,~EI@l7'&P{\d++e`EMjNTNpzsxJPg(H]?Sd_T3xIlq[(PT[.D;A_/k)qfeC@m\/1]A{vZD
 r4&Lme-/M]c'Q>>:VM|L^<ED=j@dG!ld,bQ:IhT53q'x>6wZKH3iCT6Ff1-`*z{vCiT}+%(irA6TOn
 S~pFtml1bL\=kp%0PsLcF3+Q/e${o|S/<NUFDrU@;^o(D+av1g>Ce=ztlPGb$?up%c-*l'wmjw\sw;
 D__0Z;+93I+Kx6Mxdc]+|2V03aE@D8-fMT_v[~~FC9I\*|72QVW,aQ!`hHp_.gE.W&kxla2#)\Cmo
Mime-Version: 1.0 (generated by tm-edit 7.103)
Content-Type: text/plain; charset=US-ASCII


Configuration:

	defining HAVE_DBM
	defining EMACS_CONFIGURATION to be "sparc-sun-solaris2.6"
	defining config_machfile to be "m/sparc.h"
	defining config_opsysfile to be "s/sol2-6.h"
	defining LD_SWITCH_X_SITE to be -L/usr/openwin/lib -R/usr/openwin/lib
	defining LD_SWITCH_X_SITE_AUX to be 
	defining C_SWITCH_X_SITE to be -I/usr/openwin/include -I/usr/openwin/include/desktop -I/usr/openwin/include/desktop -I/usr/openwin/include/desktop
	defining LD_SWITCH_SITE to be  -L/usr/openwin/lib -L/usr/dt/lib -L/ot/misc_libs_static -L/usr/openwin/lib -R/usr/openwin/lib -L/usr/dt/lib -R/usr/dt/lib
	defining C_SWITCH_SITE to be  -I/usr/openwin/include -I/usr/dt/include -I/ot/misc_includes
	defining UNEXEC_SRC to be unexsol2-6.c
	defining PURESIZE to be 850000
	defining HAVE_X_WINDOWS
	defining GNU_MALLOC
	defining REL_ALLOC
	defining LISP_FLOAT_TYPE
	defining LWLIB_USES_MOTIF
	defining LWLIB_MENUBARS_LUCID
	defining HAVE_MENUBARS
	defining LWLIB_SCROLLBARS_MOTIF
	defining HAVE_SCROLLBARS
	defining LWLIB_DIALOGS_MOTIF
	defining HAVE_DIALOGS
	defining HAVE_TOOLBARS
	defining HAVE_TTY
	defining TOOLTALK
	defining SUNPRO
	defining NEED_XILDOFF
	defining HAVE_NATIVE_SOUND
	defining USE_GNU_MAKE
	defining CONST_IS_LOSING
	defining USE_ASSERTIONS
	defining MEMORY_USAGE_STATS


Configured for `sparc-sun-solaris2.6'.

  Where should the build process find the source code?    /import/verve/georgn/xemacs/xemacs-19.15-b94
  What installation prefix should install use?		  /ot/XEmacs_common
  What operating system and machine description files should XEmacs use?
        `s/sol2-6.h' and `m/sparc.h'
  What compiler should XEmacs be built with?              cc -g -xarch=v8plusa -xchip=ultra
  Should XEmacs use the GNU version of malloc?            yes
  Should XEmacs use the relocating allocator for buffers? yes
  What window system should XEmacs use?                   x11
  Where do we find X Windows header files?                /usr/openwin/include
  Where do we find X Windows libraries?                   /usr/openwin/lib
  Additional header files:                                /usr/openwin/include /usr/dt/include /ot/misc_includes
  Additional libraries:                                   /usr/openwin/lib /usr/dt/lib /ot/misc_libs_static /usr/openwin/lib /usr/dt/lib
  Compiling in support for XAUTH.
  Compiling in support for XPM.
  Compiling in support for X-Face headers.
  Compiling in support for GIF image conversion.
  Compiling in support for JPEG image conversion.
  Compiling in support for PNG image conversion.
  Compiling in native sound support.
  Compiling in support for DBM.
  Compiling in support for ToolTalk.
  Compiling in support for CDE.
  Compiling in support for SparcWorks.
  Using the Lucid menubar.
  Using the Motif scrollbar.
  Using the Motif dialog boxes.
  Using the union type for Lisp_Objects.
  Compiling in code for checking XEmacs memory usage.

I get:

(verve) 617$ gmake
Producing `src/paths.h' from `src/paths.h.in'.
rm -f src/paths.h.tmp
chmod 0644 src/paths.h.tmp
Producing `src/Emacs.ad.h' from `etc/Emacs.ad'.
rm -f src/Emacs.ad.h
cd lib-src; gmake all  \
	CC='cc' CFLAGS='-g -xarch=v8plusa -xchip=ultra' MAKE='gmake'
gmake[1]: Entering directory `/import/verve/georgn/xemacs/xemacs-19.15-b94/5.6-sparc-sun4u/lib-src'
cc -Demacs -DHAVE_CONFIG_H -DSTDC_HEADERS -I. -I../src -I/import/verve/georgn/xemacs/xemacs-19.15-b94/lib-src -I/import/verve/georgn/xemacs/xemacs-19.15-b94/lib-src/../src   -g -xarch=v8plusa -xchip=ultra /import/verve/georgn/xemacs/xemacs-19.15-b94/lib-src/make-path.c -o make-path
cc -Demacs -DHAVE_CONFIG_H -DSTDC_HEADERS -I. -I../src -I/import/verve/georgn/xemacs/xemacs-19.15-b94/lib-src -I/import/verve/georgn/xemacs/xemacs-19.15-b94/lib-src/../src   -g -xarch=v8plusa -xchip=ultra /import/verve/georgn/xemacs/xemacs-19.15-b94/lib-src/wakeup.c -lsocket -lnsl -lkvm -lelf -lgen -ldl   -L/usr/openwin/lib -L/usr/dt/lib -L/ot/misc_libs_static -L/usr/openwin/lib -R/usr/openwin/lib -L/usr/dt/lib -R/usr/dt/lib -o wakeup
"/usr/include/unistd.h", line 251: identifier redeclared: gethostname
	current : function(pointer to char, int) returning int
	previous: function(pointer to char, uint) returning int : "/import/verve/georgn/xemacs/xemacs-19.15-b94/lib-src/../src/s/sol2.h", line 46
cc: acomp failed for /import/verve/georgn/xemacs/xemacs-19.15-b94/lib-src/wakeup.c
gmake[1]: *** [wakeup] Error 2
gmake[1]: Leaving directory `/import/verve/georgn/xemacs/xemacs-19.15-b94/5.6-sparc-sun4u/lib-src'
gmake: *** [lib-src] Error 2

This is because <unistd.h> has both the BSD and the XPG4.2 (Spec1170)
definitions.

The BSD definition is:

	int gethostname(char *, int);

The spec1170 definition is:

	int gethostname(char *, size_t);

The problem arises from the fact that src/s/sol2.h defines
gethostname() in the spec1170 way to make up for the fact that
versions of Solaris prior to 2.6 did not have any prototype for
gethostname().

The correct thing to do is to change src/s/sol2.h to have the BSD
definition.  However, there is a small chance that someone will be
upset by said change and it is easier to add:

	#define __EXTENSIONS__

to src/s/sol2-6.h

