6 The RISC OS command-line does not allow the direct creation of the version.h
7 file in the proper manner. To remedy this in such a way that the version
8 header is made at compiletime, I wrote this small program. It is fully
9 portable, so should work quite happily for any other platform that might need
14 Needed getopt.c from the port folder, then compiled and worked fine.
22 The symbol _MIPS_SZLONG, if not defined, causes a compiler error. Fixed by
23 ensuring it does exist. This looks to me like this wouldn't be an
24 Acorn-specific problem. The new code fragment is as follows:
27 #define _MIPS_SZLONG 32
29 #if defined(__alpha) || _MIPS_SZLONG == 64
38 #if !defined(__MWERKS__) && !defined(THINK_C)
39 #include <sys/types.h>
42 Acorn also doesn't have this header so:
44 #if !defined(__MWERKS__) && !defined(THINK_C) && !defined(__acorn)
45 #include <sys/types.h>
57 This seems to indicate that fcntl.h is included on all systems except
58 VMS. Odd, because I've never heard of it before. Sure it's in the ANSI
59 definition? Anyway, following change:
70 This will probably change when I find out what it wants from fcntl.h!
74 #if defined(__MWERKS__) || defined(THINK_C) || defined(applec)
79 Added RISC OS to above thus:
81 #if defined(__MWERKS__) || defined(THINK_C) || defined(applec) || defined(__acorn)
89 * The library uses the ANSI C/POSIX SEEK_*
90 * definitions that should be defined in unistd.h
91 * (except on VMS where they are in stdio.h and
92 * there is no unistd.h).
95 #if !defined(VMS) && !defined (applec) && !defined(THINK_C) && !defined(__MWERKS__)
99 RISC OS is like VMS and Mac in this regard. So changed to:
102 * The library uses the ANSI C/POSIX SEEK_*
103 * definitions that should be defined in unistd.h
104 * (except on VMS or the Mac or RISC OS, where they are in stdio.h and
105 * there is no unistd.h).
108 #if !defined(VMS) && !defined (applec) && !defined(THINK_C) && !defined(__MWERKS__) && !defined(__acorn)
115 NB: HAVE_IEEEFP is defined in tiffconf.h, not tiffcomp.h as mentioned
116 in libtiff.README. (Note written on original port from 3.4beta004)
118 Acorn C/C++ claims to accord with IEEE 754, so no change (yet) to
123 Unsure about whether this compiler supports inline functions. Will
124 leave it on for the time being and see if it works! (Likely if
125 everything else does.)
127 ... Seems to be OK ...
134 * osfcn.h is part of C++Lib on Acorn C/C++, and as such can't be used
135 * on C alone. For that reason, the relevant functions have been
136 * implemented by myself in tif_acorn.c, and the elements from the header
149 #define O_CREAT 0x200
150 #define O_TRUNC 0x400
152 extern int open(const char *name, int flags, int mode);
153 extern int close(int fd);
154 extern int write(int fd, const char *buf, int nbytes);
155 extern int read(int fd, char *buf, int nbytes);
156 extern off_t lseek(int fd, off_t offset, int whence);
161 ===============================================================================
166 Created file tif_acorn.c, copied initially from tif_unix.c
168 Documented internally where necessary.
170 Note that I have implemented the low-level file-handling functions normally
171 found in osfcn.h in here, and put the header info at the bottom of
172 tiffcomp.h. This is further documented from a RISC OS perspective inside the
175 ===============================================================================