1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
|
RISC OS Conversion log
======================
mkversion.c
~~~~~~~~~~~
The RISC OS command-line does not allow the direct creation of the version.h
file in the proper manner. To remedy this in such a way that the version
header is made at compiletime, I wrote this small program. It is fully
portable, so should work quite happily for any other platform that might need
it.
msg3states.c
~~~~~~~~~~~~
Needed getopt.c from the port folder, then compiled and worked fine.
tiff.h
~~~~~~
====1====
The symbol _MIPS_SZLONG, if not defined, causes a compiler error. Fixed by
ensuring it does exist. This looks to me like this wouldn't be an
Acorn-specific problem. The new code fragment is as follows:
#ifndef _MIPS_SZLONG
#define _MIPS_SZLONG 32
#endif
#if defined(__alpha) || _MIPS_SZLONG == 64
tiffcomp.h
~~~~~~~~~~
====1====
#if !defined(__MWERKS__) && !defined(THINK_C)
#include <sys/types.h>
#endif
Acorn also doesn't have this header so:
#if !defined(__MWERKS__) && !defined(THINK_C) && !defined(__acorn)
#include <sys/types.h>
#endif
====2====
#ifdef VMS
#include <file.h>
#include <unixio.h>
#else
#include <fcntl.h>
#endif
This seems to indicate that fcntl.h is included on all systems except
VMS. Odd, because I've never heard of it before. Sure it's in the ANSI
definition? Anyway, following change:
#ifdef VMS
#include <file.h>
#include <unixio.h>
#else
#ifndef __acorn
#include <fcntl.h>
#endif
#endif
This will probably change when I find out what it wants from fcntl.h!
====3====
#if defined(__MWERKS__) || defined(THINK_C) || defined(applec)
#include <stdlib.h>
#define BSDTYPES
#endif
Added RISC OS to above thus:
#if defined(__MWERKS__) || defined(THINK_C) || defined(applec) || defined(__acorn)
#include <stdlib.h>
#define BSDTYPES
#endif
====4====
/*
* The library uses the ANSI C/POSIX SEEK_*
* definitions that should be defined in unistd.h
* (except on VMS where they are in stdio.h and
* there is no unistd.h).
*/
#ifndef SEEK_SET
#if !defined(VMS) && !defined (applec) && !defined(THINK_C) && !defined(__MWERKS__)
#include <unistd.h>
#endif
RISC OS is like VMS and Mac in this regard. So changed to:
/*
* The library uses the ANSI C/POSIX SEEK_*
* definitions that should be defined in unistd.h
* (except on VMS or the Mac or RISC OS, where they are in stdio.h and
* there is no unistd.h).
*/
#ifndef SEEK_SET
#if !defined(VMS) && !defined (applec) && !defined(THINK_C) && !defined(__MWERKS__) && !defined(__acorn)
#include <unistd.h>
#endif
#endif
====5====
NB: HAVE_IEEEFP is defined in tiffconf.h, not tiffcomp.h as mentioned
in libtiff.README. (Note written on original port from 3.4beta004)
Acorn C/C++ claims to accord with IEEE 754, so no change (yet) to
tiffconf.h.
====6====
Unsure about whether this compiler supports inline functions. Will
leave it on for the time being and see if it works! (Likely if
everything else does.)
... Seems to be OK ...
====7====
Added to the end:
/*
* osfcn.h is part of C++Lib on Acorn C/C++, and as such can't be used
* on C alone. For that reason, the relevant functions have been
* implemented by myself in tif_acorn.c, and the elements from the header
* included here.
*/
#ifdef __acorn
#ifdef __cplusplus
#include <osfcn.h>
#else
#include "kernel.h"
#define O_RDONLY 0
#define O_WRONLY 1
#define O_RDWR 2
#define O_APPEND 8
#define O_CREAT 0x200
#define O_TRUNC 0x400
typedef long off_t;
extern int open(const char *name, int flags, int mode);
extern int close(int fd);
extern int write(int fd, const char *buf, int nbytes);
extern int read(int fd, char *buf, int nbytes);
extern off_t lseek(int fd, off_t offset, int whence);
#endif
#endif
===============================================================================
tif_acorn.c
~~~~~~~~~~~
Created file tif_acorn.c, copied initially from tif_unix.c
Documented internally where necessary.
Note that I have implemented the low-level file-handling functions normally
found in osfcn.h in here, and put the header info at the bottom of
tiffcomp.h. This is further documented from a RISC OS perspective inside the
file.
===============================================================================
|