Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!news.netfront.net!not-for-mail From: Lewis Rosenthal Newsgroups: comp.os.os2.programmer.porting Subject: Re: Problems building unzip 6.10b Date: Mon, 03 Jun 2013 22:28:11 -0400 Organization: Netfront http://www.netfront.net/ Lines: 152 Message-ID: References: <51aab7c9$0$1639$c3e8da3$5d8fb80f@news.astraweb.com> NNTP-Posting-Host: 173.71.210.58 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1370312894 4103 173.71.210.58 (4 Jun 2013 02:28:14 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Tue, 4 Jun 2013 02:28:14 +0000 (UTC) User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:10.0.12) Gecko/20130108 Firefox/10.0.12 SeaMonkey/2.7.2 In-Reply-To: <51aab7c9$0$1639$c3e8da3$5d8fb80f@news.astraweb.com> Xref: csiph.com comp.os.os2.programmer.porting:226 On 06/01/13 11:10 pm, Dave Yeo thus wrote : > Lewis Rosenthal wrote: >> Hi, guys... >> >> Prompted by Dave's mention in eCS-Technical (see >> http://tech.groups.yahoo.com/group/eCS-Technical/message/17592 et seq) >> and by http://mantis.smedley.id.au/view.php?id=549 , I decided to try to >> give building the latest Unzip a shot... >> >> I'm not making much headway. If I set aside all of the options I'd like >> to add, and from bash, just run: >> >> [Apollo|J:/devel/unzip610b]make -f os2/makefile.os2 gcc >> make -f os2/makefile.os2 all \ >> CC="gcc -Zomf -O -I." \ >> CFLAGS="-Wall -DOS2 -DASM_CRC " \ >> NFLAGS="" \ >> DLLFLAG="" \ >> AS="gcc -Zomf" \ >> ASFLAGS="-Di386" \ >> LDFLAGS="-o ./" \ >> LDFLAGS2="-Zsmall-conv -Zstack 320 -Zsys -s" \ >> OUT="-o" \ >> OBJ=".obj" \ >> CRCA_O="crc_gcc.obj" \ >> DEF="os2/unzip.def" >> make.exe[1]: Entering directory `J:/devel/unzip610b' >> gcc -Zomf -O -I. -c -Wall -DOS2 -DASM_CRC unzip.c >> In file included from unzpriv.h:637, >> from unzip.h:734, >> from unzip.c:69: >> /@unixroot/usr/include/ctype.h:42: error: expected declaration >> specifiers or '.. >> .' before '(' token >> /@unixroot/usr/include/ctype.h:45: error: expected declaration >> specifiers or '.. >> .' before '(' token >> make.exe[1]: *** [unzip.obj] Error 1 >> make.exe[1]: Leaving directory `J:/devel/unzip610b' >> make: *** [gcc] Error 2 >> >> The INSTALL file specifically states that for OS/2, makefile.os2 should >> remain in the os2 directory and be called with -f as I have above. >> >> I've actually had some recent successes in building things with gcc >> 4.4.6, so I think that my build system is relatively intact. >> >> I understand (I think) that the "expected declaration" errors shown are >> displayed as a result of -Wall, but looking at ctype.h, I don't >> understand what's so different about those two particular lines than the >> rest: >> >> [32] __BEGIN_DECLS >> [33] int isalnum(int); >> [34] int isalpha(int); >> [35] int iscntrl(int); >> [36] int isdigit(int); >> [37] int isgraph(int); >> [38] int islower(int); >> [39] int isprint(int); >> [40] int ispunct(int); >> [41] int isspace(int); >> [42] int isupper(int); >> [43] int isxdigit(int); >> [44] int toupper(int); >> [45] int tolower(int); >> >> So, what's it complaining about? Am I missing a locale specifier >> somewhere? >> > > Probably missing a locale, os2cfg.h redefines toupper and tolower > anyways so just wrap the #include with #ifndef __EMX__ #endif. > I also did, > --- makefile.os2.orig 2013-06-01 19:55:04.000000000 -0700 > +++ makefile.os2 2013-06-01 19:56:16.000000000 -0700 > @@ -394,9 +394,9 @@ > AS="gcc -Zomf" \ > ASFLAGS="-Di386" \ > LDFLAGS="-o ./" \ > - LDFLAGS2="-Zsmall-conv -Zstack 320 -Zsys -s" \ > + LDFLAGS2="-s" \ > OUT="-o" \ > - OBJ=".obj" \ > + OBJ=".o" \ > CRCA_O="crc_gcc.obj" \ > DEF="os2/unzip.def" > > and > > --- os2acl.c.orig 2013-06-01 19:57:08.000000000 -0700 > +++ os2acl.c 2013-06-01 19:59:42.000000000 -0700 > @@ -71,7 +71,7 @@ > typedef ULONG U_INT; > #ifdef __EMX__ > #define PSTR16 _far16ptr > -#define PTR16(x) _emx_32to16(x) > +#define PTR16(x) _libc_32to16(x) > #else /* other 32-bit */ > #define PSTR16 PCHAR16 > #define PTR16(x) ((PCHAR16)(x)) > @@ -123,7 +123,7 @@ > _THUNK_FLAT (pbBuffer); > _THUNK_SHORT (cbBuffer); > _THUNK_FLAT (pcbTotalAvail); > - _THUNK_CALLI (_emx_32to16(_NetAccessGetInfo))); > + _THUNK_CALLI (_libc_32to16(_NetAccessGetInfo))); > } > > USHORT NetAccessSetInfo(PSZ pszServer, PSZ pszResource, USHORT sLevel, > @@ -137,7 +137,7 @@ > _THUNK_FLAT (pbBuffer); > _THUNK_SHORT (cbBuffer); > _THUNK_SHORT (sParmNum); > - _THUNK_CALLI (_emx_32to16(_NetAccessSetInfo))); > + _THUNK_CALLI (_libc_32to16(_NetAccessSetInfo))); > } > > USHORT NetAccessAdd(PSZ pszServer, USHORT sLevel, > @@ -149,7 +149,7 @@ > _THUNK_SHORT (sLevel); > _THUNK_FLAT (pbBuffer); > _THUNK_SHORT (cbBuffer); > - _THUNK_CALLI (_emx_32to16(_NetAccessAdd))); > + _THUNK_CALLI (_libc_32to16(_NetAccessAdd))); > } > > #else /* other 32-bit */ > > Watch line wrap. > This succeeded compiling and quickly testing seems to work. Zip needs > similar patches and there are still warnings. Really the port needs to > be done over including adding bzip2 support, making sure large file > support is working and so on. > Dave > > Wow... Thanks, Dave! I'll giv ethis another shot (so much for getting to bed early tonight, I see). ;-) Much appreciated. -- Lewis ------------------------------------------------------------- Lewis G Rosenthal, CNA, CLP, CLE, CWTS Rosenthal & Rosenthal, LLC www.2rosenthals.com Need a managed Wi-Fi hotspot? www.hautspot.com visit my IT blog www.2rosenthals.net/wordpress ------------------------------------------------------------- --- news://freenews.netfront.net/ - complaints: news@netfront.net ---