🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #41397

Re: Can't get glibc to compile!

#41397
From: Thipor Kong
Date: Tue, 26 Mar 1996 00:00
71 lines
3179 bytes
In article <4j8sbb$rhm@news.cs.tu-berlin.de>,
Thipor Kong <supergau@cs.tu-berlin.de> wrote:
>In article <4inkdi$fj5@hardy.jsc.nasa.gov>,
>Daniel Poirot <poirot@mickey.jsc.nasa.gov> wrote:
>> [ compilation problems for GNU libc with GNU cc-2.7.2 ]
>
>These problems come from the changed syntax for the "__attribute__"
>extension with GNU cc-2.7.2 (I guess it came with this version).
>The "__attribute__" now follows the parameter lists of a function
>prototype.  GNU libc puts the "__attribute__" in front of the
>prototypes. Read more about this in the info files.

Maybe my first answer was not very helpful.  So here is a patch.
Save it to a file, say '/tmp/patchfile' and do something like this

	cd <GNU libc-1.09 top level directory>
	patch -p1 < /tmp/patchfile

It's not tested but I've done something similar then I encountered
this problem some month ago.

diff -c -r glibc-1.09/misc/sys/cdefs.h glibc-1.09p/misc/sys/cdefs.h
*** glibc-1.09/misc/sys/cdefs.h	Mon Oct 24 19:16:11 1994
--- glibc-1.09p/misc/sys/cdefs.h	Tue Mar 26 15:11:49 1996
***************
*** 24,53 ****
  /* Some user header file might have defined this before.  */
  #undef	__P
  
- #ifdef __GNUC__
- 
- #define	__P(args)	args	/* GCC can always grok prototypes.  */
- #define	__DOTS		, ...
- 
- /* In GCC versions before 2.5, the `volatile' and `const' keywords have
-    special meanings when applied to functions.  In versions 2.5 and 2.6,
-    the `__attribute__' syntax used below does not work properly.  */
- #if	__GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
- #define	__NORETURN	__volatile
- #define	__CONSTVALUE	__const
-  #elif	__GNUC__ > 2 || __GNUC_MINOR__ >= 7 /* Faith.  */
- /* In GCC 2.5 and later, these keywords are meaningless when applied to
-    functions, as ANSI requires.  Instead, we use GCC's special
-    `__attribute__' syntax.  */
- #define	__NORETURN	__attribute__ ((__volatile__))
- #define	__CONSTVALUE	__attribute__ ((__const__))
- #else
- #define __NORETURN
- #define __CONSTVALUE
- #endif
- 
- #else	/* Not GCC.  */
- 
  #define	__inline		/* No inline functions.  */
  #define	__NORETURN		/* No way to say functions never return.  */
  #define	__CONSTVALUE		/* No way to say functions are functional.  */
--- 24,29 ----
***************
*** 69,76 ****
  #define	__DOTS
  
  #endif	/* ANSI C or C++.  */
- 
- #endif	/* GCC.  */
  
  /* For these things, GCC behaves the ANSI way normally,
     and the non-ANSI way under -traditional.  */
--- 45,50 ----
-- 
�... das kommt immer darauf an, auf welcher Seite des Mikroskops
man sich befindet.� -- Dr. Murnau in `Kafka'
Technical Details
Message-ID: <4j8ugm$s3b@news.cs.tu-berlin.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <4inkdi$fj5@hardy.jsc.nasa.gov> <4j8sbb$rhm@news.cs.tu-berlin.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 11318c,9d079769ead0da66
X-Google-Attributes: gid11318c,public
From: supergau@cs.tu-berlin.de (Thipor Kong)
Subject: Re: Can't get glibc to compile!
Date: 1996/03/26
Message-ID: <4j8ugm$s3b@news.cs.tu-berlin.de>
X-Deja-AN: 144174195
references: <4inkdi$fj5@hardy.jsc.nasa.gov> <4j8sbb$rhm@news.cs.tu-berlin.de>
content-type: text/plain; charset=iso-8859-1
organization: Technical University of Berlin, Germany
mime-version: 1.0
newsgroups: gnu.gcc.help