bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Feature Branch Solaris Build Broken - lib/glob.c errors


From: Conrad T. Pino
Subject: RE: Feature Branch Solaris Build Broken - lib/glob.c errors
Date: Tue, 24 May 2005 21:41:41 -0700

Hi Derek,

> From: Derek Price
> 
> > Solaris Pragmas
> > ---------------
> >
> > For compatibility with the SunPRO compiler, the following pragma is
> > supported.
> >
> > `redefine_extname OLDNAME NEWNAME'
> > This pragma gives the C function OLDNAME the assembler label
> > NEWNAME. The pragma must appear before the function declaration.
> > This pragma is equivalent to the asm labels extension (*note Asm
> > Labels::). The preprocessor defines `__PRAGMA_REDEFINE_EXTNAME'
> > if the pragma is available.
> 
> Perhaps the problem is in your GCC installation or usage?

This link is similar to what you've found:
http://gcc.gnu.org/onlinedocs/gcc-3.3.3/gcc/Solaris-Pragmas.html#Solaris%20Pragmas

but this one is different and possibly later:
http://gcc.gnu.org/onlinedocs/gcc/Symbol_002dRenaming-Pragmas.html#Symbol_002dRenaming-Pragmas
which reads, "These pragmas are only available on platforms whose system 
headers need them."
and perhaps by implication the corresponding macros are there either.

This raises an interesting question.  By adding "__PRAGMA_REDEFINE_EXTNAME" to 
the
command line "sys/stat.h" did NOT "#define stat,fstat,lstat ..." since the 
issue is
CVS and Solaris are both attempting to #define the same tokens and don't 
compilers
quietly ignore #pragma statements they don't understand?

See the test program below which compiles and runs with no errors.  If we 
believe
the test program the redefine_extname pragma is just not implemented.  If so I'm
sorry as I sent us barking up the wrong tree.

> Regards,

Ditto,

> Derek

Conrad

/export/home/cvsusr/ccvs/cvs-1.12:$ cat test01.c fidofifi.?; rm test01; gcc -o 
test01 test01.c fidofifi.c; ./test01
=================== test01.c follows ===================
#include "fidofifi.h"

void test0( void )
{
        printf( "test0 fido is %s\n", fido( ) );
        printf( "test0 fifi is %s\n", fifi( ) );
}

#pragma redefine_extname fido fifi

#pragma garbage_junk radar run

void test1( void )
{
        printf( "test1 fido is %s\n", fido( ) );
        printf( "test1 fifi is %s\n", fifi( ) );
}

int main( int argc, char *argv[ ] )
{
        test0( );
        test1( );

        return 0;
}
=================== fidofifi.c follows ===================
#include "fidofifi.h"

char * fido( void ) { return "fido"; }
=================== fidofifi.h follows ===================
char * fifi( void ) { return "fifi"; }
#ifndef _FIDOFIFO_H
#define _FIDOFIFO_H 1

#include <stdio.h>

extern char * fido( void );
extern char * fifi( void );
#endif
=================== test01 output ===================
test0 fido is fido
test0 fifi is fifi
test1 fido is fido
test1 fifi is fifi
/export/home/cvsusr/ccvs/cvs-1.12:$   




reply via email to

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