[Linux-ha-dev] Successfull build with HEAD + ANSI Flag

Lars Ellenberg l.g.e at web.de
Tue Oct 5 12:24:42 MDT 2004


/ 2004-09-30 15:14:24 +0200
\ Lars Ellenberg:
> / 2004-09-30 14:55:44 +0200
> \ Andrew Beekhof:
> > you so have way too much time :)
> 
> thats not exactly true :)
> I just needed a break from cts work.
> and still my test cluster bitches at me ...
> guess I need to switch it off and give it a rest too for some hours.
> 
> in fact, it took only a couple of vim magic (hint "[I")
> to reveal the missing black magic:
>   complained about size_t in unistd.h
> 	--> stddef.h
>   go find it for your box
>   (here this is /usr/lib/gcc-lib/i586-suse-linux/3.3.1/include/stddef.h)
>   grep for size_t -->
>   #if defined (_STDDEF_H) || defined (__need_size_t)
>   ... bunch of black magic ...
>   most inner
>   #if !(defined (__GNUG__) && defined (size_t))
>   typedef __SIZE_TYPE__ size_t;
> 
> hm.
> undefined __GNUG__
> make
> ran half through!
>  complained somewhere later because of missing _GNU_SOURCE
> defined that.
> ran right into the first '//' comment.
> done :-)

as I went through all this configure.in stuff recently,
I noticed that there is the AC_TYPE_SIZE_T, which we don't use.
since I just do not know what side effects -U__GNUG__ might have,
this seems to be more appropriate.
  ./ConfigureMe make --enable-ansi --enable-crm
still works for me.

cvs ci soonish,
unless this macro is not available
in some of the older automake versions ?

	lge

Index: configure.in
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/configure.in,v
retrieving revision 1.334
diff -u -p -r1.334 configure.in
--- configure.in	5 Oct 2004 14:26:16 -0000	1.334
+++ configure.in	5 Oct 2004 18:17:02 -0000
@@ -1047,7 +1047,7 @@ dnl Add any system specific options here
 
 	if test "${enable_ansi}" = yes && cc_supports_flag -std=iso9899:199409 ; then
 	echo "Enabling ANSI Compatibility on this platform"
-	ANSI="-ansi -U__GNUG__ -D_GNU_SOURCE"
+	ANSI="-ansi -D_GNU_SOURCE"
 	fi
 
 	if test "${enable_fatal_warnings}" = yes && cc_supports_flag -Werror ; then
@@ -1413,6 +1413,9 @@ AC_CHECK_SIZEOF(char)
 AC_CHECK_SIZEOF(short)
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
+
+dnl if not known on this system, #define size_t unsigned
+AC_TYPE_SIZE_T
 
 dnl
 dnl Lex and yacc can't be trusted to produce code that won't produce



More information about the Linux-HA-Dev mailing list