ocrad_0_10_old_gcc_or_no_getopt.patch.gz
The above patch makes it possible to compile ocrad version 0.10
on a system with an older version of the gcc-compiler (e.g. 2.96)
or a system that lacks gnu getopts. It also compiles with Sun's
CC compiler.
defs.h
is included after inclusion of
system headers. It undefines some macros for isalpha etc. and also
checks for non-gcc compilers and avoids __attrib__((noreturn))
std::vector
.
HAVE_GETOPT_H
in the file main.cc
.
The help doesn't reflect that the long options do not work.
bzcat ocrad-0.10.tar.bz2 | tar -xvf -
gunzip -c ocrad_0_10_old_gcc_or_no_getopt.patch.gz | patch -p0
The following table contains the systems on which ocrad-0.10 with the
patches has been succesfully compiled. The ones marked with an asterisk
have also been verified to produce the same output as the original
with a rather large input file supplied to ocrad -l 2
* | Darwin 7.7.0 | ppc | gcc version 3.3 20030304 (Apple Computer, Inc. build 1666) |
FreeBSD 4.4-RELEASE | i386 | gcc version 2.95.3 20010315 (release) [FreeBSD] | |
* | FreeBSD 4.9-RELEASE | i386 | gcc version 2.95.4 20020320 [FreeBSD] |
* | Linux 2.4.20-18.7.rh73.isab1smp | i686 | gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113) |
* | Linux 2.4.20-35.9.legacysmp | i686 | gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) |
* | Linux 2.4.22-10mdk | i686 | gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk) |
* | Linux 2.6.9 | i686 | gcc version 3.3.5 (Debian 1:3.3.5-5) |
* | Linux 2.6.8.1 | alpha | gcc version 3.3.4 (Debian 1:3.3.4-13) |
* | NetBSD 2.0 | i386 | gcc version 3.3.3 (NetBSD nb3 20040520) |
OpenBSD 2.9 | i386 | gcc version 2.95.3 20010125 (prerelease) | |
* | OpenBSD 3.3 | sparc | gcc version 2.95.3 20010125 (prerelease, propolice) |
* | SunOS 5.9 (Solaris) | i386 | gcc version 3.4.1 |
* | SunOS 5.9 (Solaris) | sparc | gcc version 3.4.1 |
* | SunOS 5.9 (Solaris) | sparc | CC: Sun WorkShop 6 update 2 C++ 5.3 2001/05/15 |