home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!news.claremont.edu!jarthur.claremont.edu!jwinstea
- From: jwinstea@jarthur.claremont.edu (Jim Winstead Jr.)
- Subject: Re: mtools, compiling problems
- Message-ID: <1992Jul29.233928.9415@muddcs.claremont.edu>
- Sender: news@muddcs.claremont.edu (The News System)
- Organization: Harvey Mudd College, WIBSTR
- References: <5561@umriscc.isc.umr.edu>
- Date: Wed, 29 Jul 1992 23:39:28 GMT
- Lines: 36
-
- In article <5561@umriscc.isc.umr.edu> dminer@mcs213f.cs.umr.edu (Dan Miner) writes:
- > Well, I finally got around to updating my system. I got
- >bunches of stuff. I have gcc 2.2.2 installed. Now, I'm trying to
- >compile the mtools (the one that is one file for all) and I got
- >a problem. When linking, gcc complains that got_signal isn't there.
- >Well, I looked and it's true. I find references in three files but
- >no where is it defined.. What's up with this?
-
- Actually, got_signal is ifdef'ed out of some of the files, and I've
- never been able to get it to compile without removing the ifdef's. In
- each of the files that gcc complains about, find the got_signal
- function that is ifdef'ed out, and remove the ifdefs. It should link
- fine, then.
-
- >Also, gcc complains about gets() in stdio.. saying that you shouldn't
- >use it? Why on earth is that in there? If you have functions that
- >are that unreliable, REMOVE IT! I do believe it is ansi, so why say
- >something like that? *fume*
-
- gets() is ANSI, that is why it *has* to remain in the library. gets()
- is unsafe because you cannot limit the size of the string that it
- reads - if you pass it an array of length 10, it will gladly write 100
- characters to that array and end up overwriting other data, causing a
- seg fault, or doing something else not very nice.
-
- You shouldn't use gets(), but you can do so, obviously. You would be
- better off replacing calls to it with fgets() or your own gets() that
- will correctly limit the input and not go overwriting other things.
-
- Be glad the warning is displayed when linking, instead of at run-time
- like it used to. That wasn't very nice. :)
- --
- + Jim Winstead Jr. (CSci '95)
- | Harvey Mudd College
- | jwinstea@jarthur.Claremont.EDU
- + This is all my words. Honest!
-