Date: Sun, 16 May 1999 13:36:11 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Richard Dawe cc: djgpp-workers AT delorie DOT com Subject: Re: $HOSTNAME doesn't override library code In-Reply-To: <373B3EFD.93C37956@bigfoot.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 13 May 1999, Richard Dawe wrote: > Which order are the libraries linked by gcc? i.e. if I do: > > gcc -o wotsit wotsit.c -lsocket > > does libc get linked before/after libsocket? If the latter is true then I > will make libsocket override libc's gethostname(). The linker scans the libraries in the order they are mentioned on the link command line, and GCC appends "-lc -lgcc -lc" at the end (try "gcc -v" and you will see it). This is so exactly because user libraries can override standard definitions. > What is the position on placing network-enabled versions of the relevant > utilities on Simtelnet? If they work without problems when no Winsock is available, I don't see any reason not to build the ports with libsocket.