diff options
author | Cameron Cawley <ccawley2011@gmail.com> | 2022-10-13 13:38:07 +0100 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2024-01-23 06:27:49 -0800 |
commit | 4de0b054a58bfee6974afabd831538dcedc23e22 (patch) | |
tree | 64c1e36f46ba13be738301c1c294dd2633cdabf2 | |
parent | 9f0f2d4f9f1f28be7e16d8bf3b4e9d4ada70aa9f (diff) | |
download | zlib-4de0b054a58bfee6974afabd831538dcedc23e22.tar.gz zlib-4de0b054a58bfee6974afabd831538dcedc23e22.tar.bz2 zlib-4de0b054a58bfee6974afabd831538dcedc23e22.zip |
Improve portability to RISC OS.
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | old/Makefile.riscos | 2 | ||||
-rw-r--r-- | test/example.c | 4 | ||||
-rw-r--r-- | test/minigzip.c | 10 | ||||
-rw-r--r-- | zutil.h | 2 |
5 files changed, 11 insertions, 9 deletions
@@ -69,8 +69,6 @@ Notes for some targets: | |||
69 | - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with | 69 | - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with |
70 | other compilers. Use "make test" to check your compiler. | 70 | other compilers. Use "make test" to check your compiler. |
71 | 71 | ||
72 | - gzdopen is not supported on RISCOS or BEOS. | ||
73 | |||
74 | - For PalmOs, see http://palmzlib.sourceforge.net/ | 72 | - For PalmOs, see http://palmzlib.sourceforge.net/ |
75 | 73 | ||
76 | 74 | ||
diff --git a/old/Makefile.riscos b/old/Makefile.riscos index 57e29d3..0f503ff 100644 --- a/old/Makefile.riscos +++ b/old/Makefile.riscos | |||
@@ -3,7 +3,7 @@ | |||
3 | # test works out-of-the-box, installs `somewhere' on demand | 3 | # test works out-of-the-box, installs `somewhere' on demand |
4 | 4 | ||
5 | # Toolflags: | 5 | # Toolflags: |
6 | CCflags = -c -depend !Depend -IC: -g -throwback -DRISCOS -fah | 6 | CCflags = -c -depend !Depend -IC: -g -throwback -fah |
7 | C++flags = -c -depend !Depend -IC: -throwback | 7 | C++flags = -c -depend !Depend -IC: -throwback |
8 | Linkflags = -aif -c++ -o $@ | 8 | Linkflags = -aif -c++ -o $@ |
9 | ObjAsmflags = -throwback -NoCache -depend !Depend | 9 | ObjAsmflags = -throwback -NoCache -depend !Depend |
diff --git a/test/example.c b/test/example.c index c3521dd..e9cb806 100644 --- a/test/example.c +++ b/test/example.c | |||
@@ -13,8 +13,10 @@ | |||
13 | # include <stdlib.h> | 13 | # include <stdlib.h> |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #if defined(VMS) || defined(RISCOS) | 16 | #if defined(VMS) |
17 | # define TESTFILE "foo-gz" | 17 | # define TESTFILE "foo-gz" |
18 | #elif defined(__riscos) && !defined(__TARGET_UNIXLIB__) | ||
19 | # define TESTFILE "foo/gz" | ||
18 | #else | 20 | #else |
19 | # define TESTFILE "foo.gz" | 21 | # define TESTFILE "foo.gz" |
20 | #endif | 22 | #endif |
diff --git a/test/minigzip.c b/test/minigzip.c index 134e10e..7c9eb79 100644 --- a/test/minigzip.c +++ b/test/minigzip.c | |||
@@ -48,10 +48,12 @@ | |||
48 | # define unlink delete | 48 | # define unlink delete |
49 | # define GZ_SUFFIX "-gz" | 49 | # define GZ_SUFFIX "-gz" |
50 | #endif | 50 | #endif |
51 | #ifdef RISCOS | 51 | #if defined(__riscos) && !defined(__TARGET_UNIXLIB__) |
52 | # define unlink remove | 52 | # define GZ_SUFFIX "/gz" |
53 | # define GZ_SUFFIX "-gz" | 53 | # ifndef __GNUC__ |
54 | # define fileno(file) file->__file | 54 | # define unlink remove |
55 | # define fileno(file) file->__file | ||
56 | # endif | ||
55 | #endif | 57 | #endif |
56 | #if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os | 58 | #if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os |
57 | # include <unix.h> /* for fileno */ | 59 | # include <unix.h> /* for fileno */ |
@@ -141,7 +141,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
141 | # define OS_CODE 7 | 141 | # define OS_CODE 7 |
142 | #endif | 142 | #endif |
143 | 143 | ||
144 | #ifdef __acorn | 144 | #if defined(__acorn) || defined(__riscos) |
145 | # define OS_CODE 13 | 145 | # define OS_CODE 13 |
146 | #endif | 146 | #endif |
147 | 147 | ||