Re: C, math.h and globals

2003-03-11 Thread Vincent Lefevre
On Tue, Mar 11, 2003 at 16:05:50 +0100, Sebastiaan wrote: > I assume those functions are only available within *nix, since my partner > who uses Borland doesn't have this problem. There are available on RISC OS too. Well, on any system where the same mathematical library can be used. -- Vincent

Re: C, math.h and globals

2003-03-11 Thread Colin Watson
On Tue, Mar 11, 2003 at 04:07:37PM +0100, Sebastiaan wrote: > On Tue, 11 Mar 2003, Colin Watson wrote: > > On Tue, Mar 11, 2003 at 01:40:49PM +0100, Vincent Lefevre wrote: > > > It won't be defined in the header, but the corresponding symbol will > > > still be defined in the library itself. Won't

Re: C, math.h and globals

2003-03-11 Thread Vincent Lefevre
On Tue, Mar 11, 2003 at 14:43:06 +, Colin Watson wrote: > It links fine, but if you link with -lm (not the default) then it seems > you can get segfaults at run-time. I think that if you use #include this generally means that you use some mathematical functions (defined in the C standard)

Re: C, math.h and globals

2003-03-11 Thread Sebastiaan
Hi, On Tue, 11 Mar 2003, Colin Watson wrote: > On Tue, Mar 11, 2003 at 01:40:49PM +0100, Vincent Lefevre wrote: > > On Tue, Mar 11, 2003 at 11:37:42 +, Colin Watson wrote: > > > You could '#define __STRICT_ANSI__' at the top of the program if you > > > want the C library to define only what's

Re: C, math.h and globals

2003-03-11 Thread Sebastiaan
Hi, On Tue, 11 Mar 2003, Nicolas Kratz wrote: > man y1 > Ok, this makes sense now. I assume those functions are only available within *nix, since my partner who uses Borland doesn't have this problem. Thanks! Sebastiaan -- NT is the OS of the future. The main engine is the 16-bit Subsyste

Re: C, math.h and globals

2003-03-11 Thread Colin Watson
On Tue, Mar 11, 2003 at 01:40:49PM +0100, Vincent Lefevre wrote: > On Tue, Mar 11, 2003 at 11:37:42 +, Colin Watson wrote: > > You could '#define __STRICT_ANSI__' at the top of the program if you > > want the C library to define only what's in bare ISO Standard C, or > > '#define _ISOC99_SOURCE

Re: C, math.h and globals

2003-03-11 Thread Nicolas Kratz
man y1 -- Nicolas Kratz | GPG-key: 1D6D075A <[EMAIL PROTECTED]>| Never touch a running sysop, <[EMAIL PROTECTED]> | or your wife is a big hippo. pgp0.pgp Description: PGP signature

Re: C, math.h and globals

2003-03-11 Thread Vincent Lefevre
On Tue, Mar 11, 2003 at 11:37:42 +, Colin Watson wrote: > You could '#define __STRICT_ANSI__' at the top of the program if you > want the C library to define only what's in bare ISO Standard C, or > '#define _ISOC99_SOURCE' for C99. With either of those y1() won't be > defined. It won't be def

Re: C, math.h and globals

2003-03-11 Thread Vincent Lefevre
On Tue, Mar 11, 2003 at 10:39:31 +0100, Sebastiaan wrote: > Isn't this a bug in the C library? I mean, the standard libraries ought > not to be interfering with the variables you choose? Well, y1 doesn't seem to be a reserved identifier in any case. But you can see the C implementation provided by

Re: C, math.h and globals

2003-03-11 Thread Colin Watson
On Tue, Mar 11, 2003 at 10:39:31AM +0100, Sebastiaan wrote: > I have an odd thing with the math library and C. Take this simple program > as example: > > #include > > doubley1; > int main(void) > { > return 0; > } > > > When I try to compile this (just 'gcc test.c'), the compiler

C, math.h and globals

2003-03-11 Thread Sebastiaan
Hi, I have an odd thing with the math library and C. Take this simple program as example: #include double y1; int main(void) { return 0; } When I try to compile this (just 'gcc test.c'), the compiler returns me this error: test.c:4: `y1' redeclared as different kind of symbol /usr/i