• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XCode 3.0 sys/types.h breaks AC_CACHE_CHECK for ac_cv_have_intxx_t (fwd)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode 3.0 sys/types.h breaks AC_CACHE_CHECK for ac_cv_have_intxx_t (fwd)


  • Subject: Re: XCode 3.0 sys/types.h breaks AC_CACHE_CHECK for ac_cv_have_intxx_t (fwd)
  • From: "Brian A. Seklecki" <email@hidden>
  • Date: Sat, 24 Nov 2007 01:57:43 -0500 (EST)


You are wrong. sys/types.h is not broken.

Something like this should improve your results. --- autoconf/configure.in~ 2007-10-24 13:37:02.000000000 -0500 +++ autoconf/configure.in 2007-11-23 23:45:21.000000000 -0600 @@ -1404,6 +1404,7 @@ sys/select.h \ sys/sockio.h \ sys/time.h \ + sys/types.h \

Peter:

Thank you.

I'm sure the Bacula development group will add the test after thorough testing on many platforms (assuming that it doens't invert functionality elsewhere). However, we never needed to check it before, and yet Bacula safely compiles on dozens of exotic platforms.

WRT to checking for types.h in Bacula:

I was just going through it. We never actually check for sys/types.h check for available types _within_ types.h at line 1532. That was my confusion.

Without the types.h check, what tends to happen is, for all checks after that, certain primative type typedefs occur "in-line" in confdefs.h (which gets built in real time):

Specifically, autoconf sets:

 | #define ino_t unsigned long
 | #define daddr_t long
 | #define major_t int
 | #define minor_t int
 | #define SIZEOF_CHAR 1
 | #define SIZEOF_SHORT_INT 2
 | #define SIZEOF_INT 4
 | #define SIZEOF_LONG_INT 4
 | #define SIZEOF_LONG_LONG_INT 8
 | #define SIZEOF_INT_P 4
 | #define HAVE_INTMAX_T 1


That leads to:

1) Because ino_t is probed wrong, HAVE_INO_T or -D_INO_T is never set and
   causes the DIR errors with overlapping types.

2) Because of the rest of the primative types being set by autoconf
   #defines instead of inclusion from sys/types.h (and all of its many
   thousand wonderful symlinks -- thanks for that Apple! =p), the
   HAVE_INT** checks fail (because/as a result of duplicate typedefs)

  For example:

  /usr/include/sys/types.h:100: error: two or more data types in
  declaration specifiers

That line:
  typedef int32_t                 daddr_t;        /* disk address */

  daddr_t has already been defined in autoconf confdefs.h, which then
  leads to the wonderful ac_cv_have_intxx_t / HAVE_INTXX_T problem

Per your suggestion (actally Martin Simmons beat you to it, but at first I thought he was recommending a cheap hack), when the check for sys/types.h is in place, then:

   #define HAVE_SYS_TYPES_H 1 is defined, thus:

checking for ino_t... yes
checking for intXX_t types... yes

All pass as exepcted and :

 | #define ino_t unsigned long
 | #define daddr_t long
 | #define major_t int
 | #define minor_t int

Are never set in confdefs.h

~~BAS


	sys/socket.h \
	arpa/nameser.h \
	resolv.h \

Peter
--
Peter O'Gorman
http://pogma.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: How do you force an Xcode C++ tool to statically link to a library?
  • Next by Date: An simple idea for DTrace and Xcode integration
  • Previous by thread: Re: How do you get Xcode to statically link libraries?
  • Next by thread: An simple idea for DTrace and Xcode integration
  • Index(es):
    • Date
    • Thread