From: Yamaha / XYZZ Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP-to-Borland Compatibility. Date: Thu, 21 Nov 1996 12:23:44 -0700 Organization: XYZZ Software Co. Lines: 33 Message-ID: <3294AC3F.794B@CS.ColoState.edu> References: <199611201954 DOT RAA03155 AT cosmos DOT hiway DOT gr> NNTP-Posting-Host: seurat.vis.colostate.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Panos Platon Tsapralis wrote: > While trying to recompile, using DJGPP, a program, that was originally > written in Borland-C++, along with some data-base & screen management > libraries, I encountered error messages that indicate that DJGPP lacks > functions like "ltoa" ( long-to-ascii ), "ultoa" ( unsigned-long-to-ascii > ), "MK_FP" ( unknown - could not find in the Borland manuals anything about > this function ), which admittedly are specific to the Borland's > implementation of C/C++. Well, MK_FP not only doesn't exist, but is totally pointless in DJGPP. Borland's compiler is a 16-bit Real mode compiler (well, the one I had was). DJGPP is a 32-bit Protected mode compiler. The differences are largely because of this. MK_FP in Borland C converts a 16bit pointer to a 32bit segment/offset pair. In DJGPP, the pointers are all 32-bit. You can access up to 4GB of memory with a pointer, if the memory protection allows it. (in borland C, it's only 64k of memory that you can access with a pointer) DJGPP does support a type of "far" pointers, though. Protected mode has "selectors" in the "segment" registers. If you use a "far" pointer, you can access memory outside of your regular 4GB area. ltoa should be replaced by itoa because DJGPP's regular integers are 32-bit, the same size as Borland's long integers. Anyway, read the FAQ for more/better information. -- Yamaha / XYZZ mailto:scriven AT CS DOT ColoState DOT edu mailto:scriven AT VIS DOT ColoState DOT edu http://www.vis.colostate.edu/~scriven/