Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [Patch] Win32 client autoconf stuff (PR#935)
Home

[Freeciv-Dev] Re: [Patch] Win32 client autoconf stuff (PR#935)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gaute B Strokkenes <gs234@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Win32 client autoconf stuff (PR#935)
From: Andreas Kemnade <akemnade@xxxxxxxxxxx>
Date: Mon, 3 Sep 2001 10:55:13 +0200

Gaute B Strokkenes writes:

 > Looks fine to me.
 > 
 > > @@ -476,13 +478,13 @@
 > >  
 > >  dnl Checks for header files.  AC_HEADER_STDC
 > >  -AC_CHECK_HEADERS(fcntl.h sys/time.h sys/types.h unistd.h
 > >  sys/utsname.h)
 > > +AC_CHECK_HEADERS(fcntl.h sys/time.h sys/types.h unistd.h)
 > >  dnl Avoid including the unix emulation layer if we build mingw executables
 > >  dnl There would be type conflicts between winsock and bsd/unix includes
 > >  if test "x$MINGW32" != "xyes"; then
 > >    AC_CHECK_HEADERS(arpa/inet.h netdb.h netinet/in.h pwd.h sys/ioctl.h \
 > >                     sys/select.h sys/signal.h sys/socket.h sys/termio.h \
 > > -                   sys/uio.h termios.h)
 > > +                   sys/uio.h termios.h  sys/utsname.h)
 > >  fi
 > >  if test x$client = xxaw; then
 > >    dnl Want to get appropriate -I flags:
 > 
 > Are you sure you wish to undo this recent change.
 > 
I haven't noticed that problem when that patch was sent to the list. I
could not safely apply it to my gui-win32 freeciv tree.

This patch should not change anything on non-mingw32 systems. 

The idea behind that patch was to avoid including something you cannot
use.
The situation on cygwin is the following:
 - sys/utsname.h  can be found -> HAVE_SYS_UTSNAME_H is defined
 - uname          cannot be found if you don't link with cygwin.dll
                    (when you switch to mingw32 and use CC="gcc -mno-cygwin")
                   
I don't know if it is *always* safe to include sys/utsname.h without
having uname. There is a risk of getting type conflicts.

I think that it is the cleaner way to avoid including sys/utsname.h on
mingw32 systems. What is your opinion?

Greetings
Andreas Kemnade


[Prev in Thread] Current Thread [Next in Thread]