This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help with specs


In my spec , I have changed my cpp line in this way:
*cpp:
%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}
-D_INCLUDE__STDC_A1_SOURCE

That is, I have appended -D_INCLUDE__STDC_A1_SOURCE, and this code

#include <stdio.h>

int main ( void ){

#ifdef _INCLUDE__STDC_A1_SOURCE
  printf("Yes\n");
#else
  printf("No\n");
#endif
  return 0;
}

print "Yes" string.
It seem correct.
	
On Mon, 2004-08-16 at 21:24, DY, JERRY U (SBCSI) wrote:
> Here's my config:
> 
> g++ -v
> Reading specs from
> /usr/local/appl/gcc-3.4.1/lib/gcc/hppa2.0w-hp-hpux11.11/3.4.1/specs
> Configured with: ../gcc-3.4.1/configure --prefix=/usr/local/appl/gcc
> --with-as=/usr/local/appl/binutils/bin/as --enable-threa
> ds=posix
> Thread model: posix
> gcc version 3.4.1
> 
> I wanted to change the specs so that -D_INCLUDE__STDC_A1_SOURCE is
> defined everytime the precompiler is invoked, so I modify the cpp entry
> in the specs file as follows:
> 
> *cpp:
> -D_INCLUDE__STDC_A1_SOURCE %{mt|pthread:-D_REENTRANT -D_THREAD_SAFE
> -D_POSIX_C_SOURCE=199506L}
> 
> But it doesn't appear to be working. Is there something wrong with my
> syntax or am I missing something? Thanks!
> 
> -Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]