Improve portability to RISC OS.

pull/920/merge
Cameron Cawley 2 years ago committed by Mark Adler
parent 9f0f2d4f9f
commit 4de0b054a5
  1. 2
      README
  2. 2
      old/Makefile.riscos
  3. 4
      test/example.c
  4. 10
      test/minigzip.c
  5. 2
      zutil.h

@ -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 - 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. other compilers. Use "make test" to check your compiler.
- gzdopen is not supported on RISCOS or BEOS.
- For PalmOs, see http://palmzlib.sourceforge.net/ - For PalmOs, see http://palmzlib.sourceforge.net/

@ -3,7 +3,7 @@
# test works out-of-the-box, installs `somewhere' on demand # test works out-of-the-box, installs `somewhere' on demand
# Toolflags: # 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 C++flags = -c -depend !Depend -IC: -throwback
Linkflags = -aif -c++ -o $@ Linkflags = -aif -c++ -o $@
ObjAsmflags = -throwback -NoCache -depend !Depend ObjAsmflags = -throwback -NoCache -depend !Depend

@ -13,8 +13,10 @@
# include <stdlib.h> # include <stdlib.h>
#endif #endif
#if defined(VMS) || defined(RISCOS) #if defined(VMS)
# define TESTFILE "foo-gz" # define TESTFILE "foo-gz"
#elif defined(__riscos) && !defined(__TARGET_UNIXLIB__)
# define TESTFILE "foo/gz"
#else #else
# define TESTFILE "foo.gz" # define TESTFILE "foo.gz"
#endif #endif

@ -48,10 +48,12 @@
# define unlink delete # define unlink delete
# define GZ_SUFFIX "-gz" # define GZ_SUFFIX "-gz"
#endif #endif
#ifdef RISCOS #if defined(__riscos) && !defined(__TARGET_UNIXLIB__)
# define unlink remove # define GZ_SUFFIX "/gz"
# define GZ_SUFFIX "-gz" # ifndef __GNUC__
# define fileno(file) file->__file # define unlink remove
# define fileno(file) file->__file
# endif
#endif #endif
#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os #if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
# include <unix.h> /* for fileno */ # include <unix.h> /* for fileno */

@ -141,7 +141,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define OS_CODE 7 # define OS_CODE 7
#endif #endif
#ifdef __acorn #if defined(__acorn) || defined(__riscos)
# define OS_CODE 13 # define OS_CODE 13
#endif #endif

Loading…
Cancel
Save