Groups | Search | Server Info | Login | Register
Groups > comp.os.os2.programmer.porting > #224
| Date | 2013-06-01 20:10 -0700 |
|---|---|
| From | Dave Yeo <dave.r.yeo@gmail.com> |
| Newsgroups | comp.os.os2.programmer.porting |
| Subject | Re: Problems building unzip 6.10b |
| References | <kodd9t$2fhs$1@adenine.netfront.net> |
| Message-ID | <51aab7c9$0$1639$c3e8da3$5d8fb80f@news.astraweb.com> (permalink) |
| Organization | Unlimited download news at news.astraweb.com |
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 <ctype.h> 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
Back to comp.os.os2.programmer.porting | Previous | Next — Previous in thread | Next in thread | Find similar
Problems building unzip 6.10b Lewis Rosenthal <lgrosenthal@2-de-sp-am-2rosenthals.com> - 2013-06-01 14:07 -0400
Re: Problems building unzip 6.10b Dave Yeo <dave.r.yeo@gmail.com> - 2013-06-01 12:07 -0700
Re: Problems building unzip 6.10b "Andy" <abwillis1@yahoo.com> - 2013-06-01 23:30 +0000
Re: Problems building unzip 6.10b Lewis Rosenthal <lgrosenthal@2-de-sp-am-2rosenthals.com> - 2013-06-01 22:12 -0400
Re: Problems building unzip 6.10b Lewis Rosenthal <lgrosenthal@2-de-sp-am-2rosenthals.com> - 2013-06-01 22:41 -0400
Re: Problems building unzip 6.10b Dave Yeo <dave.r.yeo@gmail.com> - 2013-06-01 20:12 -0700
Re: Problems building unzip 6.10b Dave Yeo <dave.r.yeo@gmail.com> - 2013-06-01 20:10 -0700
Re: Problems building unzip 6.10b Lewis Rosenthal <lgrosenthal@2-de-sp-am-2rosenthals.com> - 2013-06-03 22:28 -0400
Re: Problems building unzip 6.10b Lewis Rosenthal <lgrosenthal@2-de-sp-am-2rosenthals.com> - 2013-06-04 00:28 -0400
Re: Problems building unzip 6.10b Dave Yeo <dave.r.yeo@gmail.com> - 2013-06-03 23:28 -0700
Re: Problems building unzip 6.10b Dave Yeo <dave.r.yeo@gmail.com> - 2013-06-03 23:50 -0700
Re: Problems building unzip 6.10b Lewis Rosenthal <lgrosenthal@2-de-sp-am-2rosenthals.com> - 2013-06-04 13:21 -0400
Re: Problems building unzip 6.10b Dave Yeo <dave.r.yeo@gmail.com> - 2013-06-04 19:33 -0700
Re: Problems building unzip 6.10b Lewis Rosenthal <lgrosenthal@2-de-sp-am-2rosenthals.com> - 2013-06-05 01:18 -0400
Re: Problems building unzip 6.10b "Andy" <abwillis1@yahoo.com> - 2013-06-04 17:14 +0000
Re: Problems building unzip 6.10b Lewis Rosenthal <lgrosenthal@2-de-sp-am-2rosenthals.com> - 2013-06-04 13:23 -0400
Re: Problems building unzip 6.10b "Andy" <abwillis1@yahoo.com> - 2013-06-04 20:50 +0000
Re: Problems building unzip 6.10b Lewis Rosenthal <lgrosenthal@2-de-sp-am-2rosenthals.com> - 2013-06-04 17:12 -0400
csiph-web