home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume20 / posix.h-tester < prev    next >
Encoding:
Internet Message Format  |  1989-09-17  |  48.3 KB

  1. Subject:  v20i001:  POSIX 1003.1 #include file tester
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: aixsm!bbooks@uunet.UU.NET (Barry Books)
  7. Posting-number: Volume 20, Issue 1
  8. Archive-name: posix.h-tester
  9.  
  10. This test sorts thru the POSIX and ANSI include files and reports missing
  11. items, additional items in the standard, additional items allowed by the
  12. standard, and items not allowed by the standard.  References to the
  13. standards document are included in the source code and the report.
  14.  
  15. The test assumes a traditional implementation of include files and
  16. requires two things not stated  in the POSIX  standard or the ANSI C ( Dec
  17. 1988 ).  The first is the include files must be readable.  This is the
  18. case for almost all installations I know of ( even the ones with
  19. precompiled include files have readable ones also ).  The other is the -E
  20. option to the C compiler.  This option is available on most UNIX C
  21. compilers and possibly others.  This option runs only the C preprocessor
  22. and writes the results to stdout.  If your compiler does not support this
  23. option I suggest getting one the public domain C preprocessors such as
  24. GNU.
  25.  
  26.  
  27. # This is a shell archive.  Remove anything before this line,
  28. # then unpack it by saving it in a file and typing "sh file".
  29. # Then read the README and WARRANTY files.
  30. # Contents:  include/ include/inc/ include/structs/ include/types/
  31. #    include/WARRANTY include/defines include/defines.awk include/catinc
  32. #    include/squash include/catinc.awk include/inc/dirent include/inc/errno
  33. #    include/inc/fcntl include/inc/grp include/inc/limits include/inc/pwd
  34. #    include/inc/signal include/inc/stdio include/inc/termios
  35. #    include/inc/unistd include/inc/utime include/inc/stat include/inc/times
  36. #    include/inc/types include/inc/utsname include/inc/wait
  37. #    include/inc/assert include/inc/ctype include/inc/float
  38. #    include/inc/locale include/inc/math include/inc/setjmp
  39. #    include/inc/stdarg include/inc/stddef include/inc/stdlib
  40. #    include/inc/string include/inc/time include/inc/tar include/testinc
  41. #    include/README include/report include/incfiles include/files
  42. #    include/struct include/struct.awk include/functions
  43. #    include/structs/assert include/structs/ctype include/structs/dirent
  44. #    include/structs/errno include/structs/fcntl include/structs/float
  45. #    include/structs/grp include/structs/limits include/structs/locale
  46. #    include/structs/math include/structs/pwd include/structs/setjmp
  47. #    include/structs/signal include/structs/stat include/structs/stdarg
  48. #    include/structs/stddef include/structs/stdio include/structs/stdlib
  49. #    include/structs/string include/structs/tar include/structs/termios
  50. #    include/structs/time include/structs/times include/structs/types
  51. #    include/structs/unistd include/structs/utime include/structs/utsname
  52. #    include/structs/wait include/structs/grp.h include/structs/locale.h
  53. #    include/structs/pwd.c include/structs/stdlib.h include/report.str.awk
  54. #    include/struct1.awk include/types/assert include/types/ctype
  55. #    include/types/dirent include/types/errno include/types/fcntl
  56. #    include/types/float include/types/grp include/types/limits
  57. #    include/types/locale include/types/math include/types/pwd
  58. #    include/types/setjmp include/types/signal include/types/stat
  59. #    include/types/stdarg include/types/stddef include/types/stdio
  60. #    include/types/stdlib include/types/string include/types/tar
  61. #    include/types/termios include/types/time include/types/times
  62. #    include/types/types include/types/unistd include/types/utime
  63. #    include/types/utsname include/types/wait include/typedef
  64. #    include/typedef.awk include/ctypes include/report.t include/tr.testrig
  65.  
  66. echo mkdir - include
  67. mkdir include
  68. chmod u=rwx,g=rx,o=rx include
  69.  
  70. echo x - include/WARRANTY
  71. sed 's/^@//' > "include/WARRANTY" <<'@//E*O*F include/WARRANTY//'
  72.  
  73.                              NOTICE STATEMENT
  74.  
  75.        This code was developed by IBM Corporation.  Copyright is
  76.        disclaimed.
  77.  
  78.                            WARRANTY DISCLAIMER
  79.  
  80.        THE CODE AND ITS DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
  81.        WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED.  THE ENTIRE
  82.        RISK AS TO THE QUALITY AND PERFORMANCE OF THE CODE IS WITH
  83.        THE USER.  SHOULD THE CODE PROVE DEFECTIVE, THE USER (AND
  84.        NOT IBM) ASSUMES THE ENTIRE COST OF ALL NECESSARY SERVICING,
  85.        REPAIR OR CORRECTION.
  86.  
  87.        IBM does not warrant that the function contained in the code
  88.        will meet the user's requirements or that the operation of
  89.        the code will be uninterrupted or error free or that code
  90.        defects will be corrected.
  91.  
  92.        IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE AND
  93.        DOCUMENTATION, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
  94.        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  95.        FITNESS FOR A PARTICULAR PURPOSE.
  96.  
  97.        IN NO EVENT WILL IBM BE LIABLE FOR ANY ACTUAL DAMAGES FOR
  98.        ANY CAUSE WHATSOEVER, NOR WILL IBM BE LIABLE FOR ANY LOST
  99.        PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR CONSEQUENTIAL
  100.        DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE THE
  101.        CODE OR DOCUMENTATION EVEN IF IBM HAS BEEN ADVISED OF THE
  102.        POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER
  103.        PARTY.
  104.  
  105.        Nothing contained herein shall be construed as granting
  106.        permission to use IBM's trademark or trade name in
  107.        connection with any advertising or publicity pertaining
  108.        directly or indirectly to the distribution of the code or
  109.        documentation without the prior written approval of IBM.
  110.  
  111. @//E*O*F include/WARRANTY//
  112. chmod u=r,g=r,o=r include/WARRANTY
  113.  
  114. echo x - include/defines
  115. sed 's/^@//' > "include/defines" <<'@//E*O*F include/defines//'
  116.  #
  117. #**********************************************************************
  118. # THERE MUST BE A SPACE in the first character of the first line.
  119. #**********************************************************************
  120. #
  121. #            NOTICE STATEMENT
  122. #
  123. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  124. #
  125. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  126. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  127. #
  128. #    "@(#) This code was developed by IBM Corporation. "
  129. #    "@(#) Copyright is disclaimed. "
  130. #
  131. #**********************************************************************
  132. #  Written by:  Barry Books
  133. #**********************************************************************
  134.  
  135.  # set up environment
  136. NAME=`$MKTEMP`
  137. rm -f $NAME.f
  138. touch $NAME.f
  139. export NAME
  140. for x in $INCLUDES
  141. do
  142.     TIF="$TIF -I $x"
  143. done
  144. if [ -n "$IFLAGS" ]
  145. then
  146.     IFLAGS=$TIF
  147. fi
  148. #BSD could not handle this
  149. #IFLAGS=${IFLAGS:-$TIF}
  150.  
  151. # write C code
  152. # header for each file
  153. echo "#include \"$1\"" > $NAME.c
  154. echo "main() {" >> $NAME.c
  155.  
  156. # find all possible defines in the include files
  157. @./catinc $1 | sh | awk -f defines.awk  >> $NAME.c 2> /dev/null
  158.  
  159. # trailer for each file
  160. echo "}" >> $NAME.c
  161.  
  162. # compile the file
  163. # the _POSIX_SOURCE flag should eleminate all defines not found in POSIX 1003.1
  164. # or ANSI (1003.1 2.8.2)
  165. cc $CFLAGS $IFLAGS -D_POSIX_SOURCE $NAME.c -o $NAME  > /dev/null
  166.  
  167. #generate a report
  168. @./report -d $1 $NAME
  169.  
  170. # cleanup
  171. rm -f $NAME.f $NAME $NAME.c
  172. @//E*O*F include/defines//
  173. chmod u=rwx,g=rx,o=rx include/defines
  174.  
  175. echo x - include/defines.awk
  176. sed 's/^@//' > "include/defines.awk" <<'@//E*O*F include/defines.awk//'
  177.  #
  178. #**********************************************************************
  179. # THERE MUST BE A SPACE in the first character of the first line.
  180. #**********************************************************************
  181. #
  182. #            NOTICE STATEMENT
  183. #
  184. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  185. #
  186. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  187. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  188. #
  189. #    "@(#) This code was developed by IBM Corporation. "
  190. #    "@(#) Copyright is disclaimed. "
  191. #
  192. #**********************************************************************
  193. #  Written by:  Barry Books
  194. #**********************************************************************
  195.  
  196.  # this awk script finds defines and writes C code to print them
  197. #  #ifdef DEFINE
  198. # printf("DEFINE\n");
  199. # #endif
  200.  
  201. /^[     ]*#[     ]*define/ {
  202.         if ( i = index($2,"(") )
  203.             def = substr($2,1,i-1);
  204.         else
  205.             def = $2;
  206.         printf("#ifdef %s\n",def);
  207.         printf("printf(\"%s\\n\");\n",def);
  208.         printf("#endif\n");
  209.     }
  210. @//E*O*F include/defines.awk//
  211. chmod u=rw,g=r,o=r include/defines.awk
  212.  
  213. echo x - include/catinc
  214. sed 's/^@//' > "include/catinc" <<'@//E*O*F include/catinc//'
  215.  #
  216. #**********************************************************************
  217. # THERE MUST BE A SPACE in the first character of the first line.
  218. #**********************************************************************
  219. #
  220. #            NOTICE STATEMENT
  221. #
  222. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  223. #
  224. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  225. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  226. #
  227. #    "@(#) This code was developed by IBM Corporation. "
  228. #    "@(#) Copyright is disclaimed. "
  229. #
  230. #**********************************************************************
  231. #  Written by:  Barry Books
  232. #**********************************************************************
  233.  
  234.  # run the awk script that follows includes of other include files
  235. awk -f catinc.awk < $1 2> /dev/null
  236. @//E*O*F include/catinc//
  237. chmod u=rwx,g=rx,o=rx include/catinc
  238.  
  239. echo x - include/squash
  240. sed 's/^@//' > "include/squash" <<'@//E*O*F include/squash//'
  241.  #
  242. #**********************************************************************
  243. # THERE MUST BE A SPACE in the first character of the first line.
  244. #**********************************************************************
  245. #
  246. #            NOTICE STATEMENT
  247. #
  248. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  249. #
  250. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  251. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  252. #
  253. #    "@(#) This code was developed by IBM Corporation. "
  254. #    "@(#) Copyright is disclaimed. "
  255. #
  256. #**********************************************************************
  257. #  Written by:  Barry Books
  258. #**********************************************************************
  259.  
  260. # finds include files using include path
  261. # get rid of junk like  #   define  and #  include
  262. # don't include things twice
  263.  
  264. grep $1 $NAME.f
  265. if [ $? -ne 0 ]
  266. then
  267.     for x in $INCLUDES
  268.     do
  269.         if [ -s $x/$1 ]
  270.         then
  271.             sed 's/[     ]*#[     ]*define/#define/
  272.                 s/[     ]*#[     ]*include/#include/
  273.                 s/[     ]*#[     ]*if/#if/
  274.                 s/[     ]*#[     ]*end/#end/' < $x/$1
  275.             break
  276.         fi
  277.     done
  278. fi
  279.  
  280. echo $1 >> $NAME.f
  281. @//E*O*F include/squash//
  282. chmod u=rwx,g=rx,o=rx include/squash
  283.  
  284. echo x - include/catinc.awk
  285. sed 's/^@//' > "include/catinc.awk" <<'@//E*O*F include/catinc.awk//'
  286.  #
  287. #**********************************************************************
  288. # THERE MUST BE A SPACE in the first character of the first line.
  289. #**********************************************************************
  290. #
  291. #            NOTICE STATEMENT
  292. #
  293. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  294. #
  295. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  296. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  297. #
  298. #    "@(#) This code was developed by IBM Corporation. "
  299. #    "@(#) Copyright is disclaimed. "
  300. #
  301. #**********************************************************************
  302. #  Written by:  Barry Books
  303. #**********************************************************************
  304.  
  305. # this awk script writes a shell script which to recursivly follow
  306. # includes of other include files.  It attempts to resolve the
  307. # problem of two include files including each other by 
  308. # only reading each file once.
  309. #!/bin/awk -f $1
  310.  
  311. BEGIN {
  312.         EOF = "EnDoFfIlE"
  313.         printf("cat <<%s\n",EOF);
  314.     }
  315.  
  316. # if it is an include line follow it down
  317. #it seems this is allowed 
  318. /#include</ {
  319.         printf("%s\n",EOF);
  320.         a = substr($1,10);
  321.         a = substr(a,1,length(a)-1);
  322.         printf("./squash %s | ./catinc 2> /dev/null | sh\n",a);
  323.         printf("cat <<%s\n",EOF);
  324.         next;
  325.     }
  326.  
  327.  
  328. /#include/ {
  329.         printf("%s\n",EOF);
  330.         a = substr($2,2);
  331.         a = substr(a,1,length(a)-1);
  332.         printf("./squash %s | ./catinc 2> /dev/null | sh\n",a);
  333.         printf("cat <<%s\n",EOF);
  334.         next;
  335.     }
  336.  
  337. # just copy input to output
  338. /./    {
  339.         print $0
  340.     }
  341.  
  342. END {
  343.     printf("%s\n",EOF);
  344.     }
  345.  
  346.  
  347. @//E*O*F include/catinc.awk//
  348. chmod u=rw,g=r,o=r include/catinc.awk
  349.  
  350. echo mkdir - include/inc
  351. mkdir include/inc
  352. chmod u=rwx,g=rx,o=rx include/inc
  353.  
  354. echo x - include/inc/dirent
  355. sed 's/^@//' > "include/inc/dirent" <<'@//E*O*F include/inc/dirent//'
  356.  
  357. @//E*O*F include/inc/dirent//
  358. chmod u=rw,g=r,o=r include/inc/dirent
  359.  
  360. echo x - include/inc/errno
  361. sed 's/^@//' > "include/inc/errno" <<'@//E*O*F include/inc/errno//'
  362. EDOM
  363. ERANGE
  364.  
  365. E2BIG
  366. EACCES
  367. EAGAIN
  368. EBADF
  369. EBUSY
  370. ECHILD
  371. EDEADLK
  372. EEXIST
  373. EFAULT
  374. EFBIG
  375. EINTR
  376. EINVAL
  377. EIO
  378. EISDIR
  379. EMFILE
  380. EMLINK
  381. ENAMETOOLONG
  382. ENFILE
  383. ENODEV
  384. ENOENT
  385. ENOEXEC
  386. ENOLCK
  387. ENOMEM
  388. ENOSPC
  389. ENOSYS
  390. ENOTDIR
  391. ENOTEMPTY
  392. ENOTTY
  393. ENXIO
  394. EPERM
  395. EPIPE
  396. EROFS
  397. ESPIPE
  398. ESRCH
  399. EXDEV
  400. @//E*O*F include/inc/errno//
  401. chmod u=rw,g=r,o=r include/inc/errno
  402.  
  403. echo x - include/inc/fcntl
  404. sed 's/^@//' > "include/inc/fcntl" <<'@//E*O*F include/inc/fcntl//'
  405. F_DUPFD
  406. F_GETFD
  407. F_GETLK
  408. F_SETFD
  409. F_GETFL
  410. F_SETFL
  411. F_SETLK
  412. F_SETLKW
  413. FD_CLOEXEC
  414. F_RDLCK
  415. F_WRLCK
  416. F_UNLCK
  417. O_CREAT
  418. O_EXCL
  419. O_NOCTTY
  420. O_TRUNC
  421. O_APPEND
  422. O_NONBLOCK
  423. O_RDONLY
  424. O_RDWR
  425. O_WRONLY
  426. O_ACCMODE
  427. @//E*O*F include/inc/fcntl//
  428. chmod u=rw,g=r,o=r include/inc/fcntl
  429.  
  430. echo x - include/inc/grp
  431. sed 's/^@//' > "include/inc/grp" <<'@//E*O*F include/inc/grp//'
  432.  
  433. @//E*O*F include/inc/grp//
  434. chmod u=rw,g=r,o=r include/inc/grp
  435.  
  436. echo x - include/inc/limits
  437. sed 's/^@//' > "include/inc/limits" <<'@//E*O*F include/inc/limits//'
  438. CHAR_BIT
  439. CHAR_MAX
  440. CHAR_MIN
  441. INT_MAX
  442. INT_MIN
  443. LONG_MAX
  444. LONG_MIN
  445. MB_LEN_MAX
  446. SCHAR_MAX
  447. SCHAR_MIN
  448. SHRT_MAX
  449. SHRT_MIN
  450. UCHAR_MAX
  451. UINT_MAX
  452. ULONG_MAX
  453. USHRT_MAX
  454.  
  455. _POSIX_ARG_MAX
  456. _POSIX_CHILD_MAX
  457. _POSIX_LINK_MAX
  458. _POSIX_MAX_CANON
  459. _POSIX_MAX_INPUT
  460. _POSIX_NAME_MAX
  461. _POSIX_NGROUPS_MAX
  462. _POSIX_OPEN_MAX
  463. _POSIX_PATH_MAX
  464. _POSIX_PIPE_BUF
  465.  
  466. NGROUPS_MAX
  467. ARG_MAX
  468. CHILD_MAX
  469. OPEN_MAX
  470. LINK_MAX
  471. MAX_CANON
  472. MAX_INPUT
  473. NAME_MAX
  474. PATH_MAX
  475. PIPE_BUF
  476.  
  477. CLK_TCK
  478. @//E*O*F include/inc/limits//
  479. chmod u=rw,g=r,o=r include/inc/limits
  480.  
  481. echo x - include/inc/pwd
  482. sed 's/^@//' > "include/inc/pwd" <<'@//E*O*F include/inc/pwd//'
  483.  
  484. @//E*O*F include/inc/pwd//
  485. chmod u=rw,g=r,o=r include/inc/pwd
  486.  
  487. echo x - include/inc/signal
  488. sed 's/^@//' > "include/inc/signal" <<'@//E*O*F include/inc/signal//'
  489. SIG_DFL
  490. SIG_IGN
  491. SIG_ERR
  492.  
  493. SIGABRT
  494. SIGFPE
  495. SIGILL
  496. SIGINT
  497. SIGSEGV
  498. SIGTERM
  499.  
  500. SIGALRM
  501. SIGHUP
  502. SIGKILL
  503. SIGPIPE
  504. SIGQUIT
  505. SIGUSR1
  506. SIGUSR2
  507. SIGCHLD
  508. SIGCONT
  509. SIGSTOP
  510. SIGTSTP
  511. SIGTTIN
  512. SIGTTOU
  513. SIG_BLOCK
  514. SIG_UNBLOCK
  515. SIG_SETMASK
  516.  
  517. SA_NOCLDSTOP
  518. @//E*O*F include/inc/signal//
  519. chmod u=rw,g=r,o=r include/inc/signal
  520.  
  521. echo x - include/inc/stdio
  522. sed 's/^@//' > "include/inc/stdio" <<'@//E*O*F include/inc/stdio//'
  523. _IOFBF
  524. _IOLBF
  525. _IONBF
  526. BUFSIZ
  527. EOF
  528. FILENAME_MAX
  529. FOPEN_MAX
  530. L_tmpnam
  531. NULL
  532. SEEK_CUR
  533. SEEK_END
  534. SEEK_SET
  535. stdin
  536. stdout
  537. stderr
  538. TMP_MAX
  539.  
  540. L_ctermid
  541. L_cuserid
  542. @//E*O*F include/inc/stdio//
  543. chmod u=rw,g=r,o=r include/inc/stdio
  544.  
  545. echo x - include/inc/termios
  546. sed 's/^@//' > "include/inc/termios" <<'@//E*O*F include/inc/termios//'
  547. NCCS
  548. BRKINT
  549. ICRNL
  550. IGNBRK
  551. IGNCR
  552. IGNPAR
  553. INLCR
  554. INPCK
  555. ISTRIP
  556. IXOFF
  557. IXON
  558. PARMRK
  559. OPOST
  560. CLOCAL
  561. CREAD
  562. CSIZE
  563. CS5
  564. CS6
  565. CS7
  566. CS8
  567. CSTOPB
  568. HUPCL
  569. PARENB
  570. PARODD
  571. ECHO
  572. ECHOE
  573. ECHOK
  574. ECHONL
  575. ICANON
  576. IEXTEN
  577. ISIG
  578. NOFLSH
  579. TOSTOP
  580. VEOF
  581. VEOL
  582. VERASE
  583. VINTR
  584. VKILL
  585. VMIN
  586. VQUIT
  587. VSUSP
  588. VTIME
  589. VSTART
  590. VSTOP
  591. B0
  592. B50
  593. B75
  594. B110
  595. B134
  596. B150
  597. B200
  598. B300
  599. B600
  600. B1200
  601. B1800
  602. B2400
  603. B4800
  604. B9600
  605. B19200
  606. B38400
  607. TCSANOW
  608. TCSADRAIN
  609. TCSAFLUSH
  610. TCIFLUSH
  611. TCOFLUSH
  612. TCIOFLUSH
  613. TCIOFF
  614. TCION
  615. TCOOFF
  616. TCOON
  617. @//E*O*F include/inc/termios//
  618. chmod u=rw,g=r,o=r include/inc/termios
  619.  
  620. echo x - include/inc/unistd
  621. sed 's/^@//' > "include/inc/unistd" <<'@//E*O*F include/inc/unistd//'
  622. NULL
  623.  
  624. R_OK
  625. W_OK
  626. X_OK
  627. F_OK
  628.  
  629. SEEK_SET
  630. SEEK_CUR
  631. SEEK_END
  632.  
  633. _POSIX_JOB_CONTROL
  634. _POSIX_SAVED_IDS
  635. _POSIX_VERSION
  636.  
  637. _POSIX_CHOWN_RESTRICTED
  638. _POSIX_NO_TRUNC
  639. _POSIX_VDISABLE
  640.  
  641. _SC_ARG_MAX
  642. _SC_CHILD_MAX
  643. _SC_JOB_CONTROL
  644. _SC_NGROUPS_MAX
  645. _SC_OPEN_MAX
  646. _SC_SAVED_IDS
  647. _SC_VERSION
  648.  
  649. _PC_CHOWN_RESTRICTED
  650. _PC_LINK_MAX
  651. _PC_MAX_CANON
  652. _PC_MAX_INPUT
  653. _PC_NAME_MAX
  654. _PC_NO_TRUNC
  655. _PC_PATH_MAX
  656. _PC_PIPE_BUF
  657. _PC_VDISABLE
  658.  
  659. STDIN_FILENO
  660. STDOUT_FILENO
  661. STDERR_FILENO
  662. @//E*O*F include/inc/unistd//
  663. chmod u=rw,g=r,o=r include/inc/unistd
  664.  
  665. echo x - include/inc/utime
  666. sed 's/^@//' > "include/inc/utime" <<'@//E*O*F include/inc/utime//'
  667.  
  668. @//E*O*F include/inc/utime//
  669. chmod u=rw,g=r,o=r include/inc/utime
  670.  
  671. echo x - include/inc/stat
  672. sed 's/^@//' > "include/inc/stat" <<'@//E*O*F include/inc/stat//'
  673. S_IRWXU
  674. S_IRUSR
  675. S_IWUSR
  676. S_IXUSR
  677.  
  678. S_IRWXG
  679. S_IRGRP
  680. S_IWGRP
  681. S_IXGRP
  682.  
  683. S_IRWXO
  684. S_IROTH
  685. S_IWOTH
  686. S_IXOTH
  687.  
  688. S_ISUID
  689. S_ISGID
  690. @//E*O*F include/inc/stat//
  691. chmod u=rw,g=r,o=r include/inc/stat
  692.  
  693. echo x - include/inc/times
  694. sed 's/^@//' > "include/inc/times" <<'@//E*O*F include/inc/times//'
  695.  
  696. @//E*O*F include/inc/times//
  697. chmod u=rw,g=r,o=r include/inc/times
  698.  
  699. echo x - include/inc/types
  700. sed 's/^@//' > "include/inc/types" <<'@//E*O*F include/inc/types//'
  701.  
  702. @//E*O*F include/inc/types//
  703. chmod u=rw,g=r,o=r include/inc/types
  704.  
  705. echo x - include/inc/utsname
  706. sed 's/^@//' > "include/inc/utsname" <<'@//E*O*F include/inc/utsname//'
  707.  
  708. @//E*O*F include/inc/utsname//
  709. chmod u=rw,g=r,o=r include/inc/utsname
  710.  
  711. echo x - include/inc/wait
  712. sed 's/^@//' > "include/inc/wait" <<'@//E*O*F include/inc/wait//'
  713. WNOHANG
  714. WUNTRACED
  715. @//E*O*F include/inc/wait//
  716. chmod u=rw,g=r,o=r include/inc/wait
  717.  
  718. echo x - include/inc/assert
  719. sed 's/^@//' > "include/inc/assert" <<'@//E*O*F include/inc/assert//'
  720.  
  721. @//E*O*F include/inc/assert//
  722. chmod u=rw,g=r,o=r include/inc/assert
  723.  
  724. echo x - include/inc/ctype
  725. sed 's/^@//' > "include/inc/ctype" <<'@//E*O*F include/inc/ctype//'
  726.  
  727. @//E*O*F include/inc/ctype//
  728. chmod u=rw,g=r,o=r include/inc/ctype
  729.  
  730. echo x - include/inc/float
  731. sed 's/^@//' > "include/inc/float" <<'@//E*O*F include/inc/float//'
  732. FLT_ROUNDS
  733. DBL_DIG
  734. DBL_MANT_DIG
  735. DBL_MAX_10_EXP
  736. DBL_MAX_EXP
  737. DBL_MIN_10_EXP
  738. DBL_MIN_EXP
  739. FLT_DIG
  740. FLT_MANT_DIG
  741. FLT_MAX_10_EXP
  742. FLT_MAX_EXP
  743. FLT_MIN_10_EXP
  744. FLT_MIN_EXP
  745. FLT_RADIX
  746. LDBL_DIG
  747. LDBL_MANT_DIG
  748. LDBL_MAX_10_EXP
  749. LDBL_MAX_EXP
  750. LDBL_MIN_10_EXP
  751. LDBL_MIN_EXP
  752. DBL_MAX
  753. FLT_MAX
  754. LDBL_MAX
  755. DBL_EPSILON
  756. DBL_MIN
  757. FLT_EPSILON
  758. FLT_MIN
  759. LDBL_EPSIOLON
  760. LDBL_MIN
  761. @//E*O*F include/inc/float//
  762. chmod u=rw,g=r,o=r include/inc/float
  763.  
  764. echo x - include/inc/locale
  765. sed 's/^@//' > "include/inc/locale" <<'@//E*O*F include/inc/locale//'
  766. NULL
  767. LC_ALL
  768. LC_COLLATE
  769. LC_CTYPE
  770. LC_MONETARY
  771. LC_NUMERIC
  772. LC_TIME
  773. @//E*O*F include/inc/locale//
  774. chmod u=rw,g=r,o=r include/inc/locale
  775.  
  776. echo x - include/inc/math
  777. sed 's/^@//' > "include/inc/math" <<'@//E*O*F include/inc/math//'
  778. HUGE_VAL
  779. @//E*O*F include/inc/math//
  780. chmod u=rw,g=r,o=r include/inc/math
  781.  
  782. echo x - include/inc/setjmp
  783. sed 's/^@//' > "include/inc/setjmp" <<'@//E*O*F include/inc/setjmp//'
  784.  
  785. @//E*O*F include/inc/setjmp//
  786. chmod u=rw,g=r,o=r include/inc/setjmp
  787.  
  788. echo x - include/inc/stdarg
  789. sed 's/^@//' > "include/inc/stdarg" <<'@//E*O*F include/inc/stdarg//'
  790.  
  791. @//E*O*F include/inc/stdarg//
  792. chmod u=rw,g=r,o=r include/inc/stdarg
  793.  
  794. echo x - include/inc/stddef
  795. sed 's/^@//' > "include/inc/stddef" <<'@//E*O*F include/inc/stddef//'
  796. NULL
  797. @//E*O*F include/inc/stddef//
  798. chmod u=rw,g=r,o=r include/inc/stddef
  799.  
  800. echo x - include/inc/stdlib
  801. sed 's/^@//' > "include/inc/stdlib" <<'@//E*O*F include/inc/stdlib//'
  802. EXIT_FAILURE
  803. EXIT_SUCCESS
  804. MB_CUR_MAX
  805. NULL
  806. RAND_MAX
  807. @//E*O*F include/inc/stdlib//
  808. chmod u=rw,g=r,o=r include/inc/stdlib
  809.  
  810. echo x - include/inc/string
  811. sed 's/^@//' > "include/inc/string" <<'@//E*O*F include/inc/string//'
  812. NULL
  813. @//E*O*F include/inc/string//
  814. chmod u=rw,g=r,o=r include/inc/string
  815.  
  816. echo x - include/inc/time
  817. sed 's/^@//' > "include/inc/time" <<'@//E*O*F include/inc/time//'
  818.  
  819. @//E*O*F include/inc/time//
  820. chmod u=rw,g=r,o=r include/inc/time
  821.  
  822. echo x - include/inc/tar
  823. sed 's/^@//' > "include/inc/tar" <<'@//E*O*F include/inc/tar//'
  824. TMAGIC
  825. TMAGLEN
  826. TVERSION
  827. TVERSLEN
  828. REGTYPE
  829. AREGTYPE
  830. LNKTYPE
  831. SYMTYPE
  832. CHRTYPE
  833. BLKTYPE
  834. DIRTYPE
  835. FIFOTYPE
  836. CONTTYPE
  837. TSUID
  838. TSGID
  839. TSVTX
  840. TUREAD
  841. TUWRITE
  842. TUEXEC
  843. TGREAD
  844. TGWRITE
  845. TGEXEC
  846. TOREAD
  847. TOWRITE
  848. TOEXEC
  849. @//E*O*F include/inc/tar//
  850. chmod u=rw,g=r,o=r include/inc/tar
  851.  
  852. echo x - include/testinc
  853. sed 's/^@//' > "include/testinc" <<'@//E*O*F include/testinc//'
  854.  #
  855. #**********************************************************************
  856. # THERE MUST BE A SPACE in the first character of the first line.
  857. #**********************************************************************
  858. #
  859. #            NOTICE STATEMENT
  860. #
  861. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  862. #
  863. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  864. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  865. #
  866. #    "@(#) This code was developed by IBM Corporation. "
  867. #    "@(#) Copyright is disclaimed. "
  868. #
  869. #**********************************************************************
  870. #  Written by:  Barry Books
  871. #**********************************************************************
  872.  
  873.  # set up environment
  874. # put the include paths to search the INCLUDES variable
  875. INCLUDES="/usr/include"
  876. export INCLUDES
  877.  
  878. # if you need move C flags put them here
  879. #CFLAGS=
  880. #export CFLAGS
  881.  
  882. # This is the command the test will use to create tmp files
  883. MKTEMP="echo /tmp/t$$"
  884. export MKTEMP
  885.  
  886. cat report.t
  887. # infiles is the list of all include files in POISX 1003.1 and ANSI dec. 88
  888. for x in `cat incfiles`
  889. do
  890.     FILE=$x
  891.     for y in $INCLUDES
  892.     do
  893.         if [ -r $y/$x ]
  894.         then
  895.             ./defines $y/$x
  896.             ./struct $y/$x
  897.             ./typedef $y/$x
  898.             FILE=""
  899.             break
  900.         fi
  901.     done
  902.     if [ "$FILE" != "" ]
  903.     then 
  904. echo "--------------------------------------------------------------------------"
  905. echo "!!!!!!!!!!!!!!!!!!!!!!!!!  $FILE not found !!!!!!!!!!!!!!!!!!!!!!!!!!!!"
  906. echo "--------------------------------------------------------------------------"
  907.         echo ""
  908.     fi
  909. done
  910. @//E*O*F include/testinc//
  911. chmod u=rwx,g=rx,o=rx include/testinc
  912.  
  913. echo x - include/README
  914. sed 's/^@//' > "include/README" <<'@//E*O*F include/README//'
  915.  #
  916. #**********************************************************************
  917. # THERE MUST BE A SPACE in the first character of the first line.
  918. #**********************************************************************
  919. #
  920. #            NOTICE STATEMENT
  921. #
  922. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  923. #
  924. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  925. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  926. #
  927. #    "@(#) This code was developed by IBM Corporation. "
  928. #    "@(#) Copyright is disclaimed. "
  929. #
  930. #**********************************************************************
  931. #  Written by:  Barry Books
  932. #**********************************************************************
  933.  
  934. OVERVIEW:
  935. This test sorts thru the POSIX and ANSI include files and reports missing
  936. items, additional items in the standard, additional items allowed by the
  937. standard, and items not allowed by the standard.  References to the 
  938. standards document are included in the source code and the report.
  939.  
  940. The test assumes a traditional implementation of include files and requires
  941. two things not stated  in the POSIX  standard or the ANSI C ( Dec 1988 ).
  942. The first is the include files must be readable.  This is the case for
  943. almost all installations I know of ( even the ones with precompiled
  944. include files have readable ones also ).  The other is  
  945. the -E option to the C compiler.  This option is available on most
  946. UNIX C compilers and possibly others.  This option runs only the C
  947. preprocessor and writes the results to stdout.  If your compiler does
  948. not support this option I suggest getting one the public domain C
  949. preprocessors such as GNU.
  950.  
  951. The test makes a few assumptions about the include files.  The biggest is
  952. in order to pass the requirement that include files may be used in any
  953. order, an include file will include everything it needs to compile.  The
  954. define test finds all the defines in an include file then 
  955. writes a C program using ifdef and printf to print all the defines that 
  956. can be seen.  The typedef and struct test just use cc -E to get the structs
  957. and typedefs then parse the output.  This strategy works on AIX, System V
  958. rel 3, and BSD 4.3.  My experience is the more conforming the system the
  959. more meaningful the results.  This makes the test most useful for keeping 
  960. extra things from creeping into the include files of conforming systems.
  961.  
  962. OPERATION:
  963. The test is a bunch of shell and awk scripts which use the files in inc, structs
  964. and types as samples of what should be in the include files.  Unfortunately
  965. there are exceptions to the rules and currently these are taken care of
  966. by report.  These should be moved to an exception directory but at least
  967. they are in one file.
  968.  
  969. SETUP:
  970. If you need to search other directories add them to INCLUDES in testinc.
  971. If you need other compiler flags set CFLAGS.
  972. Put something in MKTEMP that will make tmp files.  If your system is 1003.2
  973. you can use mktemp.
  974.  
  975. RUN:
  976. To run just type ./testinc and the report goes to stdout.
  977.  
  978. PROBLEMS:
  979. Since the parser is nowhere near a full C compiler I'm sure it can be fooled.
  980.  
  981. The construct typedef thing[num]; yields incorrect results.
  982.  
  983. @//E*O*F include/README//
  984. chmod u=rw,g=r,o=r include/README
  985.  
  986. echo x - include/report
  987. sed 's/^@//' > "include/report" <<'@//E*O*F include/report//'
  988.  #
  989. #**********************************************************************
  990. # THERE MUST BE A SPACE in the first character of the first line.
  991. #**********************************************************************
  992. #
  993. #            NOTICE STATEMENT
  994. #
  995. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  996. #
  997. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  998. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  999. #
  1000. #    "@(#) This code was developed by IBM Corporation. "
  1001. #    "@(#) Copyright is disclaimed. "
  1002. #
  1003. #**********************************************************************
  1004. #  Written by:  Barry Books
  1005. #**********************************************************************
  1006.  
  1007.  # this sh script writes a report to stdout
  1008. # -d for defines
  1009. # -s for structs
  1010. # -t for typedefs
  1011.  
  1012. USAGE="usage: $0"
  1013.  
  1014. case $1 in 
  1015.     -d)
  1016. # $1 is option
  1017. # $2 include file
  1018. # $3 program
  1019.  
  1020. echo ""
  1021. echo "--------------------------------------------------------------------------"
  1022. echo "               report for include file $2"
  1023. echo "--------------------------------------------------------------------------"
  1024. echo "***************************  defines section  ****************************"
  1025. # should be -x but none in BSD
  1026. if [ -s $3 ]
  1027. then
  1028.     echo "extra        other        missing        macros"
  1029.     TMP=`$MKTEMP`
  1030. # this is what should be there
  1031.     sort inc/`basename $2 .h` | grep -v '^$' > $TMP.g
  1032. # these could be macros for functions
  1033.     sort functions | grep -v '^$' > $TMP.f
  1034. # one file could include another
  1035.     cat inc/* | sort | grep -v '^$' > $TMP.o
  1036.  
  1037. # this gives all extra stuff
  1038.     $3 | sort -u | comm -23 - $TMP.g | grep -v "^_" > $TMP.e
  1039. # this gives extra stuff not in standard
  1040.     case `basename $2`
  1041.     in
  1042.         errno.h)
  1043. # get rid of E([0-9]|[A-Z]) in errno.h as per ansi future lib directions
  1044.     cat $TMP.f $TMP.o | sort | comm  -23 $TMP.e - | grep -v "^_" | grep -v "^E[0-9]" | grep -v "^E[A-Z]" > $TMP.1
  1045.         ;;
  1046.         signal.h)
  1047. # get rid of SIG(_|[A-Z]) in errno.h as per ansi future lib directions
  1048.     cat $TMP.f $TMP.o | sort | comm  -23 $TMP.e - | grep -v "^_" | grep -v "^SIG_" | grep -v "^SIG[A-Z]" > $TMP.1
  1049.         ;;
  1050.         *)
  1051.     cat $TMP.f $TMP.o | sort | comm  -23 $TMP.e - | grep -v "^_" > $TMP.1
  1052.         ;;
  1053.     esac
  1054. # things elsewhere in standard
  1055.     comm -23 $TMP.e $TMP.1 > $TMP.t
  1056.     cat $TMP.f $TMP.o | comm -23 $TMP.t -  | sed "s/^/        /" > $TMP.2
  1057. # these are missing
  1058.     $3 | sort -u | comm -13 - $TMP.g | grep -v "^_" | sed "s/^/                /" >  $TMP.3
  1059. # macros for funtions
  1060.     comm -12 $TMP.e $TMP.f | sed "s/^/                         /" > $TMP.4
  1061.  
  1062.     cat $TMP.1 $TMP.2 $TMP.3 $TMP.4  | sort -b
  1063.  
  1064.     echo
  1065.     rm -f $TMP.*
  1066. else
  1067.     echo "!!!!!!!!!  problem compiling with $2 !!!!!!!!!"
  1068.     echo
  1069. fi
  1070. ;;
  1071.  
  1072. # structure report
  1073.     -s)
  1074. # $1 option
  1075. # $2 include file
  1076.  
  1077. echo "**************************  structure section  ***************************"
  1078. echo "extra structures        extra elements"
  1079.     TMP=`$MKTEMP`
  1080.     sort > $TMP.i
  1081. #get what should be there
  1082.     sort structs/`basename $2 .h` | grep -v '^$' > $TMP.g
  1083.     cat structs/* | sort | grep -v '^$' > $TMP.o
  1084. #difference between what should be and what is
  1085.     awk '{print $1}' $TMP.i | uniq | comm -23 - $TMP.o
  1086.  
  1087. # types ending in _t are OK (1003.1 2.6)
  1088.     join $TMP.o $TMP.i | sort | uniq | grep -v "_t$" > $TMP.t
  1089.     sort ctypes | join -j1 1 -j2 2 -o 2.1 2.2 - $TMP.t | comm -13 - $TMP.t | uniq | sed "s/^/                /"
  1090. ;;
  1091.  
  1092. # typedef report
  1093.     -t)
  1094. # $1 option
  1095. # $2 include file
  1096.  
  1097. echo "***************************  typedef section  ****************************"
  1098.     TMP=`$MKTEMP`
  1099. # sort them and save them for now
  1100.     sort > $TMP.i
  1101. # this is what should be there
  1102.     sort types/`basename $2 .h` | grep -v '^$' > $TMP.g
  1103. # one file could include another
  1104.     cat types/* | sort | grep -v '^$' > $TMP.o
  1105.  
  1106.  
  1107.     echo "extra        other        missing"
  1108.  
  1109. # this gives all extra stuff
  1110. #    types ending in _t are ok (POSIX 1003.1 2.6)
  1111.     cat $TMP.i | sort -u | comm -23 - $TMP.g > $TMP.e
  1112.  
  1113. # this gives extra stuff not in standard
  1114. #    types ending in _t are ok (POSIX 1003.1 2.6)
  1115.     cat $TMP.o | sort | comm  -23 $TMP.e - | grep -v "_t$" > $TMP.1
  1116.  
  1117. # things elsewhere in standard
  1118. #    types ending in _t are ok (POSIX 1003.1 2.6)
  1119.     comm -23 $TMP.e $TMP.1 > $TMP.t
  1120.     cat $TMP.o | comm -23 $TMP.t -  | grep -v "_t$" | sed "s/^/        /" > $TMP.2
  1121.  
  1122. # these are missing
  1123.     cat $TMP.i | sort -u | comm -13 - $TMP.g | sed "s/^/                /" >  $TMP.3
  1124.  
  1125.  
  1126.     cat $TMP.1 $TMP.2 $TMP.3 | sort -b
  1127.  
  1128. ;;
  1129.     *)
  1130. echo $USAGE
  1131. ;;
  1132. esac
  1133.  
  1134. #clean up
  1135. rm -f $TMP.c $TMP.g $TMP.i $TMP.o
  1136. @//E*O*F include/report//
  1137. chmod u=rwx,g=rx,o=rx include/report
  1138.  
  1139. echo x - include/incfiles
  1140. sed 's/^@//' > "include/incfiles" <<'@//E*O*F include/incfiles//'
  1141. assert.h
  1142. ctype.h
  1143. dirent.h
  1144. errno.h
  1145. fcntl.h
  1146. float.h
  1147. grp.h
  1148. limits.h
  1149. locale.h
  1150. math.h
  1151. pwd.h
  1152. setjmp.h
  1153. signal.h
  1154. stdarg.h
  1155. stddef.h
  1156. stdio.h
  1157. stdlib.h
  1158. string.h
  1159. sys/stat.h
  1160. sys/times.h
  1161. sys/types.h
  1162. sys/utsname.h
  1163. sys/wait.h
  1164. tar.h
  1165. termios.h
  1166. time.h
  1167. unistd.h
  1168. utime.h
  1169. @//E*O*F include/incfiles//
  1170. chmod u=rw,g=r,o=r include/incfiles
  1171.  
  1172. echo x - include/files
  1173. sed 's/^@//' > "include/files" <<'@//E*O*F include/files//'
  1174. defines
  1175. defines.awk
  1176. catinc
  1177. squash
  1178. catinc.awk
  1179. inc/dirent
  1180. inc/errno
  1181. inc/fcntl
  1182. inc/grp
  1183. inc/limits
  1184. inc/pwd
  1185. inc/signal
  1186. inc/stdio
  1187. inc/termios
  1188. inc/unistd
  1189. inc/utime
  1190. inc/stat
  1191. inc/times
  1192. inc/types
  1193. inc/utsname
  1194. inc/wait
  1195. inc/assert
  1196. inc/ctype
  1197. inc/float
  1198. inc/locale
  1199. inc/math
  1200. inc/setjmp
  1201. inc/stdarg
  1202. inc/stddef
  1203. inc/stdlib
  1204. inc/string
  1205. inc/time
  1206. inc/tar
  1207. testinc
  1208. README
  1209. report
  1210. incfiles
  1211. files
  1212. functions
  1213. @//E*O*F include/files//
  1214. chmod u=rw,g=r,o=r include/files
  1215.  
  1216. echo x - include/struct
  1217. sed 's/^@//' > "include/struct" <<'@//E*O*F include/struct//'
  1218.  #
  1219. #**********************************************************************
  1220. # THERE MUST BE A SPACE in the first character of the first line.
  1221. #**********************************************************************
  1222. #
  1223. #            NOTICE STATEMENT
  1224. #
  1225. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  1226. #
  1227. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  1228. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  1229. #
  1230. #    "@(#) This code was developed by IBM Corporation. "
  1231. #    "@(#) Copyright is disclaimed. "
  1232. #
  1233. #**********************************************************************
  1234. #  Written by:  Barry Books
  1235. #**********************************************************************
  1236.  
  1237.  #finds structure declarations in include files
  1238.  
  1239. #copy the .h to a .c for some cc commands
  1240. TMP=`$MKTEMP`
  1241. touch $TMP.c
  1242. cp $1 $TMP.c
  1243.  
  1244. #run the preprocessor with _POSIX_SOURCE defined
  1245. #change all the white space to newlines so there is one token per line
  1246. #run the awk parser to find struct defs
  1247. cc -D _POSIX_SOURCE -E $TMP.c | tr  -s "     " "\012\012" | awk -f struct.awk | awk '{ if ( NF > 1) print $0}' | ./report -s $1
  1248.  
  1249. #clean up
  1250. rm -f $TMP.c
  1251. @//E*O*F include/struct//
  1252. chmod u=rwx,g=rx,o=rx include/struct
  1253.  
  1254. echo x - include/struct.awk
  1255. sed 's/^@//' > "include/struct.awk" <<'@//E*O*F include/struct.awk//'
  1256.  #
  1257. #**********************************************************************
  1258. # THERE MUST BE A SPACE in the first character of the first line.
  1259. #**********************************************************************
  1260. #
  1261. #            NOTICE STATEMENT
  1262. #
  1263. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  1264. #
  1265. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  1266. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  1267. #
  1268. #    "@(#) This code was developed by IBM Corporation. "
  1269. #    "@(#) Copyright is disclaimed. "
  1270. #
  1271. #**********************************************************************
  1272. #  Written by:  Barry Books
  1273. #**********************************************************************
  1274.  
  1275. # this awk script is a state machine that find structure definetions
  1276. # it outputs the structure name and each element in the structure
  1277. # in the form
  1278. #NAME ELEMENT_TYPE
  1279.  
  1280. #the order of expressions to find is important
  1281.  
  1282. BEGIN {
  1283.     STRUCT=0;
  1284.     OPEN = 0;
  1285.     SEMI = 1;
  1286.     TYPEDEF = 0;
  1287. }
  1288.  
  1289. #ignore a few keywords
  1290. /unsigned/    {
  1291.     next;
  1292.     }
  1293.  
  1294. /extern/    {
  1295.     next;
  1296.     }
  1297.  
  1298. /signed/    {
  1299.     next;
  1300.     }
  1301.  
  1302. #braces signal begining structure elements
  1303. /{/    {
  1304.         OPEN += 1;
  1305.         SEMI = 1;
  1306.         next;
  1307.     }
  1308.  
  1309. /}/    {
  1310.         OPEN -= 1;
  1311.         next;
  1312.     }
  1313.  
  1314. #semi colon signals end of statement
  1315. #now we can look for a struct
  1316. /;/    {
  1317.         SEMI = 1;
  1318.         next;
  1319.     }
  1320.  
  1321. # this matches anything
  1322. #typedefs look like structures so weed them out
  1323. # if struct == 1 just print the name of the structure
  1324. # if struct == 2 print the name and the element type
  1325. /^/    {
  1326.         if ( TYPEDEF == 1 )
  1327.         {
  1328.             if ( OPEN == 0 )
  1329.             {
  1330.                 if ( SEMI == 1 )
  1331.                     SEMI = 0;
  1332.                     TYPEDEF = 0;
  1333.             }
  1334.             next;
  1335.         }
  1336.         if ( STRUCT == 1 )
  1337.         {
  1338.             printf("%s\n",$1);
  1339.             STRUCT = 2;
  1340.             NAME = $1;
  1341.             next;
  1342.         }
  1343.         if ( STRUCT == 2 )
  1344.         {
  1345.             if ( OPEN == 1 )
  1346.             {
  1347.                 if ( SEMI == 1 )
  1348.                 {
  1349.                     printf("%s %s\n",NAME,$1);
  1350.                     SEMI = 0;
  1351.                 }
  1352.                 
  1353.             }
  1354.             if ( OPEN == 0 )
  1355.             {
  1356.                 STRUCT = 0;
  1357.             }
  1358.         }
  1359.     }
  1360.  
  1361. # set flags for keywords
  1362. /typedef/    {
  1363.     TYPEDEF=1;
  1364.     next;
  1365.     }
  1366.  
  1367. /struct/    {
  1368.     STRUCT=1;
  1369.     next;
  1370.     }
  1371.  
  1372.  
  1373. @//E*O*F include/struct.awk//
  1374. chmod u=rw,g=r,o=r include/struct.awk
  1375.  
  1376. echo x - include/functions
  1377. sed 's/^@//' > "include/functions" <<'@//E*O*F include/functions//'
  1378. assert
  1379. isalnum
  1380. isalpha
  1381. iscntrl
  1382. isdigit
  1383. isgraph
  1384. islower
  1385. isprint
  1386. ispunct
  1387. isspace
  1388. isupper
  1389. isxdigit
  1390. tolower
  1391. toupper
  1392. setlocale
  1393. localeconv
  1394. acos
  1395. asin
  1396. atan
  1397. atan2
  1398. cos
  1399. sin
  1400. tan
  1401. cosh
  1402. sinh
  1403. tanh
  1404. exp
  1405. frexp
  1406. lsexp
  1407. log
  1408. log10
  1409. modf
  1410. pow
  1411. sqrt
  1412. ceil
  1413. fabs
  1414. floor
  1415. fmod
  1416. setjmp
  1417. longjmp
  1418. signal
  1419. raise
  1420. va_start
  1421. va_arg
  1422. va_end
  1423. remove
  1424. rename
  1425. tmpfile
  1426. tmpnam
  1427. fclose
  1428. fflush
  1429. fopen
  1430. freopen
  1431. setbuf
  1432. setvbuf
  1433. fprintf
  1434. fscanf
  1435. printf
  1436. scanf
  1437. sprinf
  1438. sscanf
  1439. vfprintf
  1440. vprintf
  1441. vsprintf
  1442. fgetc
  1443. fgets
  1444. fputc
  1445. fputs
  1446. getc
  1447. getchar
  1448. gets
  1449. putc
  1450. putchar
  1451. puts
  1452. ungetc
  1453. fread
  1454. fwrite
  1455. fgetpos
  1456. fseek
  1457. fsetpos
  1458. ftell
  1459. rewind
  1460. clearerr
  1461. feof
  1462. ferror
  1463. perror
  1464. atof
  1465. atoi
  1466. atol
  1467. strtod
  1468. strtol
  1469. strtoul
  1470. rand
  1471. srand
  1472. calloc
  1473. free
  1474. malloc
  1475. realloc
  1476. abort
  1477. atexit
  1478. exit
  1479. getenv
  1480. systems
  1481. bsearch
  1482. qsort
  1483. abs
  1484. div
  1485. labs
  1486. ldiv
  1487. mblen
  1488. mbtowc
  1489. wctomb
  1490. mbstowcs
  1491. wcstombs
  1492. memcpy
  1493. memmove
  1494. strcpy
  1495. strncpy
  1496. strcat
  1497. strncat
  1498. memcmp
  1499. strcmp
  1500. strcol
  1501. strncmp
  1502. strxfrm
  1503. memchr
  1504. strchr
  1505. strcspan
  1506. strpbrk
  1507. strrchr
  1508. strspn
  1509. strstr
  1510. strtok
  1511. memset
  1512. strerror
  1513. strlen
  1514. clock
  1515. difftime
  1516. mktime
  1517. time
  1518. asctime
  1519. ctime
  1520. gmtive
  1521. lcoaltime
  1522. strftime
  1523. access
  1524. alarm
  1525. asctime
  1526. cfgetispeed
  1527. cfgetospeed
  1528. cfsetispeed
  1529. cfsetospeed
  1530. chdir
  1531. chmod
  1532. chown
  1533. close
  1534. closedir
  1535. creat
  1536. ctermid
  1537. cuserid
  1538. dup
  1539. dup2
  1540. execl
  1541. execle
  1542. execlp
  1543. execv
  1544. execve
  1545. execvp
  1546. _exit
  1547. fcntl
  1548. fdopen
  1549. fileno
  1550. fork
  1551. fpathconf
  1552. fstat
  1553. getcwd
  1554. getegid
  1555. getenv
  1556. geteuid
  1557. getgid
  1558. getgrgid
  1559. getgrnam
  1560. getgroups
  1561. getlogin
  1562. getpgrp
  1563. getpid
  1564. getppid
  1565. getpwnam
  1566. getpwuid
  1567. getuid
  1568. isatty
  1569. kill
  1570. link
  1571. lingjmp
  1572. lseek
  1573. mkdir
  1574. mkfifo
  1575. open
  1576. opendir
  1577. pathconf
  1578. pause
  1579. pipe
  1580. read
  1581. readdir
  1582. rename
  1583. rewinddir
  1584. rmdir
  1585. setgid
  1586. setjmp
  1587. setlocale
  1588. setpgid
  1589. setsid
  1590. setuid
  1591. sigaction
  1592. sigaddset
  1593. sigdelset
  1594. sigemptyset
  1595. sigfillset
  1596. sigismember
  1597. siglongjmp
  1598. sigpending
  1599. sigprocmask
  1600. sigsetjmp
  1601. sigsuspend
  1602. sleep
  1603. stat
  1604. sysconf
  1605. tcdrain
  1606. tcflow
  1607. tcflush
  1608. tcgetattr
  1609. tcgetpgrp
  1610. time
  1611. times
  1612. ttyname
  1613. tzset
  1614. umask
  1615. uname
  1616. unlink
  1617. utime
  1618. wait
  1619. waitpid
  1620. write
  1621.  
  1622. S_ISDIR
  1623. S_ISCHR
  1624. S_ISBLK
  1625. S_ISREG
  1626. S_ISFIFO
  1627. WIFEXITED
  1628. WEXITSTATUS
  1629. WIFSIGNALED
  1630. WTERMSIG
  1631. WIFSTOPPED
  1632. WSTOPSIG
  1633. @//E*O*F include/functions//
  1634. chmod u=rw,g=r,o=r include/functions
  1635.  
  1636. echo mkdir - include/structs
  1637. mkdir include/structs
  1638. chmod u=rwx,g=rx,o=rx include/structs
  1639.  
  1640. echo x - include/structs/assert
  1641. sed 's/^@//' > "include/structs/assert" <<'@//E*O*F include/structs/assert//'
  1642. @//E*O*F include/structs/assert//
  1643. chmod u=rw,g=r,o=r include/structs/assert
  1644.  
  1645. echo x - include/structs/ctype
  1646. sed 's/^@//' > "include/structs/ctype" <<'@//E*O*F include/structs/ctype//'
  1647. @//E*O*F include/structs/ctype//
  1648. chmod u=rw,g=r,o=r include/structs/ctype
  1649.  
  1650. echo x - include/structs/dirent
  1651. sed 's/^@//' > "include/structs/dirent" <<'@//E*O*F include/structs/dirent//'
  1652. dirent
  1653. @//E*O*F include/structs/dirent//
  1654. chmod u=rw,g=r,o=r include/structs/dirent
  1655.  
  1656. echo x - include/structs/errno
  1657. sed 's/^@//' > "include/structs/errno" <<'@//E*O*F include/structs/errno//'
  1658. @//E*O*F include/structs/errno//
  1659. chmod u=rw,g=r,o=r include/structs/errno
  1660.  
  1661. echo x - include/structs/fcntl
  1662. sed 's/^@//' > "include/structs/fcntl" <<'@//E*O*F include/structs/fcntl//'
  1663. flock
  1664. @//E*O*F include/structs/fcntl//
  1665. chmod u=rw,g=r,o=r include/structs/fcntl
  1666.  
  1667. echo x - include/structs/float
  1668. sed 's/^@//' > "include/structs/float" <<'@//E*O*F include/structs/float//'
  1669. @//E*O*F include/structs/float//
  1670. chmod u=rw,g=r,o=r include/structs/float
  1671.  
  1672. echo x - include/structs/grp
  1673. sed 's/^@//' > "include/structs/grp" <<'@//E*O*F include/structs/grp//'
  1674. @//E*O*F include/structs/grp//
  1675. chmod u=rw,g=r,o=r include/structs/grp
  1676.  
  1677. echo x - include/structs/limits
  1678. sed 's/^@//' > "include/structs/limits" <<'@//E*O*F include/structs/limits//'
  1679. @//E*O*F include/structs/limits//
  1680. chmod u=rw,g=r,o=r include/structs/limits
  1681.  
  1682. echo x - include/structs/locale
  1683. sed 's/^@//' > "include/structs/locale" <<'@//E*O*F include/structs/locale//'
  1684. @//E*O*F include/structs/locale//
  1685. chmod u=rw,g=r,o=r include/structs/locale
  1686.  
  1687. echo x - include/structs/math
  1688. sed 's/^@//' > "include/structs/math" <<'@//E*O*F include/structs/math//'
  1689. @//E*O*F include/structs/math//
  1690. chmod u=rw,g=r,o=r include/structs/math
  1691.  
  1692. echo x - include/structs/pwd
  1693. sed 's/^@//' > "include/structs/pwd" <<'@//E*O*F include/structs/pwd//'
  1694. @//E*O*F include/structs/pwd//
  1695. chmod u=rw,g=r,o=r include/structs/pwd
  1696.  
  1697. echo x - include/structs/setjmp
  1698. sed 's/^@//' > "include/structs/setjmp" <<'@//E*O*F include/structs/setjmp//'
  1699. @//E*O*F include/structs/setjmp//
  1700. chmod u=rw,g=r,o=r include/structs/setjmp
  1701.  
  1702. echo x - include/structs/signal
  1703. sed 's/^@//' > "include/structs/signal" <<'@//E*O*F include/structs/signal//'
  1704. sigset
  1705. sigaction
  1706.  
  1707. @//E*O*F include/structs/signal//
  1708. chmod u=rw,g=r,o=r include/structs/signal
  1709.  
  1710. echo x - include/structs/stat
  1711. sed 's/^@//' > "include/structs/stat" <<'@//E*O*F include/structs/stat//'
  1712. stat
  1713. @//E*O*F include/structs/stat//
  1714. chmod u=rw,g=r,o=r include/structs/stat
  1715.  
  1716. echo x - include/structs/stdarg
  1717. sed 's/^@//' > "include/structs/stdarg" <<'@//E*O*F include/structs/stdarg//'
  1718. @//E*O*F include/structs/stdarg//
  1719. chmod u=rw,g=r,o=r include/structs/stdarg
  1720.  
  1721. echo x - include/structs/stddef
  1722. sed 's/^@//' > "include/structs/stddef" <<'@//E*O*F include/structs/stddef//'
  1723. @//E*O*F include/structs/stddef//
  1724. chmod u=rw,g=r,o=r include/structs/stddef
  1725.  
  1726. echo x - include/structs/stdio
  1727. sed 's/^@//' > "include/structs/stdio" <<'@//E*O*F include/structs/stdio//'
  1728. @//E*O*F include/structs/stdio//
  1729. chmod u=rw,g=r,o=r include/structs/stdio
  1730.  
  1731. echo x - include/structs/stdlib
  1732. sed 's/^@//' > "include/structs/stdlib" <<'@//E*O*F include/structs/stdlib//'
  1733. @//E*O*F include/structs/stdlib//
  1734. chmod u=rw,g=r,o=r include/structs/stdlib
  1735.  
  1736. echo x - include/structs/string
  1737. sed 's/^@//' > "include/structs/string" <<'@//E*O*F include/structs/string//'
  1738. @//E*O*F include/structs/string//
  1739. chmod u=rw,g=r,o=r include/structs/string
  1740.  
  1741. echo x - include/structs/tar
  1742. sed 's/^@//' > "include/structs/tar" <<'@//E*O*F include/structs/tar//'
  1743. @//E*O*F include/structs/tar//
  1744. chmod u=rw,g=r,o=r include/structs/tar
  1745.  
  1746. echo x - include/structs/termios
  1747. sed 's/^@//' > "include/structs/termios" <<'@//E*O*F include/structs/termios//'
  1748. termios
  1749. @//E*O*F include/structs/termios//
  1750. chmod u=rw,g=r,o=r include/structs/termios
  1751.  
  1752. echo x - include/structs/time
  1753. sed 's/^@//' > "include/structs/time" <<'@//E*O*F include/structs/time//'
  1754. tm
  1755. @//E*O*F include/structs/time//
  1756. chmod u=rw,g=r,o=r include/structs/time
  1757.  
  1758. echo x - include/structs/times
  1759. sed 's/^@//' > "include/structs/times" <<'@//E*O*F include/structs/times//'
  1760. tms
  1761. @//E*O*F include/structs/times//
  1762. chmod u=rw,g=r,o=r include/structs/times
  1763.  
  1764. echo x - include/structs/types
  1765. sed 's/^@//' > "include/structs/types" <<'@//E*O*F include/structs/types//'
  1766. @//E*O*F include/structs/types//
  1767. chmod u=rw,g=r,o=r include/structs/types
  1768.  
  1769. echo x - include/structs/unistd
  1770. sed 's/^@//' > "include/structs/unistd" <<'@//E*O*F include/structs/unistd//'
  1771. @//E*O*F include/structs/unistd//
  1772. chmod u=rw,g=r,o=r include/structs/unistd
  1773.  
  1774. echo x - include/structs/utime
  1775. sed 's/^@//' > "include/structs/utime" <<'@//E*O*F include/structs/utime//'
  1776. utimbuf
  1777. @//E*O*F include/structs/utime//
  1778. chmod u=rw,g=r,o=r include/structs/utime
  1779.  
  1780. echo x - include/structs/utsname
  1781. sed 's/^@//' > "include/structs/utsname" <<'@//E*O*F include/structs/utsname//'
  1782. utsname
  1783. @//E*O*F include/structs/utsname//
  1784. chmod u=rw,g=r,o=r include/structs/utsname
  1785.  
  1786. echo x - include/structs/wait
  1787. sed 's/^@//' > "include/structs/wait" <<'@//E*O*F include/structs/wait//'
  1788. @//E*O*F include/structs/wait//
  1789. chmod u=rw,g=r,o=r include/structs/wait
  1790.  
  1791. echo x - include/structs/grp.h
  1792. sed 's/^@//' > "include/structs/grp.h" <<'@//E*O*F include/structs/grp.h//'
  1793. group
  1794. @//E*O*F include/structs/grp.h//
  1795. chmod u=rw,g=r,o=r include/structs/grp.h
  1796.  
  1797. echo x - include/structs/locale.h
  1798. sed 's/^@//' > "include/structs/locale.h" <<'@//E*O*F include/structs/locale.h//'
  1799. lconv
  1800.  
  1801. @//E*O*F include/structs/locale.h//
  1802. chmod u=rw,g=r,o=r include/structs/locale.h
  1803.  
  1804. echo x - include/structs/pwd.c
  1805. sed 's/^@//' > "include/structs/pwd.c" <<'@//E*O*F include/structs/pwd.c//'
  1806. passwd
  1807. @//E*O*F include/structs/pwd.c//
  1808. chmod u=rw,g=r,o=r include/structs/pwd.c
  1809.  
  1810. echo x - include/structs/stdlib.h
  1811. sed 's/^@//' > "include/structs/stdlib.h" <<'@//E*O*F include/structs/stdlib.h//'
  1812. div_t
  1813. ldiv_t
  1814. @//E*O*F include/structs/stdlib.h//
  1815. chmod u=rw,g=r,o=r include/structs/stdlib.h
  1816.  
  1817. echo x - include/report.str.awk
  1818. sed 's/^@//' > "include/report.str.awk" <<'@//E*O*F include/report.str.awk//'
  1819.  #
  1820. #**********************************************************************
  1821. # THERE MUST BE A SPACE in the first character of the first line.
  1822. #**********************************************************************
  1823. #
  1824. #            NOTICE STATEMENT
  1825. #
  1826. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  1827. #
  1828. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  1829. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  1830. #
  1831. #    "@(#) This code was developed by IBM Corporation. "
  1832. #    "@(#) Copyright is disclaimed. "
  1833. #
  1834. #**********************************************************************
  1835. #  Written by:  Barry Books
  1836. #**********************************************************************
  1837.  
  1838. # just ignore these
  1839. /    char/    { next; }
  1840. /    const/    { next; }
  1841. /    double/    { next; }
  1842. /    float/    { next; }
  1843. /    int/    { next; }
  1844. /    long/    { next; }
  1845. /    short/    { next; }
  1846. /    signed/    { next; }
  1847. /    unsigned/    { next; }
  1848. /    void/    { next; }
  1849.  
  1850. # this is a structure name
  1851. $1 ~ /^\t/    {
  1852.     }
  1853. @//E*O*F include/report.str.awk//
  1854. chmod u=rw,g=r,o=r include/report.str.awk
  1855.  
  1856. echo x - include/struct1.awk
  1857. sed 's/^@//' > "include/struct1.awk" <<'@//E*O*F include/struct1.awk//'
  1858.  #
  1859. #**********************************************************************
  1860. # THERE MUST BE A SPACE in the first character of the first line.
  1861. #**********************************************************************
  1862. #
  1863. #            NOTICE STATEMENT
  1864. #
  1865. # This code was developed by IBM Corporation.  Copyright is disclaimed.
  1866. #
  1867. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS CODE.  IN NO EVENT
  1868. # WILL IBM BE LIABLE FOR ANY DAMAGES, LOST PROFITS, OR LOST SAVINGS.
  1869. #
  1870. #    "@(#) This code was developed by IBM Corporation. "
  1871. #    "@(#) Copyright is disclaimed. "
  1872. #
  1873. #**********************************************************************
  1874. #  Written by:  Barry Books
  1875. #**********************************************************************
  1876.  
  1877. # this awk script strips off C types and typedefs ending in _t
  1878.  
  1879.  
  1880.  
  1881. # regular C types
  1882. $2 ~ /^char$/    { next; }
  1883. $2 ~ /^const$/    { next; }
  1884. $2 ~ /^double$/    { next; }
  1885. $2 ~ /^float$/    { next; }
  1886. $2 ~ /^int$/    { next; }
  1887. $2 ~ /^long$/    { next; }
  1888. $2 ~ /^short$/    { next; }
  1889. $2 ~ /^signed$/    { next; }
  1890. $2 ~ /^unsigned$/    { next; }
  1891. $2 ~ /^void$/    { next; }
  1892.  
  1893. # additional ansi types
  1894.  
  1895. # additional posix types
  1896.  
  1897. # posix says _t is ok
  1898. $2 ~ /.*_t/    { next; }
  1899.  
  1900. /^/ { print $0 }
  1901. @//E*O*F include/struct1.awk//
  1902. chmod u=rw,g=r,o=r include/struct1.awk
  1903.  
  1904. echo mkdir - include/types
  1905. mkdir include/types
  1906. chmod u=rwx,g=rx,o=rx include/types
  1907.  
  1908. echo x - include/types/assert
  1909. sed 's/^@//' > "include/types/assert" <<'@//E*O*F include/types/assert//'
  1910.  
  1911. @//E*O*F include/types/assert//
  1912. chmod u=rw,g=r,o=r include/types/assert
  1913.  
  1914. echo x - include/types/ctype
  1915. sed 's/^@//' > "include/types/ctype" <<'@//E*O*F include/types/ctype//'
  1916.  
  1917. @//E*O*F include/types/ctype//
  1918. chmod u=rw,g=r,o=r include/types/ctype
  1919.  
  1920. echo x - include/types/dirent
  1921. sed 's/^@//' > "include/types/dirent" <<'@//E*O*F include/types/dirent//'
  1922. DIR
  1923. @//E*O*F include/types/dirent//
  1924. chmod u=rw,g=r,o=r include/types/dirent
  1925.  
  1926. echo x - include/types/errno
  1927. sed 's/^@//' > "include/types/errno" <<'@//E*O*F include/types/errno//'
  1928.  
  1929. @//E*O*F include/types/errno//
  1930. chmod u=rw,g=r,o=r include/types/errno
  1931.  
  1932. echo x - include/types/fcntl
  1933. sed 's/^@//' > "include/types/fcntl" <<'@//E*O*F include/types/fcntl//'
  1934.  
  1935. @//E*O*F include/types/fcntl//
  1936. chmod u=rw,g=r,o=r include/types/fcntl
  1937.  
  1938. echo x - include/types/float
  1939. sed 's/^@//' > "include/types/float" <<'@//E*O*F include/types/float//'
  1940.  
  1941. @//E*O*F include/types/float//
  1942. chmod u=rw,g=r,o=r include/types/float
  1943.  
  1944. echo x - include/types/grp
  1945. sed 's/^@//' > "include/types/grp" <<'@//E*O*F include/types/grp//'
  1946.  
  1947. @//E*O*F include/types/grp//
  1948. chmod u=rw,g=r,o=r include/types/grp
  1949.  
  1950. echo x - include/types/limits
  1951. sed 's/^@//' > "include/types/limits" <<'@//E*O*F include/types/limits//'
  1952.  
  1953. @//E*O*F include/types/limits//
  1954. chmod u=rw,g=r,o=r include/types/limits
  1955.  
  1956. echo x - include/types/locale
  1957. sed 's/^@//' > "include/types/locale" <<'@//E*O*F include/types/locale//'
  1958.  
  1959. @//E*O*F include/types/locale//
  1960. chmod u=rw,g=r,o=r include/types/locale
  1961.  
  1962. echo x - include/types/math
  1963. sed 's/^@//' > "include/types/math" <<'@//E*O*F include/types/math//'
  1964.  
  1965. @//E*O*F include/types/math//
  1966. chmod u=rw,g=r,o=r include/types/math
  1967.  
  1968. echo x - include/types/pwd
  1969. sed 's/^@//' > "include/types/pwd" <<'@//E*O*F include/types/pwd//'
  1970.  
  1971. @//E*O*F include/types/pwd//
  1972. chmod u=rw,g=r,o=r include/types/pwd
  1973.  
  1974. echo x - include/types/setjmp
  1975. sed 's/^@//' > "include/types/setjmp" <<'@//E*O*F include/types/setjmp//'
  1976. jmp_buf
  1977. sigjmp_buf
  1978. @//E*O*F include/types/setjmp//
  1979. chmod u=rw,g=r,o=r include/types/setjmp
  1980.  
  1981. echo x - include/types/signal
  1982. sed 's/^@//' > "include/types/signal" <<'@//E*O*F include/types/signal//'
  1983. sigset_t
  1984. sig_atomic_t
  1985. @//E*O*F include/types/signal//
  1986. chmod u=rw,g=r,o=r include/types/signal
  1987.  
  1988. echo x - include/types/stat
  1989. sed 's/^@//' > "include/types/stat" <<'@//E*O*F include/types/stat//'
  1990.  
  1991. @//E*O*F include/types/stat//
  1992. chmod u=rw,g=r,o=r include/types/stat
  1993.  
  1994. echo x - include/types/stdarg
  1995. sed 's/^@//' > "include/types/stdarg" <<'@//E*O*F include/types/stdarg//'
  1996. va_list
  1997. @//E*O*F include/types/stdarg//
  1998. chmod u=rw,g=r,o=r include/types/stdarg
  1999.  
  2000. echo x - include/types/stddef
  2001. sed 's/^@//' > "include/types/stddef" <<'@//E*O*F include/types/stddef//'
  2002. ptrdiff_t
  2003. size_t
  2004. wchar_t
  2005. @//E*O*F include/types/stddef//
  2006. chmod u=rw,g=r,o=r include/types/stddef
  2007.  
  2008. echo x - include/types/stdio
  2009. sed 's/^@//' > "include/types/stdio" <<'@//E*O*F include/types/stdio//'
  2010. FILE
  2011. fpos_t
  2012. @//E*O*F include/types/stdio//
  2013. chmod u=rw,g=r,o=r include/types/stdio
  2014.  
  2015. echo x - include/types/stdlib
  2016. sed 's/^@//' > "include/types/stdlib" <<'@//E*O*F include/types/stdlib//'
  2017. size_t
  2018. fpos_t
  2019. div_t
  2020. ldiv_t
  2021. @//E*O*F include/types/stdlib//
  2022. chmod u=rw,g=r,o=r include/types/stdlib
  2023.  
  2024. echo x - include/types/string
  2025. sed 's/^@//' > "include/types/string" <<'@//E*O*F include/types/string//'
  2026. size_t
  2027. @//E*O*F include/types/string//
  2028. chmod u=rw,g=r,o=r include/types/string
  2029.  
  2030. echo x - include/types/tar
  2031. sed 's/^@//' > "include/types/tar" <<'@//E*O*F include/types/tar//'
  2032.  
  2033. @//E*O*F include/types/tar//
  2034. chmod u=rw,g=r,o=r include/types/tar
  2035.  
  2036. echo x - include/types/termios
  2037. sed 's/^@//' > "include/types/termios" <<'@//E*O*F include/types/termios//'
  2038. tc_flag_t
  2039. cc_t
  2040. speed_t
  2041. @//E*O*F include/types/termios//
  2042. chmod u=rw,g=r,o=r include/types/termios
  2043.  
  2044. echo x - include/types/time
  2045. sed 's/^@//' > "include/types/time" <<'@//E*O*F include/types/time//'
  2046. size_t
  2047. time_t
  2048. @//E*O*F include/types/time//
  2049. chmod u=rw,g=r,o=r include/types/time
  2050.  
  2051. echo x - include/types/times
  2052. sed 's/^@//' > "include/types/times" <<'@//E*O*F include/types/times//'
  2053. clock_t
  2054. @//E*O*F include/types/times//
  2055. chmod u=rw,g=r,o=r include/types/times
  2056.  
  2057. echo x - include/types/types
  2058. sed 's/^@//' > "include/types/types" <<'@//E*O*F include/types/types//'
  2059. clock_t
  2060. dev_t
  2061. gid_t
  2062. ino_t
  2063. mode_t
  2064. nlink_t
  2065. off_t
  2066. pid_t
  2067. size_t
  2068. time_t
  2069. uid_t
  2070. @//E*O*F include/types/types//
  2071. chmod u=rw,g=r,o=r include/types/types
  2072.  
  2073. echo x - include/types/unistd
  2074. sed 's/^@//' > "include/types/unistd" <<'@//E*O*F include/types/unistd//'
  2075.  
  2076. @//E*O*F include/types/unistd//
  2077. chmod u=rw,g=r,o=r include/types/unistd
  2078.  
  2079. echo x - include/types/utime
  2080. sed 's/^@//' > "include/types/utime" <<'@//E*O*F include/types/utime//'
  2081.  
  2082. @//E*O*F include/types/utime//
  2083. chmod u=rw,g=r,o=r include/types/utime
  2084.  
  2085. echo x - include/types/utsname
  2086. sed 's/^@//' > "include/types/utsname" <<'@//E*O*F include/types/utsname//'
  2087.  
  2088. @//E*O*F include/types/utsname//
  2089. chmod u=rw,g=r,o=r include/types/utsname
  2090.  
  2091. echo x - include/types/wait
  2092. sed 's/^@//' > "include/types/wait" <<'@//E*O*F include/types/wait//'
  2093.  
  2094. @//E*O*
  2095.