Skip to content

Commit

Permalink
Improve portability to RISC OS.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccawley2011 authored and madler committed Jan 23, 2024
1 parent 9f0f2d4 commit 4de0b05
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 0 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ Notes for some targets:
- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
other compilers. Use "make test" to check your compiler.

- gzdopen is not supported on RISCOS or BEOS.

- For PalmOs, see http://palmzlib.sourceforge.net/


Expand Down
2 changes: 1 addition & 1 deletion old/Makefile.riscos
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# test works out-of-the-box, installs `somewhere' on demand

# Toolflags:
CCflags = -c -depend !Depend -IC: -g -throwback -DRISCOS -fah
CCflags = -c -depend !Depend -IC: -g -throwback -fah
C++flags = -c -depend !Depend -IC: -throwback
Linkflags = -aif -c++ -o $@
ObjAsmflags = -throwback -NoCache -depend !Depend
Expand Down
4 changes: 3 additions & 1 deletion test/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# include <stdlib.h>
#endif

#if defined(VMS) || defined(RISCOS)
#if defined(VMS)
# define TESTFILE "foo-gz"
#elif defined(__riscos) && !defined(__TARGET_UNIXLIB__)
# define TESTFILE "foo/gz"
#else
# define TESTFILE "foo.gz"
#endif
Expand Down
10 changes: 6 additions & 4 deletions test/minigzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@
# define unlink delete
# define GZ_SUFFIX "-gz"
#endif
#ifdef RISCOS
# define unlink remove
# define GZ_SUFFIX "-gz"
# define fileno(file) file->__file
#if defined(__riscos) && !defined(__TARGET_UNIXLIB__)
# define GZ_SUFFIX "/gz"
# ifndef __GNUC__
# define unlink remove
# define fileno(file) file->__file
# endif
#endif
#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
# include <unix.h> /* for fileno */
Expand Down
2 changes: 1 addition & 1 deletion zutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define OS_CODE 7
#endif

#ifdef __acorn
#if defined(__acorn) || defined(__riscos)
# define OS_CODE 13
#endif

Expand Down

0 comments on commit 4de0b05

Please sign in to comment.