delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/06/17/21:30:26

From: Doug Kaufman <dkaufman AT rahul DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Makefile Help
Date: Wed, 18 Jun 2003 01:28:19 +0000 (UTC)
Organization: a2i network
Lines: 41
Message-ID: <bcof7j$cdj$1@blue.rahul.net>
References: <200306171019 DOT MAA19703 AT acp3bf DOT physik DOT rwth-aachen DOT de>
NNTP-Posting-Host: violet.rahul.net
X-Trace: blue.rahul.net 1055899699 12723 66.237.72.28 (18 Jun 2003 01:28:19 GMT)
X-Complaints-To: support AT rahul DOT net
NNTP-Posting-Date: Wed, 18 Jun 2003 01:28:19 +0000 (UTC)
User-Agent: nn/6.6.4
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> writes:

>In article <bcm2d0$6c6$1 AT blue DOT rahul DOT net> you wrote:
>> --- filefn.cpp.ori	2003-05-15 01:37:58.000000000 -0700
>> +++ filefn.cpp	2003-06-16 20:03:28.000000000 -0700
>> @@ -173,6 +173,7 @@
>>    return(1457664);
>>  #elif defined(_EMX)
>>    int Drive=(!isalpha(FileName[0]) || FileName[1]!=':') ? 0:toupper(FileName[0])-'A'+1;
>> +#ifndef _DJGPP
>>    if (_osmode == OS2_MODE)
>>    {
>>      FSALLOCATE fsa;

>This change looks like a red herring, to me.  this is inside an #if
>defined(_EMX) block, already, so DJGPP will never be defined.  Or
>rather: if it were, something else, elsewhere in the source, is badly
>mixed up.

This wouldn't have been my choice of how to write the code, but the
unrar source code is set up so that if __DJGPP__ is defined, it defines
_EMX and _DJGPP. Thus you need to exclude any areas that work for DJGPP
but not for EMX. See the unrar file "raros.hpp". To really fix this, you
would probably remove the definition of _EMX for the DJGPP platform,
then look at every instance of #ifdef _EMX and see if it is appropriate
for DJGPP also.

>And while at it: the source sould always test for actual predefined
>platform macros, like __DJGPP__, not self-defined ones like _DJGPP,
>which it is forbidden to define on its own by the C standard.

I agree, but this is throughout the unrar source code. Do a grep on
the files in the distributed source. My patch was just to fix obvious
problems so that it would compile and work. Changing the coding style of
the entire program is something I haven't tried to tackle. The package
is available at: "http://www.rarlab.com/rar/unrarsrc-3.2.2.tar.gz".
                             Doug

-- 
Doug Kaufman
Internet: dkaufman AT rahul DOT net

- Raw text -


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