[comp.sys.amiga.programmer] GCC - No gets

lord_zar@ucrmath.ucr.edu (wayne wallace) (05/17/91)

Okay, I'm finally active enough and pissed-off enough to complain, in public,
not using email like a smart fella, cause I figure someone may have already
made a hack to fix my problem.

Prob: GCC is missing gets() from the include files! I assume everyone knows
how painful getting input becomes with only scanf() and fscanf() and getc().

Has anyone made the hack to the lib and header file to fix this, or do I have
to wait for the next update past .90(lots o' digits) ?

Wayne

wild@nessie.cs.id.ethz.ch (Markus Wild) (05/17/91)

In article <lord_zar.674443629@ucrmath> lord_zar@ucrmath.ucr.edu (wayne wallace) writes:
>Prob: GCC is missing gets() from the include files! I assume everyone knows
>how painful getting input becomes with only scanf() and fscanf() and getc().

Hey, you can't just blaim GCC for that! Gcc as it is distributed by the FSF
comes only with a VERY limited set of header files, stdarg.h comes to mind.
Gcc really relies on the fact that you're going to replace your 'system' cc
with it, so it can continue to use that environment. There is a gnu library
(and whence header files) under construction, but there is no official release
yet. You probably want to use the PDC headers/libraries, or the the PDC ones
hacked over severly by Ray Burr (Was it you Ray? I know it's someone of your
group;-)). You should find this stuff where you got your copy of gcc from.

-Markus

BTW: extern char* gets(char *);
     Just try it, the library should contain it, even if it doesn't show up
     in the header files.

-- 
Markus M. Wild    - mwild@iiic.ethz.ch  |  wild@nessie.cs.id.ethz.ch
--
Still looking for a REAL debugger for Release 4 ...

vinsci@nic.funet.fi (Leonard Norrgard) (05/20/91)

In article <1991May17.135410.20757@bernina.ethz.ch> wild@nessie.cs.id.ethz.ch (Markus Wild) writes:
   In article <lord_zar.674443629@ucrmath> lord_zar@ucrmath.ucr.edu (wayne wallace) writes:
   >Prob: GCC is missing gets() from the include files! I assume everyone knows
   >how painful getting input becomes with only scanf() and fscanf() and getc().

   Hey, you can't just blaim GCC for that! Gcc as it is distributed by the FSF
   comes only with a VERY limited set of header files, stdarg.h comes to mind.
   Gcc really relies on the fact that you're going to replace your 'system' cc
   with it, so it can continue to use that environment. There is a gnu library
   (and whence header files) under construction, but there is no official release
   yet. You probably want to use the PDC headers/libraries, or the the PDC ones
   hacked over severly by Ray Burr (Was it you Ray? I know it's someone of your
   group;-)). You should find this stuff where you got your copy of gcc from.

   -Markus

   BTW: extern char* gets(char *);
	Just try it, the library should contain it, even if it doesn't show up
	in the header files.

Well, *I* for one, do not miss gets() and in my opinion it shouldn't
be included in any library at all since you can't specify a maximum
buffer length that it is allowed to use.
  Instead, use fgets() (with stdin as the file) that's the safe way to
go. Anyone remember the internet worm? Remember anyone recompiling
software *without* gets()?

-- Leonard