Linux-compile (Re: [ANNOUNCE] saolc v. 1.0 (FDIS release) available)

From: Roger Klaveness (roger.klaveness@notam.uio.no)
Date: Fri Jul 02 1999 - 02:35:40 EDT


This excerpt from the documentation to the gnu c library states that
stdin,stdout and stderr are variables not constants

------------snip--------------------------
In the GNU C library, `stdin', `stdout', and `stderr' are normal
variables which you can set just like any others. For example, to
redirect the standard output to a file, you could do:

fclose (stdout);
stdout = fopen ("standard-output-file", "w");

Note however, that in other systems `stdin', `stdout', and `stderr'
are macros that you cannot assign to in the normal way. But you can
use `freopen' to get the effect of closing one and reopening it.
------------snip--------------------------

I got it to compile by (hack hack hack)
1.commenting out the offending line from saol.yy.c: (45)
2.in saol.h:
#define yyin stdin
#define yyout stdout
3.there were some trouble in genutils.h line 11
char *strdup(const char *);
which I commented out, should have been caugth by some #ifdef's I guess
4.make it

I'm on a Redhat 6.0 system , and using egcs-2.91.66

I haven't tested it so much, but it seems to work on the wovels and claps
examples

----------------------------------------
Roger Klaveness : rogerkl@notam.uio.no
NoTAM : http://www.notam.uio.no/
Kunstnett Norge : http://www.kunst.no/
----------------------------------------

On Thu, 01 Jul 1999, you wrote:
> >Linux Compilation Issues...
>
> >
> >saol.yy.c:45: initializer element for `yyin' is not constant
> >saol.yy.c:45: initializer element for `yyout' is not constant
>
>
> Hmmm. The relevant line is
>
> FILE *yyin = {stdin};
>
> which works on every platform and with every compiler I have.
>
> What compiler are you using? Have you tried gcc? Any Linux
> experts out there with suggestions?
>
> Best,
>
> -- Eric
>
> +-----------------+
> | Eric Scheirer |A-7b5 D7b9|G-7 C7|Cb C-7b5 F7#9|Bb |B-7 E7|
> |eds@media.mit.edu| < http://sound.media.mit.edu/~eds >
> | 617 253 0112 |A A/G# F#-7 F#-/E|Eb-7b5 D7b5|Db|C7b5 B7b5|Bb|
> +-----------------+

--



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:34 EST