home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / gnu / rcs5ap1s.lzh / RCS5AP1S / CONF.SH < prev    next >
Linux/UNIX/POSIX Shell Script  |  1991-01-10  |  16KB  |  707 lines

  1. #!/bin/sh
  2. # Output RCS compile-time configuration.
  3. Id='$Id: conf.sh,v 5.6 90/11/01 05:03:28 eggert Exp $'
  4. #    Copyright 1990 by Paul Eggert
  5. #    Distributed under license by the Free Software Foundation, Inc.
  6.  
  7. # This file is part of RCS.
  8. #
  9. # RCS is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; either version 1, or (at your option)
  12. # any later version.
  13. #
  14. # RCS is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. # GNU General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License
  20. # along with RCS; see the file COPYING.  If not, write to
  21. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  22. #
  23. # Report problems and direct all questions to:
  24. #
  25. #     rcs-bugs@cs.purdue.edu
  26.  
  27.  
  28. # Direct standard output to "a.h"; later parts of this procedure need it.
  29. # Standard error can be ignored if a.h is OK,
  30. # and can be inspected for clues otherwise.
  31. exec >a.h || exit
  32.  
  33. # The Makefile overrides the following defaults.
  34. : ${C='cc -O'}
  35. : ${COMPAT2=0}
  36. : ${DIFF_FLAGS=-an}
  37. : ${DIFF_L=1}
  38. : ${RCSPREFIX=/usr/local/bin/}
  39. : ${SENDMAIL=/usr/lib/sendmail}
  40. : ${L=}
  41. : ${DIFF=${RCSPREFIX}diff}
  42.  
  43.  
  44. cat <<EOF || exit
  45. /* RCS compile-time configuration */
  46.  
  47.     /* $Id */
  48.  
  49. /*
  50.  * This file is generated automatically.
  51.  * If you edit it by hand your changes may be lost.
  52.  * Instead, please try to fix conf.sh,
  53.  * and send your fixes to rcs-bugs@cs.purdue.edu.
  54.  */
  55.  
  56. EOF
  57.  
  58. : exitmain
  59. cat >a.c <<EOF && $C a.c $L >&2 || exit
  60. #include "a.h"
  61. int main(argc,argv) int argc; char **argv; { return argc-1; }
  62. EOF
  63. e='(n) ? (exit(n),(n)) : (n) /* lint fodder */'
  64. if ./a.out -
  65. then :
  66. elif ./a.out
  67. then e=n
  68. fi
  69. echo "#define exitmain(n) return $e /* how to exit from main() */"
  70.  
  71. : standard includes
  72. standardIncludes=
  73. for h in stdio sys/types sys/stat fcntl limits stdlib string unistd vfork
  74. do
  75.     cat >a.c <<EOF || exit
  76. #include "a.h"
  77. $standardIncludes
  78. #include <$h.h>
  79. int main(){ exitmain(0); }
  80. EOF
  81.     if ($C a.c $L && ./a.out) >&2
  82.     then i="#    include <$h.h>"
  83.     else
  84.         case $h in
  85.         string)
  86.             i='#    include <strings.h>';;
  87.         *)
  88.             i="    /* #include <$h.h> does not work.  */"
  89.         esac
  90.     fi || exit
  91.     standardIncludes="$standardIncludes
  92. $i"
  93. done
  94.  
  95. cat <<EOF || exit
  96. #if !MAKEDEPEND$standardIncludes
  97. #endif /* !MAKEDEPEND */
  98. EOF
  99.  
  100. # has_sys_*_h
  101. for H in dir param wait
  102. do
  103.     : has_sys_${H}_h
  104.     cat >a.c <<EOF || exit
  105. #include "a.h"
  106. #include <sys/$H.h>
  107. int main() { exitmain(0); }
  108. EOF
  109.     if ($C a.c $L && ./a.out) >&2
  110.     then h=1
  111.     else h=0
  112.     fi
  113.     echo "#define has_sys_${H}_h $h /* Does #include <sys/$H.h> work?  */"
  114. done
  115.  
  116. : const, volatile
  117. for i in const volatile
  118. do
  119.     cat >a.c <<EOF || exit
  120. #    include "a.h"
  121.     $i int * $i * zero;
  122. EOF
  123.     if $C -S a.c >&2
  124.     then echo "/* #define $i */ /* The '$i' keyword works.  */"
  125.     else echo "#define $i /* The '$i' keyword does not work.  */"
  126.     fi
  127. done
  128.  
  129. # *_t
  130. cat >a.c <<'EOF' || exit
  131. #include "a.h"
  132. #include <signal.h>
  133. t x;
  134. EOF
  135. for t in gid_t mode_t pid_t sig_atomic_t size_t time_t uid_t
  136. do
  137.     : $t
  138.     case $t in
  139.     time_t) i=long;;
  140.     *) i=int;;
  141.     esac
  142.     if $C -S -Dt=$t a.c >&2
  143.     then echo "/* typedef $i $t; */ /* Standard headers define $t.  */"
  144.     else echo "typedef $i $t; /* Standard headers do not define $t.  */"
  145.     fi
  146. done
  147.  
  148. : has_prototypes
  149. cat >a.c <<'EOF' || exit
  150. #include "a.h"
  151. int main(int, char**);
  152. int main(int argc, char **argv) { exitmain(!argv[argc-1]); }
  153. EOF
  154. if $C -S a.c >&2
  155. then h=1
  156. else h=0
  157. fi
  158. cat <<EOF
  159. #define has_prototypes $h /* Do function prototypes work?  */
  160. #if has_prototypes
  161. #    define P(params) params
  162. #    if !MAKEDEPEND
  163. #        include <stdarg.h>
  164. #    endif
  165. #    define vararg_start(ap,p) va_start(ap,p)
  166. #else
  167. #    define P(params) ()
  168. #    if !MAKEDEPEND
  169. #        include <varargs.h>
  170. #    endif
  171. #    define vararg_start(ap,p) va_start(ap)
  172. #endif
  173. EOF
  174.  
  175. : has_getuid
  176. cat >a.c <<'EOF' || exit
  177. #include "a.h"
  178. #ifndef getuid
  179.     uid_t getuid();
  180. #endif
  181. int main() { exitmain(getuid()!=getuid()); }
  182. EOF
  183. if ($C a.c $L && ./a.out) >&2
  184. then h=1
  185. else h=0
  186. fi
  187. echo "#define has_getuid $h /* Does getuid() work?  */"
  188.  
  189. : declare_getpwuid
  190. cat >a.c <<'EOF' || exit
  191. #include "a.h"
  192. #include <pwd.h>
  193. d
  194. int main() { exitmain(!getpwuid(0)); }
  195. EOF
  196. D='struct passwd *getpwuid P((uid_t));'
  197. if ($C -Dd="$D" a.c $L && ./a.out) >&2
  198. then define="#define declare_getpwuid $D"
  199. elif ($C -Dd= a.c $L && ./a.out) >&2
  200. then define="#define declare_getpwuid /* $D */"
  201. else define="/* #define declare_getpwuid $D */"
  202. fi
  203. echo "$define"
  204.  
  205. : has_rename, bad_rename
  206. cat >a.c <<'EOF' && rm -f a.d || exit
  207. #include "a.h"
  208. #ifndef rename
  209.     int rename();
  210. #endif
  211. int main() { exitmain(rename("a.c","a.d")); }
  212. EOF
  213. if ($C a.c $L && ./a.out && test -f a.d) >&2
  214. then
  215.     h=1
  216.     echo x >a.c
  217.     if ./a.out && test ! -f a.c -a -f a.d
  218.     then b=0
  219.     else b=1
  220.     fi
  221. else h=0 b=0
  222. fi
  223. echo "#define has_rename $h /* Does rename() work?  */"
  224. echo "#define bad_rename $b /* Does rename(A,B) fail if B exists?  */"
  225.  
  226. : void, VOID
  227. cat >a.c <<'EOF' || exit
  228. #include "a.h"
  229. void f() {}
  230. int main() {f(); exitmain(0);}
  231. EOF
  232. if $C -S a.c >&2
  233. then
  234.     v='(void) '
  235. else
  236.     v=
  237.     echo 'typedef int void;'
  238. fi
  239. echo "#define VOID $v/* 'VOID e;' discards the value of an expression 'e'.  */"
  240.  
  241. : signal_type, sig_zaps_handler
  242. cat >a.c <<'EOF' || exit
  243. #include "a.h"
  244. #include <signal.h>
  245. #ifndef getpid
  246.     pid_t getpid();
  247. #endif
  248. #ifndef kill
  249.     int kill();
  250. #endif
  251. #ifndef signal
  252.     signal_type (*signal P((int,signal_type(*)P((int)))))P((int));
  253. #endif
  254. signal_type nothing(i) int i; {}
  255. int main(argc, argv) int argc; char **argv;
  256. {
  257.     signal(SIGINT, nothing);
  258.     while (--argc)
  259.         kill(getpid(), SIGINT);
  260.     exitmain(0);
  261. }
  262. EOF
  263. for signal_type in void int bad
  264. do
  265.     case $signal_type in
  266.     bad) echo >&2 "cannot deduce signal_type"; exit 1
  267.     esac
  268.     ($C -Dsignal_type=$signal_type a.c $L && ./a.out 1) >&2 && break
  269. done
  270. echo "#define signal_type $signal_type /* type returned by signal handlers */"
  271. if ./a.out 1 2 >&2
  272. then z=0
  273. else z=1
  274. fi
  275. echo "#define sig_zaps_handler $z /* Must a signal handler reinvoke signal()?  */"
  276.  
  277. : has_seteuid
  278. cat >a.c <<'EOF' || exit
  279. #include "a.h"
  280. #ifndef geteuid
  281.     uid_t geteuid();
  282. #endif
  283. int main() {
  284. /* Guess, don't test.  Ugh.  Testing would require running conf.sh setuid.  */
  285. #if !_POSIX_VERSION || _POSIX_VERSION==198808L&&!defined(sun)&&!defined(__sun__)
  286.     exitmain(1);
  287. #else
  288.     exitmain(seteuid(geteuid()) < 0);
  289. #endif
  290. }
  291. EOF
  292. if ($C a.c $L && ./a.out) >&2
  293. then h=1
  294. else h=0
  295. fi
  296. echo "#define has_seteuid $h /* Does seteuid() obey Posix 1003.1-1990?  */"
  297.  
  298. : has_sigaction
  299. cat >a.c <<'EOF' || exit
  300. #include <signal.h>
  301. struct sigaction s;
  302. EOF
  303. if $C -S a.c >&2
  304. then h=1
  305. else h=0
  306. fi
  307. echo "#define has_sigaction $h /* Does struct sigaction work?  */"
  308.  
  309. : has_sigblock
  310. cat >a.c <<'EOF' || exit
  311. #include "a.h"
  312. #include <signal.h>
  313. #ifndef sigblock
  314.     int sigblock();
  315. #endif
  316. int main() { sigblock(0); exitmain(0); }
  317. EOF
  318. if ($C a.c $L && ./a.out) >&2
  319. then h=1
  320. else h=0
  321. fi
  322. echo "#define has_sigblock $h /* Does sigblock() work?  */"
  323.  
  324. : has_sys_siglist
  325. cat >a.c <<'EOF' || exit
  326. #include "a.h"
  327. #ifndef sys_siglist
  328.     extern const char *sys_siglist[];
  329. #endif
  330. int main() { exitmain(!sys_siglist[1][0]); }
  331. EOF
  332. if ($C a.c $L && ./a.out) >&2
  333. then h=1
  334. else h=0
  335. fi
  336. echo "#define has_sys_siglist $h /* Does sys_siglist[] work?  */"
  337.  
  338. : exit_type, underscore_exit_type
  339. cat >a.c <<'EOF' || exit
  340. #include "a.h"
  341. #ifndef exit
  342.     void exit();
  343. #endif
  344. int main() { exit(0); }
  345. EOF
  346. if $C -S a.c >&2
  347. then t=void
  348. else t=int
  349. fi
  350. echo "#define exit_type $t /* type returned by exit() */"
  351. cat >a.c <<'EOF' || exit
  352. #include "a.h"
  353. #ifndef _exit
  354.     void _exit();
  355. #endif
  356. int main() { _exit(0); }
  357. EOF
  358. if $C -S a.c >&2
  359. then t=void
  360. else t=int
  361. fi
  362. echo "#define underscore_exit_type $t /* type returned by _exit() */"
  363.  
  364. : fread_type
  365. cat >a.c <<'EOF' || exit
  366. #include "a.h"
  367. #ifndef fread
  368.     size_t fread();
  369. #endif
  370. int main() { char b; exitmain(!(fread(&b,1,1,stdin)==1 && b=='#')); }
  371. EOF
  372. if $C -S a.c $L >&2
  373. then t=size_t
  374. else t=int
  375. fi
  376. echo "typedef $t fread_type; /* type returned by fread() and fwrite() */"
  377.  
  378. : malloc_type
  379. cat >a.c <<'EOF' || exit
  380. #include "a.h"
  381. typedef void *malloc_type;
  382. #ifndef malloc
  383.     malloc_type malloc();
  384. #endif
  385. int main() { exitmain(!malloc(1)); }
  386. EOF
  387. if $C -S a.c >&2
  388. then t=void
  389. else t=char
  390. fi
  391. echo "typedef $t *malloc_type; /* type returned by malloc() */"
  392.  
  393. : free_type
  394. cat >a.c <<'EOF' || exit
  395. #include "a.h"
  396. #ifndef malloc
  397.     malloc_type malloc();
  398. #endif
  399. #ifndef free
  400.     void free();
  401. #endif
  402. int main() { free(malloc(1)); exitmain(0); }
  403. EOF
  404. if $C -S a.c >&2
  405. then t=void
  406. else t=int
  407. fi
  408. echo "#define free_type $t /* type returned by free() */"
  409.  
  410. : strlen_type
  411. cat >a.c <<'EOF' || exit
  412. #include "a.h"
  413. #ifndef strlen
  414.     size_t strlen();
  415. #endif
  416. int main() { exitmain(strlen("")); }
  417. EOF
  418. if $C -S a.c >&2
  419. then t=size_t
  420. else t=int
  421. fi
  422. echo "typedef $t strlen_type; /* type returned by strlen() */"
  423.  
  424. : has_getcwd
  425. cat >a.c <<'EOF' || exit
  426. #include "a.h"
  427. #ifndef getcwd
  428.     char *getcwd();
  429. #endif
  430. char buf[10000];
  431. int main() { exitmain(!getcwd(buf,10000)); }
  432. EOF
  433. if ($C a.c $L && ./a.out) >&2
  434. then has_getcwd=1
  435. else has_getcwd=0
  436. fi
  437. echo "#define has_getcwd $has_getcwd /* Does getcwd() work?  */"
  438.  
  439. : has_getwd
  440. case $has_getcwd in
  441. 0)
  442.     cat >a.c <<'EOF' || exit
  443. #include "a.h"
  444. #include <sys/param.h>
  445. #ifndef getwd
  446.     char *getwd();
  447. #endif
  448. char buf[MAXPATHLEN];
  449. int main() { exitmain(!getwd(buf)); }
  450. EOF
  451.     if ($C a.c $L && ./a.out) >&2
  452.     then h=1
  453.     else h=0
  454.     fi
  455.     echo "#define has_getwd $h /* Does getwd() work?  */";;
  456. 1)
  457.     echo "/* #define has_getwd ? */ /* Does getwd() work?  */"
  458. esac
  459.  
  460. : has_vfork
  461. cat >a.c <<'EOF' || exit
  462. #include "a.h"
  463. #if has_sys_wait_h
  464. #    include <sys/wait.h>
  465. #endif
  466. #ifndef _exit
  467.     underscore_exit_type _exit();
  468. #endif
  469. #ifndef getpid
  470.     pid_t getpid();
  471. #endif
  472. #ifndef wait
  473.     pid_t wait();
  474. #endif
  475. pid_t child;
  476. int status;
  477. struct stat st;
  478. int main()
  479. {
  480.     pid_t parent = getpid();
  481.     if (!(child = vfork())) {
  482.         /* Tickle vfork/compiler bug (e.g. sparc gcc -O (1.37.1).  */
  483.         pid_t i = getpid(), j = getpid();
  484.         if (i!=getpid() || j!=getpid())
  485.             _exit(!i);
  486.         /* Tickle file descriptor bug (e.g. IRIX 3.3).  */
  487.         _exit(close(1) < 0);
  488.     } else {
  489.         while (wait(&status) != child)
  490.             ;
  491.         /* Test for presence of bugs.  */
  492.         exitmain(status  ||  parent != getpid()  ||  fstat(1, &st) < 0);
  493.     }
  494. }
  495. EOF
  496. if ($C a.c $L && ./a.out) >&2
  497. then h=1
  498. else h=0
  499. fi
  500. echo "#define has_vfork $h /* Does vfork() work?  */"
  501.  
  502. : has_vfprintf
  503. cat >a.c <<'EOF' || exit
  504. #include "a.h"
  505. #if has_prototypes
  506. int p(const char *format,...)
  507. #else
  508. /*VARARGS1*/ int p(format, va_alist) char *format; va_dcl
  509. #endif
  510. {
  511.     int r;
  512.     va_list args;
  513.     vararg_start(args, format);
  514.     r = vfprintf(stderr, format, args);
  515.     va_end(args);
  516.     return r;
  517. }
  518. int main() { exitmain(p("")); }
  519. EOF
  520. if ($C a.c $L && ./a.out) >&2
  521. then h=1
  522. else h=0
  523. fi
  524. echo "#define has_vfprintf $h /* Does vfprintf() work?  */"
  525.  
  526. : strrchr
  527. cat >a.c <<'EOF' || exit
  528. #include "a.h"
  529. #ifndef strrchr
  530.     char *strrchr();
  531. #endif
  532. int main() {exitmain(!strrchr("abc", 'c'));}
  533. EOF
  534. ($C a.c $L && ./a.out) >&2 ||
  535.   echo "#define strrchr rindex /* Use old-fashioned name for strrchr(). */"
  536.  
  537. : CO
  538. echo "#define CO \"${RCSPREFIX}co\" /* name of 'co' program */"
  539.  
  540. : COMPAT2
  541. echo "#define COMPAT2 $COMPAT2 /* Are version 2 files supported?  */"
  542.  
  543. : DATEFORM
  544. cat >a.c <<'EOF' || exit
  545. #include "a.h"
  546. int main() { printf("%.2d", 1); exitmain(0); }
  547. EOF
  548. $C a.c $L >&2 && r=`./a.out` || exit
  549. case $r in
  550. 01)    f=%.2d;;
  551. *)    f=%02d
  552. esac
  553. echo "#define DATEFORM \"$f.$f.$f.$f.$f.$f\" /* e.g. 01.01.01.01.01.01 */"
  554.  
  555. : DIFF
  556. echo "#define DIFF \"$DIFF\" /* name of 'diff' program */"
  557.  
  558. : DIFF_FLAGS
  559. dfs=
  560. for df in $DIFF_FLAGS
  561. do dfs="$dfs, \"$df\""
  562. done
  563. echo "#define DIFF_FLAGS $dfs /* Make diff output suitable for RCS.  */"
  564.  
  565. : DIFF_L
  566. echo "#define DIFF_L $DIFF_L /* Does diff -L work? */"
  567.  
  568. : EXECRCS
  569. e=execv
  570. for i in "$DIFF" "$RCSPREFIX" "$SENDMAIL"
  571. do
  572.     case $i in
  573.     */*) ;;
  574.     *) e=execvp break
  575.     esac
  576. done
  577. echo "#define EXECRCS $e /* variant of execv() to use on subprograms */"
  578.  
  579. : MERGE
  580. echo "#define MERGE \"${RCSPREFIX}merge\" /* name of 'merge' program */"
  581.  
  582. : RCSDIR, SLASH, TMPDIR
  583. rm -fr a.RCS && mkdir a.RCS && echo x >a.RCS/x &&
  584. cat >a.c <<'EOF' || exit
  585. #include "a.h"
  586. main() { exitmain(!fopen(NAME,"r")); }
  587. EOF
  588. for NAME in a.RCS/x 'a.rcs/x' 'A.RCS\\x' bad
  589. do ($C -DNAME="\"$NAME\"" a.c $L && ./a.out) && break
  590. done
  591. case $NAME in
  592. a.RCS/x) RCSDIR=RCS/ SLASH=/ TMPDIR=/tmp/;;
  593. a.rcs/x) RCSDIR=rcs/ SLASH=/ TMPDIR=/tmp/;;
  594. 'A.RCS\\X') RCSDIR='RCS\\' SLASH='\\' TMPDIR='\\TMP\\';;
  595. *) echo >&2 "cannot deduce RCSDIR"; exit 1;;
  596. esac
  597. rm -fr a.RCS
  598. echo "#define RCSDIR \"$RCSDIR\" /* subdirectory for RCS files */"
  599. echo "#define SLASH '$SLASH' /* path name separator */"
  600. echo "#define TMPDIR \"$TMPDIR\" /* default directory for temporary files */"
  601.  
  602. : DIFF_PATH_HARDWIRED
  603. case $DIFF in
  604. "$SLASH"*) h=1;;
  605. *) h=0
  606. esac
  607. echo "#define DIFF_PATH_HARDWIRED $h /* Is DIFF absolute, not relative?  */"
  608.  
  609. : ROOTPATH
  610. case `pwd` in
  611. [/\\]*)
  612.     echo '#define ROOTPATH(p) ((p)[0]==SLASH)';;
  613. ?:[/\\]*)
  614.     echo '#define ROOTPATH(p) ((p)[0] && (p)[1]==':' && (p)[2]==SLASH)';;
  615. *)
  616.     echo >&2 "cannot deduce ROOTPATH"; exit 1;;
  617. esac
  618.  
  619. : RCSSEP
  620. if echo x >a.1234567890,v && ($C -DNAME=\"a.1234567890,v\" a.c $L && ./a.out)
  621. then RCSSEP=','
  622. else RCSSEP='\0'
  623. fi
  624. echo "#define RCSSEP '$RCSSEP' /* separator for RCSSUF */"
  625.  
  626. : SENDMAIL
  627. echo "#define SENDMAIL $SENDMAIL /* how to send mail */"
  628.  
  629. : fprintf, printf, vfprintf
  630. cat >a.c <<'EOF' || exit
  631. #include "a.h"
  632. #ifndef printf
  633.     int printf P((const char*,...));
  634. #endif
  635. int main() { printf(""); exitmain(0); }
  636. EOF
  637. if $C -S a.c >&2
  638. then a='1 /* These agree with <stdio.h>.  */'
  639. else a='0 /* These conflict with <stdio.h>.  */'
  640. fi
  641. cat <<EOF || exit
  642. #if $a
  643.     int fprintf P((FILE*,const char*,...));
  644.     int printf P((const char*,...));
  645. #    if has_vfprintf
  646.         int vfprintf P((FILE*,const char*,...));
  647. #    else
  648.         void _doprnt P((const char*,...));
  649. #    endif
  650. #endif
  651. EOF
  652.  
  653. : sprintf and other routines with '...' and default promotion problems
  654. cat >a.c <<'EOF' || exit
  655. #include "a.h"
  656. #ifndef sprintf
  657.     int sprintf();
  658. #endif
  659. int main()
  660. {
  661.     char buf[1];
  662.     exitmain(sprintf(buf, "") != 0);
  663. }
  664. EOF
  665. if ($C a.c $L && ./a.out) >&2
  666. then t='int '
  667. else t='char *'
  668. fi
  669. cat >a.c <<'EOF' || exit
  670. #include "a.h"
  671. #if has_sys_wait_h
  672. #    include <sys/wait.h>
  673. #endif
  674. declaration
  675. int main() { exitmain(0); }
  676. EOF
  677. for declaration in \
  678.     "${t}sprintf P((char*,const char*,...));" \
  679.     'int chmod P((const char*,mode_t));' \
  680.     'int fcntl P((int,int,...));' \
  681.     'int open P((const char*,int,...));' \
  682.     'mode_t umask P((mode_t));' \
  683.     'pid_t wait P((int*));'
  684. do
  685.     if $C -S -Ddeclaration="$declaration" a.c >&2
  686.     then echo "$declaration"
  687.     else echo "/* $declaration */"
  688.     fi
  689. done
  690. for i in '
  691. #ifndef O_CREAT
  692.     int creat P((const char*,mode_t));
  693. #endif' '
  694. #if has_seteuid
  695.     int setegid P((gid_t));
  696.     int seteuid P((uid_t));
  697. #endif'
  698.     # See declare_getpwuid for how getpwuid() is handled.
  699. do
  700.     echo '#include "a.h"
  701.         int main() { exitmain(0); }'"$i" >a.c || exit
  702.     if $C -S a.c >&2
  703.     then sed 1,2d a.c
  704.     else sed '1,2d; s|.*|/* & */|' a.c
  705.     fi
  706. done
  707.