3 # fixinc.svr4 -- Install modified versions of certain ANSI-incompatible
4 # native System V Release 4 system include files.
6 # Written by Ron Guilmette (rfg@ncd.com).
8 # This file is part of GNU CC.
10 # GNU CC is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2, or (at your option)
15 # GNU CC is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with GNU CC; see the file COPYING. If not, write to
22 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 # This script munges the native include files provided with System V
25 # Release 4 systems so as to remove things which are violations of the
26 # ANSI C standard. Once munged, the resulting new system include files
27 # are placed in a directory that GNU C will search *before* searching
28 # the /usr/include directory. This script should work properly for most
29 # System V Release 4 systems. For other types of systems, you should
30 # use the `fixincludes' script instead.
32 # See README-fixinc for more information.
34 # Directory containing the original header files.
35 INPUT
=${2-${INPUT-/usr/include}}
37 # Fail if no arg to specify a directory for the output.
39 then echo fixincludes
: no output directory specified
43 # Directory in which to store the results.
44 LIB
=${1?"fixincludes: output directory not specified"}
46 # Make sure it exists.
47 if [ ! -d $LIB ]; then
53 # Make LIB absolute if it is relative.
54 # Don't do this if not necessary, since may screw up automounters.
63 echo 'Building fixincludes in ' ${LIB}
65 # Determine whether this filesystem has symbolic links.
66 if ln -s X
$LIB/ShouldNotExist
2>/dev
/null
; then
67 rm -f $LIB/ShouldNotExist
73 echo 'Making directories:'
76 files
=`ls -LR | sed -n s/:$//p`
78 files
=`find . -type d -print | sed '/^.$/d'`
80 for file in $files; do
82 if [ ! -d $LIB/$file ]
87 # treetops gets an alternating list
88 # of old directories to copy
89 # and the new directories to copy to.
90 treetops
="${INPUT} ${LIB}"
93 echo 'Making internal symbolic directory links'
94 for file in $files; do
95 dest
=`ls -ld $file | sed -n 's/.*-> //p'`
98 # In case $dest is relative, get to $file's dir first.
100 cd `echo ./$file | sed -n 's&[^/]*$&&p'`
101 # Check that the target directory exists.
102 # Redirections changed to avoid bug in sh on Ultrix.
103 (cd $dest) > /dev
/null
2>&1
106 # X gets the dir that the link actually leads to.
108 # If link leads back into ${INPUT},
109 # make a similar link here.
110 if expr $x : "${INPUT}/.*" > /dev
/null
; then
111 # Y gets the actual target dir name, relative to ${INPUT}.
112 y
=`echo $x | sed -n "s&${INPUT}/&&p"`
113 # DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}.
115 sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
116 echo $file '->' $dots$y ': Making link'
117 rm -fr ${LIB}/$file > /dev
/null
2>&1
118 ln -s $dots$y ${LIB}/$file > /dev
/null
2>&1
120 # If the link is to outside ${INPUT},
121 # treat this directory as if it actually contained the files.
122 # This line used to have $dest instead of $x.
123 # $dest seemed to be wrong for links found in subdirectories
124 # of ${INPUT}. Does this change break anything?
125 treetops
="$treetops $x ${LIB}/$file"
134 while [ $# != 0 ]; do
135 # $1 is an old directory to copy, and $2 is the new directory to copy to.
136 echo "Finding header files in $1:"
139 files
=`find . -name '*.h' -type f -print`
140 echo 'Checking header files:'
141 for file in $files; do
142 if [ -r $file ]; then
143 cp $file $2/$file >/dev
/null
2>&1 ||
echo "Can't copy $file"
147 # The following have been removed from the sed command below
148 # because it is more useful to leave these things in.
149 # The only reason to remove them was for -pedantic,
150 # which isn't much of a reason. -- rms.
153 # This code makes Solaris SCSI fail, because it changes the
154 # alignment within some critical structures. See <sys/scsi/impl/commands.h>.
155 # s/u_char\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/
156 # Disable these also, since they probably aren't safe either.
157 # s/u_short\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/
158 # s/ushort\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/
159 # s/evcm_t\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/
160 # s/Pbyte\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*SEQSIZ\)/unsigned int\1/
162 # The change of u_char, etc, to u_int
163 # applies to bit fields.
165 s%^\([ ]*#[ ]*else\)[ ]*/[^*].*%\1%
166 s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%
167 s%^\([ ]*#[ ]*endif\)[ ]*/[^*].*%\1%
168 s%^\([ ]*#[ ]*endif\)[ ]*[^/ ].*%\1%
169 s/#lint(on)/defined(lint)/g
170 s/#lint(off)/!defined(lint)/g
171 s/#machine(\([^)]*\))/defined(__\1__)/g
172 s/#system(\([^)]*\))/defined(__\1__)/g
173 s/#cpu(\([^)]*\))/defined(__\1__)/g
174 /#[a-z]*if.*[ (]m68k/ s/\([^_]\)m68k/\1__m68k__/g
175 /#[a-z]*if.*[ (]__i386\([^_]\)/ s/__i386/__i386__/g
176 /#[a-z]*if.*[ (]i386/ s/\([^_]\)i386/\1__i386__/g
177 /#[a-z]*if.*[ (]sparc/ s/\([^_]\)sparc/\1__sparc__/g
178 /#[a-z]*if.*[ (]mc68000/ s/\([^_]\)mc68000/\1__mc68000__/g
179 /#[a-z]*if.*[ (]vax/ s/\([^_]\)vax/\1__vax__/g
180 /#[a-z]*if.*[ (]sun/ s/\([^_]\)\(sun[a-z0-9]*\)\([^a-z0-9_]\)/\1__\2__\3/g
181 /#[a-z]*if.*[ (]sun/ s/\([^_]\)\(sun[a-z0-9]*\)$/\1__\2__/g
182 /#[a-z]*if.*[ (]ns32000/ s/\([^_]\)ns32000/\1__ns32000__/g
183 /#[a-z]*if.*[ (]pyr/ s/\([^_]\)pyr/\1__pyr__/g
184 /#[a-z]*if.*[ (]is68k/ s/\([^_]\)is68k/\1__is68k__/g
185 s/__STDC__[ ][ ]*==[ ][ ]*0/!defined (__STRICT_ANSI__)/g
186 s/__STDC__[ ][ ]*==[ ][ ]*1/defined (__STRICT_ANSI__)/g
187 s/__STDC__[ ][ ]*!=[ ][ ]*0/defined (__STRICT_ANSI__)/g
188 s/__STDC__ - 0 == 0/!defined (__STRICT_ANSI__)/g
189 ' $2/$file > $2/$file.
sed
190 mv $2/$file.
sed $2/$file
191 if cmp $file $2/$file >/dev
/null
2>&1; then
201 # Fix first broken decl of getcwd present on some svr4 systems.
204 base
=`basename $file`
205 if [ -r ${LIB}/$file ]; then
206 file_to_fix
=${LIB}/$file
208 if [ -r ${INPUT}/$file ]; then
209 file_to_fix
=${INPUT}/$file
214 if [ \
! -z "$file_to_fix" ]; then
215 echo Checking
$file_to_fix
216 sed -e 's/getcwd(char \*, int)/getcwd(char *, size_t)/' $file_to_fix > /tmp
/$base
217 if cmp $file_to_fix /tmp
/$base >/dev
/null
2>&1; then \
220 echo Fixed
$file_to_fix
222 cp /tmp
/$base ${LIB}/$file
223 chmod a
+r
${LIB}/$file
228 # Fix second broken decl of getcwd present on some svr4 systems. Also
229 # fix the incorrect decl of profil present on some svr4 systems.
232 base
=`basename $file`
233 if [ -r ${LIB}/$file ]; then
234 file_to_fix
=${LIB}/$file
236 if [ -r ${INPUT}/$file ]; then
237 file_to_fix
=${INPUT}/$file
242 if [ \
! -z "$file_to_fix" ]; then
243 echo Checking
$file_to_fix
244 sed -e 's/getcwd(char \*, int)/getcwd(char *, size_t)/' $file_to_fix \
245 |
sed -e 's/profil(unsigned short \*, unsigned int, unsigned int, unsigned int)/profil(unsigned short *, size_t, int, unsigned)/' > /tmp
/$base
246 if cmp $file_to_fix /tmp
/$base >/dev
/null
2>&1; then \
249 echo Fixed
$file_to_fix
251 cp /tmp
/$base ${LIB}/$file
252 chmod a
+r
${LIB}/$file
257 # Fix the definition of NULL in <sys/param.h> so that it is conditional
258 # and so that it is correct for both C and C++.
261 base
=`basename $file`
262 if [ -r ${LIB}/$file ]; then
263 file_to_fix
=${LIB}/$file
265 if [ -r ${INPUT}/$file ]; then
266 file_to_fix
=${INPUT}/$file
271 if [ \
! -z "$file_to_fix" ]; then
272 echo Checking
$file_to_fix
273 cp $file_to_fix /tmp
/$base
276 sed -e '/^#define[ ]*NULL[ ]*0$/c\
280 #else /* !defined(__cplusplus) */\
281 #define __NULL_TYPE (void *)\
282 #endif /* !defined(__cplusplus) */\
283 #define NULL (__NULL_TYPE 0)\
284 #endif /* !defined(NULL) */' /tmp
/$base > /tmp
/$base.
sed
285 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
288 echo Fixed
$file_to_fix
290 cp /tmp
/$base.
sed ${LIB}/$file
291 chmod a
+r
${LIB}/$file
293 rm -f /tmp
/$base /tmp
/$base.
sed
296 # Likewise fix the definition of NULL in <stdio.h> so that it is conditional
297 # and so that it is correct for both C and C++.
300 base
=`basename $file`
301 if [ -r ${LIB}/$file ]; then
302 file_to_fix
=${LIB}/$file
304 if [ -r ${INPUT}/$file ]; then
305 file_to_fix
=${INPUT}/$file
310 if [ \
! -z "$file_to_fix" ]; then
311 echo Checking
$file_to_fix
312 cp $file_to_fix /tmp
/$base
314 sed -e '/^#define[ ]*NULL[ ]*0$/c\
317 #else /* !defined(__cplusplus) */\
318 #define __NULL_TYPE (void *)\
319 #endif /* !defined(__cplusplus) */\
320 #define NULL (__NULL_TYPE 0)' /tmp
/$base > /tmp
/$base.
sed
321 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
324 echo Fixed
$file_to_fix
326 cp /tmp
/$base.
sed ${LIB}/$file
327 chmod a
+r
${LIB}/$file
329 rm -f /tmp
/$base /tmp
/$base.
sed
332 # Likewise fix the definition of NULL in <dbm.h> so that it is conditional
333 # and so that it is correct for both C and C++.
336 base
=`basename $file`
337 if [ -r ${LIB}/$file ]; then
338 file_to_fix
=${LIB}/$file
340 if [ -r ${INPUT}/$file ]; then
341 file_to_fix
=${INPUT}/$file
346 if [ \
! -z "$file_to_fix" ]; then
347 echo Checking
$file_to_fix
348 cp $file_to_fix /tmp
/$base
350 sed -e '/^#define[ ]*NULL[ ]*((char \*) 0)$/c\
354 #else /* !defined(__cplusplus) */\
355 #define __NULL_TYPE (void *)\
356 #endif /* !defined(__cplusplus) */\
357 #define NULL (__NULL_TYPE 0)\
358 #endif /* !defined(NULL) */' /tmp
/$base > /tmp
/$base.
sed
359 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
362 echo Fixed
$file_to_fix
364 cp /tmp
/$base.
sed ${LIB}/$file
365 chmod a
+r
${LIB}/$file
367 rm -f /tmp
/$base /tmp
/$base.
sed
370 # Add a prototyped declaration of mmap to <sys/mman.h>.
373 base
=`basename $file`
374 if [ -r ${LIB}/$file ]; then
375 file_to_fix
=${LIB}/$file
377 if [ -r ${INPUT}/$file ]; then
378 file_to_fix
=${INPUT}/$file
383 if [ \
! -z "$file_to_fix" ]; then
384 echo Checking
$file_to_fix
385 cp $file_to_fix /tmp
/$base
387 sed -e '/^extern caddr_t mmap();$/c\
389 extern caddr_t mmap (caddr_t, size_t, int, int, int, off_t);\
390 #else /* !defined(__STDC__) */\
391 extern caddr_t mmap ();\
392 #endif /* !defined(__STDC__) */' /tmp
/$base > /tmp
/$base.
sed
393 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
396 echo Fixed
$file_to_fix
398 cp /tmp
/$base.
sed ${LIB}/$file
399 chmod a
+r
${LIB}/$file
401 rm -f /tmp
/$base /tmp
/$base.
sed
404 # Fix declarations of `ftw' and `nftw' in <ftw.h>. On some/most SVR4 systems
405 # the file <ftw.h> contains extern declarations of these functions followed
406 # by explicitly `static' definitions of these functions... and that's not
407 # allowed according to ANSI C. (Note however that on Solaris, this header
408 # file glitch has been pre-fixed by Sun. In the Solaris version of <ftw.h>
409 # there are no static definitions of any function so we don't need to do
410 # any of this stuff when on Solaris.
413 base
=`basename $file`
414 if [ -r ${LIB}/$file ]; then
415 file_to_fix
=${LIB}/$file
417 if [ -r ${INPUT}/$file ]; then
418 file_to_fix
=${INPUT}/$file
423 if test -z "$file_to_fix" ||
grep 'define ftw' $file_to_fix > /dev
/null
; then
424 # Either we have no <ftw.h> file at all, or else we have the pre-fixed Solaris
425 # one. Either way, we don't have to do anything.
428 echo Checking
$file_to_fix
429 cp $file_to_fix /tmp
/$base
431 sed -e '/^extern int ftw(const/i\
432 #if !defined(_STYPES)\
437 -e 's/extern \(int ftw(const.*\)$/\1/' \
438 -e '/^extern int nftw/i\
439 #if defined(_STYPES)\
444 -e 's/extern \(int nftw.*\)$/\1/' \
445 -e '/^extern int ftw(),/c\
446 #if !defined(_STYPES)\
452 #if defined(_STYPES)\
457 int nftw();' /tmp
/$base > /tmp
/$base.
sed
458 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
461 echo Fixed
$file_to_fix
463 cp /tmp
/$base.
sed ${LIB}/$file
464 chmod a
+r
${LIB}/$file
466 rm -f /tmp
/$base /tmp
/$base.
sed
469 # Avoid the definition of the bool type in the Solaris 2.x curses.h when using
470 # g++, since it's now an official type in the C++ language.
472 base
=`basename $file`
473 if [ -r ${LIB}/$file ]; then
474 file_to_fix
=${LIB}/$file
476 if [ -r ${INPUT}/$file ]; then
477 file_to_fix
=${INPUT}/$file
483 if [ \
! -z "$file_to_fix" ]; then
484 echo Checking
$file_to_fix
485 cp $file_to_fix /tmp
/$base
487 sed -e 's,^typedef[ ]char[ ]bool;$,#ifndef __cplusplus\
489 #endif /* !defined __cplusplus */,' /tmp
/$base > /tmp
/$base.
sed
490 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
493 echo Fixed
$file_to_fix
495 cp /tmp
/$base.
sed ${LIB}/$file
496 chmod a
+r
${LIB}/$file
498 rm -f /tmp
/$base /tmp
/$base.
sed
501 # Add a `static' declaration of `getrnge' into <regexp.h>.
503 # Don't do this if there is already a `static void getrnge' declaration
504 # present, since this would cause a redeclaration error. Solaris 2.x has
505 # such a declaration.
508 base
=`basename $file`
509 if [ -r ${LIB}/$file ]; then
510 file_to_fix
=${LIB}/$file
512 if [ -r ${INPUT}/$file ]; then
513 file_to_fix
=${INPUT}/$file
518 if [ \
! -z "$file_to_fix" ]; then
519 echo Checking
$file_to_fix
520 if grep "static void getrnge" $file_to_fix > /dev
/null
; then
523 cp $file_to_fix /tmp
/$base
525 sed -e '/^static int[ ]*size;/c\
528 static int getrnge ();' /tmp
/$base > /tmp
/$base.
sed
529 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
532 echo Fixed
$file_to_fix
534 cp /tmp
/$base.
sed ${LIB}/$file
535 chmod a
+r
${LIB}/$file
538 rm -f /tmp
/$base /tmp
/$base.
sed
541 # Disable apparent native compiler optimization cruft in SVR4.2 <string.h>
542 # that is visible to any ANSI compiler using this include. Simply
543 # delete the lines that #define some string functions to internal forms.
546 base
=`basename $file`
547 if [ -r ${LIB}/$file ]; then
548 file_to_fix
=${LIB}/$file
550 if [ -r ${INPUT}/$file ]; then
551 file_to_fix
=${INPUT}/$file
556 if [ \
! -z "$file_to_fix" ]; then
557 echo Checking
$file_to_fix
558 cp $file_to_fix /tmp
/$base
560 sed -e '/#define.*__std_hdr_/d' /tmp
/$base > /tmp
/$base.
sed
561 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
564 echo Fixed
$file_to_fix
566 cp /tmp
/$base.
sed ${LIB}/$file
567 chmod a
+r
${LIB}/$file
569 rm -f /tmp
/$base /tmp
/$base.
sed
572 # Delete any #defines of `__i386' which may be present in <ieeefp.h>. They
573 # tend to conflict with the compiler's own definition of this symbol. (We
574 # will use the compiler's definition.)
575 # Likewise __sparc, for Solaris, and __i860, and a few others
576 # (guessing it is necessary for all of them).
579 base
=`basename $file`
580 if [ -r ${LIB}/$file ]; then
581 file_to_fix
=${LIB}/$file
583 if [ -r ${INPUT}/$file ]; then
584 file_to_fix
=${INPUT}/$file
589 if [ \
! -z "$file_to_fix" ]; then
590 echo Checking
$file_to_fix
591 cp $file_to_fix /tmp
/$base
593 sed -e '/#define[ ]*__i386 /d' -e '/#define[ ]*__sparc /d' \
594 -e '/#define[ ]*__i860 /d' -e '/#define[ ]*__m88k /d' \
595 -e '/#define[ ]*__mips /d' -e '/#define[ ]*__m68k /d' \
596 /tmp
/$base > /tmp
/$base.
sed
597 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
600 echo Fixed
$file_to_fix
602 cp /tmp
/$base.
sed ${LIB}/$file
603 chmod a
+r
${LIB}/$file
605 rm -f /tmp
/$base /tmp
/$base.
sed
608 # Add a #define of _SIGACTION_ into <sys/signal.h>.
609 # Also fix types of SIG_DFL, SIG_ERR, SIG_IGN, and SIG_HOLD.
612 base
=`basename $file`
613 if [ -r ${LIB}/$file ]; then
614 file_to_fix
=${LIB}/$file
616 if [ -r ${INPUT}/$file ]; then
617 file_to_fix
=${INPUT}/$file
622 if [ \
! -z "$file_to_fix" ]; then
623 echo Checking
$file_to_fix
624 cp $file_to_fix /tmp
/$base
626 sed -e '/^struct sigaction {/c\
628 struct sigaction {' \
629 -e '1,$s/(void *(\*)())/(void (*)(int))/' /tmp
/$base > /tmp
/$base.
sed
630 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
633 echo Fixed
$file_to_fix
635 cp /tmp
/$base.
sed ${LIB}/$file
636 chmod a
+r
${LIB}/$file
638 rm -f /tmp
/$base /tmp
/$base.
sed
641 # Fix declarations of `makedev', `major', and `minor' in <sys/mkdev.h>.
644 base
=`basename $file`
645 if [ -r ${LIB}/$file ]; then
646 file_to_fix
=${LIB}/$file
648 if [ -r ${INPUT}/$file ]; then
649 file_to_fix
=${INPUT}/$file
654 if [ \
! -z "$file_to_fix" ]; then
655 echo Checking
$file_to_fix
656 cp $file_to_fix /tmp
/$base
658 sed -e '/^dev_t makedev(const/c\
659 static dev_t makedev(const major_t, const minor_t);' \
660 -e '/^dev_t makedev()/c\
661 static dev_t makedev();' \
662 -e '/^major_t major(const/c\
663 static major_t major(const dev_t);' \
664 -e '/^major_t major()/c\
665 static major_t major();' \
666 -e '/^minor_t minor(const/c\
667 static minor_t minor(const dev_t);' \
668 -e '/^minor_t minor()/c\
669 static minor_t minor();' /tmp
/$base > /tmp
/$base.
sed
670 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
673 echo Fixed
$file_to_fix
675 cp /tmp
/$base.
sed ${LIB}/$file
676 chmod a
+r
${LIB}/$file
678 rm -f /tmp
/$base /tmp
/$base.
sed
681 # Fix reference to NMSZ in <sys/adv.h>.
684 base
=`basename $file`
685 if [ -r ${LIB}/$file ]; then
686 file_to_fix
=${LIB}/$file
688 if [ -r ${INPUT}/$file ]; then
689 file_to_fix
=${INPUT}/$file
694 if [ \
! -z "$file_to_fix" ]; then
695 echo Checking
$file_to_fix
696 sed 's/\[NMSZ\]/\[RFS_NMSZ\]/g' $file_to_fix > /tmp
/$base
697 if cmp $file_to_fix /tmp
/$base >/dev
/null
2>&1; then \
700 echo Fixed
$file_to_fix
702 cp /tmp
/$base ${LIB}/$file
703 chmod a
+r
${LIB}/$file
708 # Fix reference to NC_NPI_RAW in <sys/netcspace.h>. Also fix types of
709 # array initializers.
712 base
=`basename $file`
713 if [ -r ${LIB}/$file ]; then
714 file_to_fix
=${LIB}/$file
716 if [ -r ${INPUT}/$file ]; then
717 file_to_fix
=${INPUT}/$file
722 if [ \
! -z "$file_to_fix" ]; then
723 echo Checking
$file_to_fix
724 sed 's/NC_NPI_RAW/NC_TPI_RAW/g' $file_to_fix \
725 |
sed 's/NC_/(unsigned long) NC_/' > /tmp
/$base
726 if cmp $file_to_fix /tmp
/$base >/dev
/null
2>&1; then \
729 echo Fixed
$file_to_fix
731 cp /tmp
/$base ${LIB}/$file
732 chmod a
+r
${LIB}/$file
737 # Conditionalize all of <fs/rfs/rf_cache.h> on _KERNEL being defined.
739 file=fs
/rfs
/rf_cache.h
740 base
=`basename $file`
741 if [ -r ${LIB}/$file ]; then
742 file_to_fix
=${LIB}/$file
744 if [ -r ${INPUT}/$file ]; then
745 file_to_fix
=${INPUT}/$file
750 if [ \
! -z "$file_to_fix" ]; then
751 echo Checking
$file_to_fix
752 if grep _KERNEL
$file_to_fix > /dev
/null
; then
755 echo '#ifdef _KERNEL' > /tmp
/$base
756 cat $file_to_fix >> /tmp
/$base
757 echo '#endif /* defined(_KERNEL) */' >> /tmp
/$base
758 echo Fixed
$file_to_fix
760 cp /tmp
/$base ${LIB}/$file
761 chmod a
+r
${LIB}/$file
766 # Conditionalize all of <sys/erec.h> on _KERNEL being defined.
769 base
=`basename $file`
770 if [ -r ${LIB}/$file ]; then
771 file_to_fix
=${LIB}/$file
773 if [ -r ${INPUT}/$file ]; then
774 file_to_fix
=${INPUT}/$file
779 if [ \
! -z "$file_to_fix" ]; then
780 echo Checking
$file_to_fix
781 if grep _KERNEL
$file_to_fix > /dev
/null
; then
784 echo '#ifdef _KERNEL' > /tmp
/$base
785 cat $file_to_fix >> /tmp
/$base
786 echo '#endif /* defined(_KERNEL) */' >> /tmp
/$base
787 echo Fixed
$file_to_fix
789 cp /tmp
/$base ${LIB}/$file
790 chmod a
+r
${LIB}/$file
795 # Conditionalize all of <sys/err.h> on _KERNEL being defined.
798 base
=`basename $file`
799 if [ -r ${LIB}/$file ]; then
800 file_to_fix
=${LIB}/$file
802 if [ -r ${INPUT}/$file ]; then
803 file_to_fix
=${INPUT}/$file
808 if [ \
! -z "$file_to_fix" ]; then
809 echo Checking
$file_to_fix
810 if grep _KERNEL
$file_to_fix > /dev
/null
; then
813 echo '#ifdef _KERNEL' > /tmp
/$base
814 cat $file_to_fix >> /tmp
/$base
815 echo '#endif /* defined(_KERNEL) */' >> /tmp
/$base
816 echo Fixed
$file_to_fix
818 cp /tmp
/$base ${LIB}/$file
819 chmod a
+r
${LIB}/$file
824 # Conditionalize all of <sys/char.h> on _KERNEL being defined.
827 base
=`basename $file`
828 if [ -r ${LIB}/$file ]; then
829 file_to_fix
=${LIB}/$file
831 if [ -r ${INPUT}/$file ]; then
832 file_to_fix
=${INPUT}/$file
837 if [ \
! -z "$file_to_fix" ]; then
838 echo Checking
$file_to_fix
839 if grep _KERNEL
$file_to_fix > /dev
/null
; then
842 echo '#ifdef _KERNEL' > /tmp
/$base
843 cat $file_to_fix >> /tmp
/$base
844 echo '#endif /* defined(_KERNEL) */' >> /tmp
/$base
845 echo Fixed
$file_to_fix
847 cp /tmp
/$base ${LIB}/$file
848 chmod a
+r
${LIB}/$file
853 # Conditionalize all of <sys/getpages.h> on _KERNEL being defined.
856 base
=`basename $file`
857 if [ -r ${LIB}/$file ]; then
858 file_to_fix
=${LIB}/$file
860 if [ -r ${INPUT}/$file ]; then
861 file_to_fix
=${INPUT}/$file
866 if [ \
! -z "$file_to_fix" ]; then
867 echo Checking
$file_to_fix
868 if grep _KERNEL
$file_to_fix > /dev
/null
; then
871 echo '#ifdef _KERNEL' > /tmp
/$base
872 cat $file_to_fix >> /tmp
/$base
873 echo '#endif /* defined(_KERNEL) */' >> /tmp
/$base
874 echo Fixed
$file_to_fix
876 cp /tmp
/$base ${LIB}/$file
877 chmod a
+r
${LIB}/$file
882 # Conditionalize all of <sys/map.h> on _KERNEL being defined.
885 base
=`basename $file`
886 if [ -r ${LIB}/$file ]; then
887 file_to_fix
=${LIB}/$file
889 if [ -r ${INPUT}/$file ]; then
890 file_to_fix
=${INPUT}/$file
895 if [ \
! -z "$file_to_fix" ]; then
896 echo Checking
$file_to_fix
897 if grep _KERNEL
$file_to_fix > /dev
/null
; then
900 echo '#ifdef _KERNEL' > /tmp
/$base
901 cat $file_to_fix >> /tmp
/$base
902 echo '#endif /* defined(_KERNEL) */' >> /tmp
/$base
903 echo Fixed
$file_to_fix
905 cp /tmp
/$base ${LIB}/$file
906 chmod a
+r
${LIB}/$file
911 # Conditionalize all of <sys/cmn_err.h> on _KERNEL being defined.
914 base
=`basename $file`
915 if [ -r ${LIB}/$file ]; then
916 file_to_fix
=${LIB}/$file
918 if [ -r ${INPUT}/$file ]; then
919 file_to_fix
=${INPUT}/$file
924 if [ \
! -z "$file_to_fix" ]; then
925 echo Checking
$file_to_fix
926 if grep _KERNEL
$file_to_fix > /dev
/null
; then
929 echo '#ifdef _KERNEL' > /tmp
/$base
930 cat $file_to_fix >> /tmp
/$base
931 echo '#endif /* defined(_KERNEL) */' >> /tmp
/$base
932 echo Fixed
$file_to_fix
934 cp /tmp
/$base ${LIB}/$file
935 chmod a
+r
${LIB}/$file
940 # Conditionalize all of <sys/kdebugger.h> on _KERNEL being defined.
943 base
=`basename $file`
944 if [ -r ${LIB}/$file ]; then
945 file_to_fix
=${LIB}/$file
947 if [ -r ${INPUT}/$file ]; then
948 file_to_fix
=${INPUT}/$file
953 if [ \
! -z "$file_to_fix" ]; then
954 echo Checking
$file_to_fix
955 if grep _KERNEL
$file_to_fix > /dev
/null
; then
958 echo '#ifdef _KERNEL' > /tmp
/$base
959 cat $file_to_fix >> /tmp
/$base
960 echo '#endif /* defined(_KERNEL) */' >> /tmp
/$base
961 echo Fixed
$file_to_fix
963 cp /tmp
/$base ${LIB}/$file
964 chmod a
+r
${LIB}/$file
969 # Conditionalize some of <netinet/in.h> on _KERNEL being defined.
972 base
=`basename $file`
973 if [ -r ${LIB}/$file ]; then
974 file_to_fix
=${LIB}/$file
976 if [ -r ${INPUT}/$file ]; then
977 file_to_fix
=${INPUT}/$file
982 if [ \
! -z "$file_to_fix" ]; then
983 echo Checking
$file_to_fix
984 if grep _KERNEL
$file_to_fix > /dev
/null
; then
987 sed -e '/#ifdef INKERNEL/i\
989 -e '/#endif[ ]*\/\* INKERNEL \*\//a\
990 #endif /* _KERNEL */' \
991 $file_to_fix > ${LIB}/${file}.
sed
992 rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
993 echo Fixed
$file_to_fix
997 # Conditionalize some of <sys/endian.h> on __GNUC__ and __GNUG__.
1000 base
=`basename $file`
1001 if [ -r ${LIB}/$file ]; then
1002 file_to_fix
=${LIB}/$file
1004 if [ -r ${INPUT}/$file ]; then
1005 file_to_fix
=${INPUT}/$file
1010 if [ \
! -z "$file_to_fix" ]; then
1011 echo Checking
$file_to_fix
1012 if grep __GNUC__
$file_to_fix > /dev
/null
; then
1015 sed -e '/# ifdef __STDC__/i\
1016 # if !defined (__GNUC__) && !defined (__GNUG__)' \
1017 -e '/# include <sys\/byteorder.h>/s/ / /'\
1018 -e '/# include <sys\/byteorder.h>/i\
1019 # endif /* !defined (__GNUC__) && !defined (__GNUG__) */'\
1020 $file_to_fix > ${LIB}/${file}.
sed
1021 rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
1022 echo Fixed
$file_to_fix
1026 # Commented out because tmcconne@sedona.intel.com says we don't clearly need it
1027 # and the text in types.h is not erroneous.
1028 ## In sys/types.h, don't name the enum for booleans.
1031 #base=`basename $file`
1032 #if [ -r ${LIB}/$file ]; then
1033 # file_to_fix=${LIB}/$file
1035 # if [ -r ${INPUT}/$file ]; then
1036 # file_to_fix=${INPUT}/$file
1041 #if [ \! -z "$file_to_fix" ]; then
1042 # echo Checking $file_to_fix
1043 # if grep "enum boolean" $file_to_fix > /dev/null; then
1044 # sed -e 's/enum boolean/enum/' ${LIB}/$file > ${LIB}/${file}.sed
1045 # rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
1046 # echo Fixed $file_to_fix
1052 # Remove useless extern keyword from struct forward declarations in
1053 # <sys/stream.h> and <sys/strsubr.h>
1056 base
=`basename $file`
1057 if [ -r ${LIB}/$file ]; then
1058 file_to_fix
=${LIB}/$file
1060 if [ -r ${INPUT}/$file ]; then
1061 file_to_fix
=${INPUT}/$file
1066 if [ \
! -z "$file_to_fix" ]; then
1067 echo Checking
$file_to_fix
1069 s/extern struct stdata;/struct stdata;/g
1070 s/extern struct strevent;/struct strevent;/g
1071 ' $file_to_fix > /tmp
/$base
1072 if cmp $file_to_fix /tmp
/$base >/dev
/null
2>&1; then \
1075 echo Fixed
$file_to_fix
1077 cp /tmp
/$base ${LIB}/$file
1078 chmod a
+r
${LIB}/$file
1084 base
=`basename $file`
1085 if [ -r ${LIB}/$file ]; then
1086 file_to_fix
=${LIB}/$file
1088 if [ -r ${INPUT}/$file ]; then
1089 file_to_fix
=${INPUT}/$file
1094 if [ \
! -z "$file_to_fix" ]; then
1095 echo Checking
$file_to_fix
1097 s/extern struct strbuf;/struct strbuf;/g
1098 s/extern struct uio;/struct uio;/g
1099 s/extern struct thread;/struct thread;/g
1100 s/extern struct proc;/struct proc;/g
1101 ' $file_to_fix > /tmp
/$base
1102 if cmp $file_to_fix /tmp
/$base >/dev
/null
2>&1; then \
1105 echo Fixed
$file_to_fix
1107 cp /tmp
/$base ${LIB}/$file
1108 chmod a
+r
${LIB}/$file
1113 # Put storage class at start of decl, to avoid warning.
1115 base
=`basename $file`
1116 if [ -r ${LIB}/$file ]; then
1117 file_to_fix
=${LIB}/$file
1119 if [ -r ${INPUT}/$file ]; then
1120 file_to_fix
=${INPUT}/$file
1125 if [ \
! -z "$file_to_fix" ]; then
1126 echo Checking
$file_to_fix
1128 s/const extern/extern const/g
1129 ' $file_to_fix > /tmp
/$base
1130 if cmp $file_to_fix /tmp
/$base >/dev
/null
2>&1; then \
1133 echo Fixed
$file_to_fix
1135 cp /tmp
/$base ${LIB}/$file
1136 chmod a
+r
${LIB}/$file
1141 # Convert functions to prototype form, and fix arg names in <sys/stat.h>.
1144 base
=`basename $file`
1145 if [ -r ${LIB}/$file ]; then
1146 file_to_fix
=${LIB}/$file
1148 if [ -r ${INPUT}/$file ]; then
1149 file_to_fix
=${INPUT}/$file
1154 if [ \
! -z "$file_to_fix" ]; then
1155 echo Checking
$file_to_fix
1156 cp $file_to_fix /tmp
/$base
1158 sed -e '/^stat([ ]*[^c]/{
1165 -e '/^lstat([ ]*[^c]/{
1172 -e '/^fstat([ ]*[^i]/{
1179 -e '/^mknod([ ]*[^c]/{
1187 -e '1,$s/\([^A-Za-z]\)path\([^A-Za-z]\)/\1__path\2/g' \
1188 -e '1,$s/\([^A-Za-z]\)buf\([^A-Za-z]\)/\1__buf\2/g' \
1189 -e '1,$s/\([^A-Za-z]\)fd\([^A-Za-z]\)/\1__fd\2/g' \
1190 -e '1,$s/ret\([^u]\)/__ret\1/g' \
1191 -e '1,$s/\([^_]\)mode\([^_]\)/\1__mode\2/g' \
1192 -e '1,$s/\([^_r]\)dev\([^_]\)/\1__dev\2/g' /tmp
/$base > /tmp
/$base.
sed
1193 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then \
1196 echo Fixed
$file_to_fix
1198 cp /tmp
/$base.
sed ${LIB}/$file
1199 chmod a
+r
${LIB}/$file
1201 rm -f /tmp
/$base /tmp
/$base.
sed
1204 # Sony NEWSOS 5.0 does not support the complete ANSI C standard.
1206 if [ -x /bin
/sony
]; then
1209 # Change <stdio.h> to not define __filbuf, __flsbuf, and __iob
1212 base
=`basename $file`
1213 if [ -r ${LIB}/$file ]; then
1214 file_to_fix
=${LIB}/$file
1216 if [ -r ${INPUT}/$file ]; then
1217 file_to_fix
=${INPUT}/$file
1222 if [ \
! -z "$file_to_fix" ]; then
1223 echo Checking
$file_to_fix
1224 cp $file_to_fix /tmp
/$base
1227 s/__filbuf/_filbuf/g
1228 s/__flsbuf/_flsbuf/g
1230 ' /tmp
/$base > /tmp
/$base.
sed
1231 mv /tmp
/$base.
sed /tmp
/$base
1232 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then
1235 echo Fixed
$file_to_fix
1237 cp /tmp
/$base ${LIB}/$file
1238 chmod a
+r
${LIB}/$file
1243 # Change <ctype.h> to not define __ctype
1246 base
=`basename $file`
1247 if [ -r ${LIB}/$file ]; then
1248 file_to_fix
=${LIB}/$file
1250 if [ -r ${INPUT}/$file ]; then
1251 file_to_fix
=${INPUT}/$file
1256 if [ \
! -z "$file_to_fix" ]; then
1257 echo Checking
$file_to_fix
1258 cp $file_to_fix /tmp
/$base
1262 ' /tmp
/$base > /tmp
/$base.
sed
1263 mv /tmp
/$base.
sed /tmp
/$base
1264 if cmp $file_to_fix /tmp
/$base.
sed >/dev
/null
2>&1; then
1267 echo Fixed
$file_to_fix
1269 cp /tmp
/$base ${LIB}/$file
1270 chmod a
+r
${LIB}/$file
1277 # In limits.h, put #ifndefs around things that are supposed to be defined
1278 # in float.h to avoid redefinition errors if float.h is included first.
1279 # Solaris 2.1 has this problem.
1282 base
=`basename $file`
1283 if [ -r ${LIB}/$file ]; then
1284 file_to_fix
=${LIB}/$file
1286 if [ -r ${INPUT}/$file ]; then
1287 file_to_fix
=${INPUT}/$file
1292 if [ \
! -z "$file_to_fix" ]; then
1293 echo Checking
$file_to_fix
1294 sed -e '/[ ]FLT_MIN[ ]/i\
1296 -e '/[ ]FLT_MIN[ ]/a\
1298 -e '/[ ]FLT_MAX[ ]/i\
1300 -e '/[ ]FLT_MAX[ ]/a\
1302 -e '/[ ]FLT_DIG[ ]/i\
1304 -e '/[ ]FLT_DIG[ ]/a\
1306 -e '/[ ]DBL_MIN[ ]/i\
1308 -e '/[ ]DBL_MIN[ ]/a\
1310 -e '/[ ]DBL_MAX[ ]/i\
1312 -e '/[ ]DBL_MAX[ ]/a\
1314 -e '/[ ]DBL_DIG[ ]/i\
1316 -e '/[ ]DBL_DIG[ ]/a\
1317 #endif' $file_to_fix > /tmp
/$base
1318 if cmp $file_to_fix /tmp
/$base >/dev
/null
2>&1; then \
1321 echo Fixed
$file_to_fix
1323 cp /tmp
/$base ${LIB}/$file
1324 chmod a
+r
${LIB}/$file
1329 # Completely replace <sys/varargs.h> with a file that includes gcc's
1330 # stdarg.h or varargs.h files as appropriate.
1333 if [ -r ${INPUT}/$file ]; then
1334 echo Replacing
$file
1335 cat > ${LIB}/$file << EOF
1336 /* This file was generated by fixincludes. */
1337 #ifndef _SYS_VARARGS_H
1338 #define _SYS_VARARGS_H
1343 #include <varargs.h>
1346 #endif /* _SYS_VARARGS_H */
1348 chmod a
+r
${LIB}/$file
1351 # In math.h, put #ifndefs around things that might be defined in a gcc
1352 # specific math-*.h file.
1355 base
=`basename $file`
1356 if [ -r ${LIB}/$file ]; then
1357 file_to_fix
=${LIB}/$file
1359 if [ -r ${INPUT}/$file ]; then
1360 file_to_fix
=${INPUT}/$file
1365 if [ \
! -z "$file_to_fix" ]; then
1366 echo Checking
$file_to_fix
1367 sed -e '/define[ ]HUGE_VAL[ ]/i\
1369 -e '/define[ ]HUGE_VAL[ ]/a\
1370 #endif' $file_to_fix > /tmp
/$base
1371 if cmp $file_to_fix /tmp
/$base >/dev
/null
2>&1; then \
1374 echo Fixed
$file_to_fix
1376 cp /tmp
/$base ${LIB}/$file
1377 chmod a
+r
${LIB}/$file
1382 # Solaris math.h and floatingpoint.h define __P without protection,
1383 # which conflicts with the fixproto definition. The fixproto
1384 # definition and the Solaris definition are used the same way.
1385 for file in math.h floatingpoint.h
; do
1386 base
=`basename $file`
1387 if [ -r ${LIB}/$file ]; then
1388 file_to_fix
=${LIB}/$file
1390 if [ -r ${INPUT}/$file ]; then
1391 file_to_fix
=${INPUT}/$file
1396 if [ \
! -z "$file_to_fix" ]; then
1397 echo Checking
$file_to_fix
1398 sed -e '/^#define[ ]*__P/i\
1400 -e '/^#define[ ]*__P/a\
1401 #endif' $file_to_fix > /tmp
/$base
1402 if cmp $file_to_fix /tmp
/$base >/dev
/null
2>&1; then \
1405 echo Fixed
$file_to_fix
1407 cp /tmp
/$base ${LIB}/$file
1408 chmod a
+r
${LIB}/$file
1414 echo 'Removing unneeded directories:'
1416 files
=`find . -type d -print | sort -r`
1417 for file in $files; do
1418 rmdir $LIB/$file > /dev
/null
2>&1
1422 echo 'Making internal symbolic non-directory links'
1424 files
=`find . -type l -print`
1425 for file in $files; do
1426 dest
=`ls -ld $file | sed -n 's/.*-> //p'`
1427 if expr "$dest" : '[^/].*' > /dev
/null
; then
1428 target
=${LIB}/`echo file | sed "s|[^/]*\$|$dest|"`
1429 if [ -f $target ]; then
1430 ln -s $dest ${LIB}/$file >/dev
/null
2>&1
1438 echo 'Replacing <sys/byteorder.h>'
1439 if [ \
! -d $LIB/sys
]; then
1442 rm -f ${LIB}/sys
/byteorder.h
1443 cat <<'__EOF__' >${LIB}/sys/byteorder.h
1444 #ifndef _SYS_BYTEORDER_H
1445 #define _SYS_BYTEORDER_H
1447 /* Functions to convert `short' and `long' quantities from host byte order
1448 to (internet) network byte order (i.e. big-endian).
1450 Written by Ron Guilmette (rfg@ncd.com).
1452 This isn't actually used by GCC. It is installed by fixinc.svr4.
1454 For big-endian machines these functions are essentially no-ops.
1456 For little-endian machines, we define the functions using specialized
1457 asm sequences in cases where doing so yields better code (e.g. i386). */
1459 #if !defined (__GNUC__) && !defined (__GNUG__)
1460 #error You lose! This file is only useful with GNU compilers.
1463 #ifndef __BYTE_ORDER__
1464 /* Byte order defines. These are as defined on UnixWare 1.1, but with
1465 double underscores added at the front and back. */
1466 #define __LITTLE_ENDIAN__ 1234
1467 #define __BIG_ENDIAN__ 4321
1468 #define __PDP_ENDIAN__ 3412
1472 #define __STATIC static
1478 __STATIC __inline__ unsigned long htonl (unsigned long);
1479 __STATIC __inline__ unsigned short htons (unsigned int);
1480 __STATIC __inline__ unsigned long ntohl (unsigned long);
1481 __STATIC __inline__ unsigned short ntohs (unsigned int);
1482 #endif /* defined (__STDC__) */
1484 #if defined (__i386__)
1486 #ifndef __BYTE_ORDER__
1487 #define __BYTE_ORDER__ __LITTLE_ENDIAN__
1490 /* Convert a host long to a network long. */
1492 /* We must use a new-style function definition, so that this will also
1493 be valid for C++. */
1494 __STATIC __inline__ unsigned long
1495 htonl (unsigned long __arg)
1497 register unsigned long __result;
1499 __asm__ ("xchg%B0 %b0,%h0\n\
1501 xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
1505 /* Convert a host short to a network short. */
1507 __STATIC __inline__ unsigned short
1508 htons (unsigned int __arg)
1510 register unsigned short __result;
1512 __asm__ ("xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
1516 #elif ((defined (__i860__) && !defined (__i860_big_endian__)) \
1517 || defined (__ns32k__) || defined (__vax__) \
1518 || defined (__spur__) || defined (__arm__))
1520 #ifndef __BYTE_ORDER__
1521 #define __BYTE_ORDER__ __LITTLE_ENDIAN__
1524 /* For other little-endian machines, using C code is just as efficient as
1525 using assembly code. */
1527 /* Convert a host long to a network long. */
1529 __STATIC __inline__ unsigned long
1530 htonl (unsigned long __arg)
1532 register unsigned long __result;
1534 __result = (__arg >> 24) & 0x000000ff;
1535 __result |= (__arg >> 8) & 0x0000ff00;
1536 __result |= (__arg << 8) & 0x00ff0000;
1537 __result |= (__arg << 24) & 0xff000000;
1541 /* Convert a host short to a network short. */
1543 __STATIC __inline__ unsigned short
1544 htons (unsigned int __arg)
1546 register unsigned short __result;
1548 __result = (__arg << 8) & 0xff00;
1549 __result |= (__arg >> 8) & 0x00ff;
1553 #else /* must be a big-endian machine */
1555 #ifndef __BYTE_ORDER__
1556 #define __BYTE_ORDER__ __BIG_ENDIAN__
1559 /* Convert a host long to a network long. */
1561 __STATIC __inline__ unsigned long
1562 htonl (unsigned long __arg)
1567 /* Convert a host short to a network short. */
1569 __STATIC __inline__ unsigned short
1570 htons (unsigned int __arg)
1575 #endif /* big-endian */
1577 /* Convert a network long to a host long. */
1579 __STATIC __inline__ unsigned long
1580 ntohl (unsigned long __arg)
1582 return htonl (__arg);
1585 /* Convert a network short to a host short. */
1587 __STATIC __inline__ unsigned short
1588 ntohs (unsigned int __arg)
1590 return htons (__arg);
1598 if [ -r ${INPUT}/sys
/byteorder.h
]; then
1599 if grep BYTE_ORDER
${INPUT}/sys
/byteorder.h
>/dev
/null
2>/dev
/null
; then
1600 cat <<'__EOF__' >>${LIB}/sys/byteorder.h
1602 #define LITTLE_ENDIAN __LITTLE_ENDIAN__
1603 #define BIG_ENDIAN __BIG_ENDIAN__
1604 #define PDP_ENDIAN __PDP_ENDIAN__
1605 #define BYTE_ORDER __BYTE_ORDER__
1612 cat <<'__EOF__' >>${LIB}/sys/byteorder.h
1613 #endif /* !defined (_SYS_BYTEORDER_H) */
1616 chmod a
+r
${LIB}/sys
/byteorder.h