delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/28/08:18:15

Date: Sun, 28 Jun 1998 15:18:24 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "J. Walker" <snake AT phrozen DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Redefinition of functions ?
In-Reply-To: <359389BC.2E02@phrozen.com>
Message-ID: <Pine.SUN.3.91.980628151343.9146C-100000@is>
MIME-Version: 1.0

On Fri, 26 Jun 1998, J. Walker wrote:

> I needed to rewrite bodies of some functions of standard c-library.
> I was successful with redefinition of f.E. some stdio functions but I 
> needed to rewrite function 'textmode'(conio module) with my own and
> got error message 'Multiple definition of function textmode'.

In the DJGPP libc, all conio functions are defined on the same source 
module.  So, if you want to redefine some of them, you need to redefine 
all of them, or else the linker will be unhappy.

A practical way to do so would be to download v2/djlsr201.zip from your 
nearest DJGPP site, extract the file conio.c from there, include it in 
your project and edit it as you see fit.

If you can find a way to improve the functions there, please consider 
posting your patches here, so that they could be included in future 
versions of DJGPP.

> I tried to do the same with Borland C++ 3.1 and all was ok.

Different compilers have different organizations of their libraries.  One 
thing you surely can NOT do with BC is to freely hack the library sources.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019