[patch] faster PM_GETRE
[p5sagit/p5-mst-13.2.git] / hints / qnx.sh
CommitLineData
ff68c719 1#----------------------------------------------------------------
2# QNX hints
3#
af23fe4d 4# These hints were written for QNX4, but are in the process
5# of being extended to encompass Neutrino as well.
6#
4f6a2eb2 7# As of perl5.004_04, all tests pass under:
8# QNX 4.23A
9# Watcom 10.6 with Beta/970211.wcc.update.tar.F
10# socket3r.lib Nov21 1996.
af23fe4d 11# perl-5.6.1 runs well on QNX4 with a few known test failures
12# perl-5.6.0 ships with QNX RTP (Neutrino) but the build is
13# not yet straightforward.
ff68c719 14#
15# As with many unix ports, this one depends on a few "standard"
af23fe4d 16# unix utilities which are not necessarily standard for QNX4.
ff68c719 17#
18# /bin/sh This is used heavily by Configure and then by
af23fe4d 19# perl itself. QNX4's version is fine, but Configure
ff68c719 20# will choke on the 16-bit version, so if you are
21# running QNX 4.22, link /bin/sh to /bin32/ksh
22# ar This is the standard unix library builder.
23# We use wlib. With Watcom 10.6, when wlib is
24# linked as "ar", it behaves like ar and all is
25# fine. Under 9.5, a cover is required. One is
26# included in ../qnx
27# nm This is used (optionally) by configure to list
28# the contents of libraries. I will generate
29# a cover function on the fly in the UU directory.
30# cpp Configure and perl need a way to invoke a C
31# preprocessor. I have created a simple cover
32# for cc which does the right thing. Without this,
022735b4 33# Configure will create its own wrapper which works,
ff68c719 34# but it doesn't handle some of the command line arguments
35# that perl will throw at it.
36# make You really need GNU make to compile this. GNU make
37# ships by default with QNX 4.23, but you can get it
38# from quics for earlier versions.
39#----------------------------------------------------------------
af23fe4d 40# Outstanding Issues for QNX4:
41# There is no support for dynamically linked libraries in
42# QNX4.
43#
44# ext/Cwd/Cwd.t will complain if `pwd` and cwd don't give
45# the same results. cwd calls `fullpath -t`, so if you
46# cd `fullpath -t` before running the test, it will
47# pass.
48#
49# lib/File/Find/taint.t will complain if '.' is in your
50# PATH. The PATH test is triggered because cwd calls
51# `fullpath -t`.
52#
a181ddb7 53# ext/IO/lib/IO/t/io_sock.t: Subtest 14 is skipped due to
54# the fact that the functionality to read back the non-blocking
55# status of a socket is not implemented in QNX's TCP/IP. This
56# has been reported to QNX and it may work with later versions
57# of TCP/IP.
af23fe4d 58#
59# Older issues:
60# lib/posix.t test failed on test 17 because acos(1) != 0.
4f6a2eb2 61# Resolved in 970211 Beta
ff68c719 62# lib/io_udp.t test hangs because of a bug in getsockname().
63# Fixed in latest BETA socket3r.lib
ff68c719 64#----------------------------------------------------------------
65# These hints were submitted by:
66# Norton T. Allen
67# Harvard University Atmospheric Research Project
68# allen@huarp.harvard.edu
69#
70# If you have suggestions or changes, please let me know.
71#----------------------------------------------------------------
72
4f6a2eb2 73echo ""
74echo "Some tests may fail. Please read the hints/qnx.sh file."
75echo ""
76
ff68c719 77#----------------------------------------------------------------
af23fe4d 78# At present, all QNX4 systems are equivalent architectures,
7fbf1995 79# so it is reasonable to call archname=x86-qnx rather than
80# making an unnecessary distinction between AT-qnx and PCI-qnx,
af23fe4d 81# for example. I will use uname's architecture for Neutrino.
82#----------------------------------------------------------------
83set X `uname -a`
84shift
85[ "$1" != "QNX" ] && echo "uname doesn't look like QNX!"
86case $4 in
87 42[2-9]) archname='x86-qnx';;
88 *) osname='nto'
89 osvers=$3
90 archname="$5-nto";;
91esac
7fbf1995 92
af23fe4d 93if [ "$osname" = "qnx" ]; then
94 #----------------------------------------------------------------
95 # QNX doesn't come with a csh and the ports of tcsh I've used
96 # don't work reliably:
97 #----------------------------------------------------------------
98 csh=''
99 d_csh='undef'
100 full_csh=''
ff68c719 101
af23fe4d 102 #----------------------------------------------------------------
103 # setuid scripts are secure under QNX.
104 # (Basically, the same race conditions apply, but assuming
105 # the scripts are located in a secure directory, the methods
106 # for exploiting the race condition are defeated because
107 # the loader expands the script name fully before executing
108 # the interpreter.)
109 #----------------------------------------------------------------
110 d_suidsafe='define'
4f6a2eb2 111
af23fe4d 112 #----------------------------------------------------------------
113 # difftime is implemented as a preprocessor macro, so it doesn't show
114 # up in the libraries:
115 #----------------------------------------------------------------
116 d_difftime='define'
ff68c719 117
af23fe4d 118 #----------------------------------------------------------------
119 # strtod is in the math library, but we can't tell Configure
120 # about the math library or it will confuse the linker
121 #----------------------------------------------------------------
122 d_strtod='define'
ff68c719 123
af23fe4d 124 lib_ext='3r.lib'
125 libc='/usr/lib/clib3r.lib'
ff68c719 126
af23fe4d 127 #----------------------------------------------------------------
128 # ccflags:
129 # I like to turn the warnings up high, but a few common
130 # constructs make a lot of noise, so I turn those warnings off.
131 # A few still remain...
132 #
133 # unix.h is required as a general rule for unixy applications.
134 #----------------------------------------------------------------
135 ccflags='-mf -w4 -Wc,-wcd=202 -Wc,-wcd=203 -Wc,-wcd=302 -Wc,-fi=unix.h'
ff68c719 136
af23fe4d 137 #----------------------------------------------------------------
138 # ldflags:
139 # If you want debugging information, you must specify -g on the
140 # link as well as the compile. If optimize != -g, you should
141 # remove this.
142 #----------------------------------------------------------------
143 ldflags="-g -N1M"
ff68c719 144
af23fe4d 145 so='none'
146 selecttype='fd_set *'
ff68c719 147
af23fe4d 148 #----------------------------------------------------------------
149 # Add -lunix to list of libs. This is needed mainly so the nm
150 # search will find funcs in the unix lib. Including unix.h should
151 # automatically include the library without -l.
152 #----------------------------------------------------------------
153 libswanted="$libswanted unix"
ff68c719 154
af23fe4d 155 if [ -z "`which ar 2>/dev/null`" ]; then
156 cat <<-'EOF' >&4
157 I don't see an 'ar', so I'm guessing you are running
158 Watcom 9.5 or earlier. You may want to install the ar
159 cover found in the qnx subdirectory of this distribution.
160 It might reasonably be placed in /usr/local/bin.
ff68c719 161
162 EOF
af23fe4d 163 fi
164 #----------------------------------------------------------------
165 # Here is a nm script which fixes up wlib's output to look
166 # something like nm's, at least enough so that Configure can
167 # use it.
168 #----------------------------------------------------------------
169 if [ -z "`which nm 2>/dev/null`" ]; then
170 cat <<-EOF
171 Creating a quick-and-dirty nm cover for Configure to use:
ff68c719 172
173 EOF
af23fe4d 174 cat >./UU/nm <<-'EOF'
175 #! /bin/sh
176 #__USAGE
177 #%C <lib> [<lib> ...]
178 # Designed to mimic Unix's nm utility to list
179 # defined symbols in a library
180 unset WLIB
181 for i in $*; do wlib $i; done |
182 awk '
183 /^ / {
184 for (i = 1; i <= NF; i++) {
185 sub("_$", "", $i)
186 print "000000 T " $i
187 }
188 }'
ff68c719 189 EOF
af23fe4d 190 chmod +x ./UU/nm
191 fi
ff68c719 192
af23fe4d 193 cppstdin=`which cpp 2>/dev/null`
194 if [ -n "$cppstdin" ]; then
195 cat <<-EOF >&4
196 I found a cpp at $cppstdin and will assume it is a good
197 thing to use. If this proves to be false, there is a
198 thin cover for cpp in the qnx subdirectory of this
199 distribution which you could move into your path.
ff68c719 200 EOF
af23fe4d 201 cpprun="$cppstdin"
202 else
203 cat <<-EOF >&4
ff68c719 204
af23fe4d 205 There is a cpp cover in the qnx subdirectory of this
206 distribution which works a little better than the
207 Configure default. You may wish to copy it to
208 /usr/local/bin or some other suitable location.
ff68c719 209 EOF
af23fe4d 210 fi
211fi