Mail Archives: cygwin/2006/03/01/20:00:14
On Wed, 1 Mar 2006, Basavaraj Hiremath wrote:
> Hi,
> I am compiling a file(strerror.c) with following
> option
> -bash-2.05b$ arm-wince-pe-gcc -mcpu=xscale -c -ansi
^^^^^
> -D__stdcall= -D_OFF_T_ -DHAVE_CONFIG_H
> -I/usr/local/wince/cross-tools/include -I. -I./../include -W -Wall
> -Wtraditional -pedantic ./strerror.c -o pic/strerror.o
>
> It's giving following compilation error
> /strerror.c:626: error: expected identifier or '('
> before string constant
> /strerror.c:628: error: expected identifier or '('
> before '{' token
>
> file strerror.c has following function
>
> char *
> strerror (errnoval) -> line 626
> int errnoval;
^^^^^^^^^^^^^
> { --> line 628
> const char *msg;
> static char buf[32];
> -----------
> -----
> }
>
> Could somebody tell me, what is the compiler option to go pass thru this
> kind of implementation?
You are compiling a K&R-style C function header in ANSI mode -- of course
you're getting an error. Either remove the -ansi flag, or fix the file to
use ANSI-style declaration.
Google for "k&r ansi" for innumerable resources on this. Oh, and this has
nothing to do with Cygwin.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -