Skip to content

Commit 4de0b05

Browse files
ccawley2011madler
authored andcommitted
Improve portability to RISC OS.
1 parent 9f0f2d4 commit 4de0b05

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

README

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ Notes for some targets:
6969
- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
7070
other compilers. Use "make test" to check your compiler.
7171

72-
- gzdopen is not supported on RISCOS or BEOS.
73-
7472
- For PalmOs, see http://palmzlib.sourceforge.net/
7573

7674

old/Makefile.riscos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# test works out-of-the-box, installs `somewhere' on demand
44

55
# Toolflags:
6-
CCflags = -c -depend !Depend -IC: -g -throwback -DRISCOS -fah
6+
CCflags = -c -depend !Depend -IC: -g -throwback -fah
77
C++flags = -c -depend !Depend -IC: -throwback
88
Linkflags = -aif -c++ -o $@
99
ObjAsmflags = -throwback -NoCache -depend !Depend

test/example.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
# include <stdlib.h>
1414
#endif
1515

16-
#if defined(VMS) || defined(RISCOS)
16+
#if defined(VMS)
1717
# define TESTFILE "foo-gz"
18+
#elif defined(__riscos) && !defined(__TARGET_UNIXLIB__)
19+
# define TESTFILE "foo/gz"
1820
#else
1921
# define TESTFILE "foo.gz"
2022
#endif

test/minigzip.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@
4848
# define unlink delete
4949
# define GZ_SUFFIX "-gz"
5050
#endif
51-
#ifdef RISCOS
52-
# define unlink remove
53-
# define GZ_SUFFIX "-gz"
54-
# define fileno(file) file->__file
51+
#if defined(__riscos) && !defined(__TARGET_UNIXLIB__)
52+
# define GZ_SUFFIX "/gz"
53+
# ifndef __GNUC__
54+
# define unlink remove
55+
# define fileno(file) file->__file
56+
# endif
5557
#endif
5658
#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
5759
# include <unix.h> /* for fileno */

zutil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
141141
# define OS_CODE 7
142142
#endif
143143

144-
#ifdef __acorn
144+
#if defined(__acorn) || defined(__riscos)
145145
# define OS_CODE 13
146146
#endif
147147

0 commit comments

Comments
 (0)