]> git.saurik.com Git - apt.git/blob - COMPILING
HP-UX fixes
[apt.git] / COMPILING
1 General Information
2 ~~~~~~~~~~~~~~~~~~~
3 To compile this you need a couple things
4 - A working POSIX system with working POSIX gcc, g++, make (GNU),
5 ar, sh, awk and sed in the path
6 - GNU Make 3.74 or so, -- normal UNIX make will NOT work
7 * Note 3.77 is broken.
8 - A working ANSI C++ compiler, this is not g++ 2.7.*
9 g++ 2.8 works OK and newer egcs work well also. Nobody has tried it
10 on other compilers :< You will need a properly working STL as well.
11 - A C library with the usual POSIX functions and a BSD socket layer.
12 If you OS conforms to the Single User Spec then you are fine:
13 http://www.opengroup.org/onlinepubs/7908799/index.html
14
15 Guidelines
16 ~~~~~~~~~~
17 I am not interested in making 'ultra portable code'. I will accept patches
18 to make the code that already exists conform more to SUS or POSIX, but
19 I don't really care if your not-SUS OS doesn't work. It is simply too
20 much work to maintain patches for dysfunctional OSs. I highly suggest you
21 contact your vendor and express intrest in a conforming C library.
22
23 That said, there are lots of finniky problems that must be delt with even
24 between the supported OS's. Primarily the path I choose to take is to put
25 a shim header file in build/include that transparently adds the required
26 functionality. Patches to make autoconf detect these cases and generate the
27 required shims are OK.
28
29 Current shims:
30 * C9x integer types 'inttypes.h'
31 * sys/statvfs.h to convert from BSD statfs to SUS statvfs
32 * rfc2553 hostname resolution (methods/rfc*), shims to normal gethostbyname.
33
34 The only completely non-shimed OS is Linux with glibc2.1
35
36 Platform Notes
37 ~~~~~~~~~~~~~~
38 Debian GNU Linux 2.1 'slink'
39 Debian GNU Linux 'potato'
40 * All Archs
41 - Works flawlessly
42 - You will want to have debiandoc-sgml and yodl installed to get
43 best results.
44 - No IPv6 Support in glibc's < 2.1
45
46 Sun Solaris
47 SunOS cab101 5.7 Generic_106541-04 sun4u sparc
48 - Works fine
49 - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution
50
51 HP-UX
52 HP-UX nyquist B.10.20 C 9000/780 2016574337 32-user license
53 - Evil OS, does not conform very well to SUS
54 1) snprintf exists but is not prototyped, ignore spurios warnings
55 2) No socklen_t
56 3) Requires -D_XOPEN_SOURCE_EXTENDED for h_errno
57 Items 2 and 3 have to be fixed by hand. Insert this into
58 build/include/netdb.h:
59
60 #define _XOPEN_SOURCE_EXTENDED
61 #define socklen_t size_t
62 #include_next <netdb.h>
63
64 A similar techinque can be used for snprintf/vsprintf if you dislike
65 the warnings
66 - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution
67