From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Reducing file size - again Date: Sun, 15 Dec 1996 05:07:07 -0800 Organization: Three pounds of chaos and a pinch of salt Lines: 38 Message-ID: <32B3F7FB.2F84@cs.com> References: <19961215025015 DOT AAC15442 AT max5-41 DOT ghg DOT net> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp107.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "Rodney L. Bachtel" DJ-Gateway: from newsgroup comp.os.msdos.djgpp Rodney L. Bachtel wrote: > > Eli, I don't have the most current version of the FAQ, so if this is > their I apologize, but if not could you please mention that if you > want to zap out __crt0_glob_function, that it needs to be defined as > 'int' and that it needs to return 0? This was confusing, at least to > me, and I _thought_ I did a pretty deep perusal of info and the FAQ > (probably not deep enough, tho ;). Actually, according to "info libc alpha __crt0_glob_function", it must be declared as char**. Of course, a regular int will work as well, but it is a good idea to always define such functions to be exact duplicates of their library equivalents, just to be safe. For example, when I don't care about or wish to disable globbing, I use this definition: /* disable command-line globbing */ char **__crt0_glob_function( char *_argument ) { return NULL; } This is 100% guaranteed to work, unless the libc definition itself changes. The key thing is that your function, no matter what you define it as, must return a zero, or the startup code will go haywire. This, to me, is clearly explained by the libc reference, and the FAQ clearly states to look up the libc reference for more information. Seems simple enough to me... Oh, and I believe that the section that mentions the crt0 functions has not been changed since the original v2 FAQ. Of course, you should always make sure to have the newest version. ;) -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Descent 2: The Infinite Abyss - The greatest Internet game of all | | time just got better! This time, you're going all the way down...| ---------------------------------------------------------------------