Alexander Skwar | 7 Dec 12:26

stray '#' in program and environ undeclared

Hello once more...

Now I'm getting this compile error:

     CC export.c
     CC fsvs.c
fsvs.c: In function 'Version':
fsvs.c:539: error: stray '#' in program
fsvs.c:539: error: called object '"compile options:\012\011 HAVE_LOCALES=1
AC_CV_C_UINT32_T=uint32_t HAVE_STRUCT_STAT_ST_MTIM=1 O_DIRECTORY==(0)="' is not a function
fsvs.c:544: error: syntax error before string constant
fsvs.c: In function 'main':
fsvs.c:852: error: 'environ' undeclared (first use in this function)
fsvs.c:852: error: (Each undeclared identifier is reported only once
fsvs.c:852: error: for each function it appears in.)
gmake[1]: *** [fsvs.o] Error 1
gmake: *** [default-target] Error 2

line 539 is the line with STRINGIFY:
#ifdef O_DIRECTORY
                                STRINGIFY(O_DIRECTORY=)#O_DIRECTORY
#endif

--(askwar <at> winds06)-(98/pts/4)-(12:30:35/2007-12-07)--
--($:~/Source/fsvs)-- /opt/csw/gcc4/bin/gcc --version
gcc (GCC) 4.0.2
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(Continue reading)

Philipp Marek | 7 Dec 12:58

Re: stray '#' in program and environ undeclared

On Friday 07 December 2007 Alexander Skwar wrote:
> Now I'm getting this compile error:
>
>      CC export.c
>      CC fsvs.c
> fsvs.c: In function 'Version':
> fsvs.c:539: error: stray '#' in program
r1255.

> fsvs.c:539: error: called object '"compile options:\012\011 HAVE_LOCALES=1
> AC_CV_C_UINT32_T=uint32_t HAVE_STRUCT_STAT_ST_MTIM=1 O_DIRECTORY==(0)="' is
> not a function fsvs.c:544: error: syntax error before string constant
> fsvs.c: In function 'main':
> fsvs.c:852: error: 'environ' undeclared (first use in this function)
> fsvs.c:852: error: (Each undeclared identifier is reported only once
> fsvs.c:852: error: for each function it appears in.)
> gmake[1]: *** [fsvs.o] Error 1
> gmake: *** [default-target] Error 2
environ is SUS:
	environ - array of character pointers to the environment strings
	http://opengroup.org/onlinepubs/007908799/xsh/environ.html

Does that help?

diff fsvs.c
Index: fsvs.c
===================================================================
--- fsvs.c      (Revision 1255)
+++ fsvs.c      (Arbeitskopie)
@@ -769,7 +769,7 @@ void *_do_component_tests(int a)
(Continue reading)

Alexander Skwar | 7 Dec 13:08

Re: stray '#' in program and environ undeclared

Philipp Marek schrieb:

> environ is SUS:
> 	environ - array of character pointers to the environment strings
> 	http://opengroup.org/onlinepubs/007908799/xsh/environ.html
> 
> 
> Does that help?

Yes, it did. I'm still getting this, though:

fsvs.c: In function 'Version':
fsvs.c:539: error: stray '#' in program
fsvs.c:539: error: called object '"compile options:\012\011 HAVE_LOCALES=1
AC_CV_C_UINT32_T=uint32_t HAVE_STRUCT_STAT_ST_MTIM=1 O_DIRECTORY==(0)="' is not a function
fsvs.c:544: error: syntax error before string constant
gmake[1]: *** [fsvs.o] Error 1
gmake: *** [default-target] Error 2

Thanks a lot,
Alexander
Philipp Marek | 7 Dec 13:31

Re: stray '#' in program and environ undeclared

On Friday 07 December 2007 Alexander Skwar wrote:
> Philipp Marek schrieb:
> > environ is SUS:
> > 	environ - array of character pointers to the environment strings
> > 	http://opengroup.org/onlinepubs/007908799/xsh/environ.html
> >
> >
> > Does that help?
>
> Yes, it did. I'm still getting this, though:
>
> fsvs.c: In function 'Version':
> fsvs.c:539: error: stray '#' in program
> fsvs.c:539: error: called object '"compile options:\012\011 HAVE_LOCALES=1
> AC_CV_C_UINT32_T=uint32_t HAVE_STRUCT_STAT_ST_MTIM=1 O_DIRECTORY==(0)="' is
> not a function fsvs.c:544: error: syntax error before string constant
> gmake[1]: *** [fsvs.o] Error 1
> gmake: *** [default-target] Error 2
Are you using r1255? It has this:

svn diff -r PREV:HEAD fsvs.c
Index: fsvs.c
===================================================================
--- fsvs.c      (Revision 1254)
+++ fsvs.c      (Revision 1255)
@@ -536,7 +536,7 @@ const char* Version(FILE *output)
                                STRINGIFY(HAVE_O_DIRECTORY)
 #endif
 #ifdef O_DIRECTORY
-                               STRINGIFY(O_DIRECTORY=)#O_DIRECTORY
(Continue reading)

Alexander Skwar | 7 Dec 13:39

Re: stray '#' in program and environ undeclared

Philipp Marek schrieb:
> On Friday 07 December 2007 Alexander Skwar wrote:

>> fsvs.c: In function 'Version':
>> fsvs.c:539: error: stray '#' in program
>> fsvs.c:539: error: called object '"compile options:\012\011 HAVE_LOCALES=1
>> AC_CV_C_UINT32_T=uint32_t HAVE_STRUCT_STAT_ST_MTIM=1 O_DIRECTORY==(0)="' is
>> not a function fsvs.c:544: error: syntax error before string constant
>> gmake[1]: *** [fsvs.o] Error 1
>> gmake: *** [default-target] Error 2
> Are you using r1255? 

No. I was using 1254. I did a svn up, and now that problem
is fixed as well.

Expect a new issue to come up soon :)

Thanks once more,
Alexander

Gmane