home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume18 / perl / part25 < prev    next >
Internet Message Format  |  1991-04-17  |  50KB

  1. From: lwall@netlabs.com (Larry Wall)
  2. Newsgroups: comp.sources.misc
  3. Subject: v18i043:  perl - The perl programming language, Part25/36
  4. Message-ID: <1991Apr17.185725.2542@sparky.IMD.Sterling.COM>
  5. Date: 17 Apr 91 18:57:25 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: bff5b422 01b6435e 16423f3d b32bc561
  8.  
  9. Submitted-by: Larry Wall <lwall@netlabs.com>
  10. Posting-number: Volume 18, Issue 43
  11. Archive-name: perl/part25
  12.  
  13. [There are 36 kits for perl version 4.0.]
  14.  
  15. #! /bin/sh
  16.  
  17. # Make a new directory for the perl sources, cd to it, and run kits 1
  18. # thru 36 through sh.  When all 36 kits have been run, read README.
  19.  
  20. echo "This is perl 4.0 kit 25 (of 36).  If kit 25 is complete, the line"
  21. echo '"'"End of kit 25 (of 36)"'" will echo at the end.'
  22. echo ""
  23. export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
  24. mkdir h2pl os2 2>/dev/null
  25. echo Extracting config.H
  26. sed >config.H <<'!STUFFY!FUNK!' -e 's/X//'
  27. X#ifndef config_h
  28. X#define config_h
  29. X/* config.h
  30. X * This file was produced by running the config.h.SH script, which
  31. X * gets its values from config.sh, which is generally produced by
  32. X * running Configure.
  33. X *
  34. X * Feel free to modify any of this as the need arises.  Note, however,
  35. X * that running config.h.SH again will wipe out any changes you've made.
  36. X * For a more permanent change edit config.sh and rerun config.h.SH.
  37. X */
  38. X
  39. X
  40. X/* EUNICE
  41. X *    This symbol, if defined, indicates that the program is being compiled
  42. X *    under the EUNICE package under VMS.  The program will need to handle
  43. X *    things like files that don't go away the first time you unlink them,
  44. X *    due to version numbering.  It will also need to compensate for lack
  45. X *    of a respectable link() command.
  46. X */
  47. X/* VMS
  48. X *    This symbol, if defined, indicates that the program is running under
  49. X *    VMS.  It is currently only set in conjunction with the EUNICE symbol.
  50. X */
  51. X/*#undef    EUNICE        /**/
  52. X/*#undef    VMS        /**/
  53. X
  54. X/* ALIGNBYTES
  55. X *    This symbol contains the number of bytes required to align a double.
  56. X *    Usual values are 2, 4, and 8.
  57. X */
  58. X#define ALIGNBYTES 4        /**/
  59. X
  60. X/* BIN
  61. X *    This symbol holds the name of the directory in which the user wants
  62. X *    to keep publicly executable images for the package in question.  It
  63. X *    is most often a local directory such as /usr/local/bin.
  64. X */
  65. X#define BIN "/usr/local/bin"             /**/
  66. X
  67. X/* BYTEORDER
  68. X *    This symbol contains an encoding of the order of bytes in a long.
  69. X *    Usual values (in octal) are 01234, 04321, 02143, 03412...
  70. X */
  71. X#define BYTEORDER 0x1234        /**/
  72. X
  73. X/* CPPSTDIN
  74. X *    This symbol contains the first part of the string which will invoke
  75. X *    the C preprocessor on the standard input and produce to standard
  76. X *    output.     Typical value of "cc -E" or "/lib/cpp".
  77. X */
  78. X/* CPPMINUS
  79. X *    This symbol contains the second part of the string which will invoke
  80. X *    the C preprocessor on the standard input and produce to standard
  81. X *    output.  This symbol will have the value "-" if CPPSTDIN needs a minus
  82. X *    to specify standard input, otherwise the value is "".
  83. X */
  84. X#define CPPSTDIN "cc -E"
  85. X#define CPPMINUS "-"
  86. X
  87. X/* HAS_BCMP
  88. X *    This symbol, if defined, indicates that the bcmp routine is available
  89. X *    to compare blocks of memory.  If undefined, use memcmp.  If that's
  90. X *    not available, roll your own.
  91. X */
  92. X#define    HAS_BCMP        /**/
  93. X
  94. X/* HAS_BCOPY
  95. X *    This symbol, if defined, indicates that the bcopy routine is available
  96. X *    to copy blocks of memory.  Otherwise you should probably use memcpy().
  97. X */
  98. X#define    HAS_BCOPY        /**/
  99. X
  100. X/* HAS_BZERO
  101. X *    This symbol, if defined, indicates that the bzero routine is available
  102. X *    to zero blocks of memory.  Otherwise you should probably use memset()
  103. X *    or roll your own.
  104. X */
  105. X#define    HAS_BZERO        /**/
  106. X
  107. X/* CASTNEGFLOAT
  108. X *    This symbol, if defined, indicates that this C compiler knows how to
  109. X *    cast negative or large floating point numbers to unsigned longs, ints
  110. X *    and shorts.
  111. X */
  112. X/* CASTFLAGS
  113. X *    This symbol contains flags that say what difficulties the compiler
  114. X *    has casting odd floating values to unsigned long:
  115. X *        1 = couldn't cast < 0
  116. X *        2 = couldn't cast >= 0x80000000
  117. X */
  118. X#define    CASTNEGFLOAT    /**/
  119. X#define    CASTFLAGS 0    /**/
  120. X
  121. X/* CHARSPRINTF
  122. X *    This symbol is defined if this system declares "char *sprintf()" in
  123. X *    stdio.h.  The trend seems to be to declare it as "int sprintf()".  It
  124. X *    is up to the package author to declare sprintf correctly based on the
  125. X *    symbol.
  126. X */
  127. X#define    CHARSPRINTF     /**/
  128. X
  129. X/* HAS_CHSIZE
  130. X *    This symbol, if defined, indicates that the chsize routine is available
  131. X *    to truncate files.  You might need a -lx to get this routine.
  132. X */
  133. X/*#undef    HAS_CHSIZE        /**/
  134. X
  135. X/* HAS_CRYPT
  136. X *    This symbol, if defined, indicates that the crypt routine is available
  137. X *    to encrypt passwords and the like.
  138. X */
  139. X#define    HAS_CRYPT        /**/
  140. X
  141. X/* CSH
  142. X *    This symbol, if defined, indicates that the C-shell exists.
  143. X *    If defined, contains the full pathname of csh.
  144. X */
  145. X#define CSH "/bin/csh"        /**/
  146. X
  147. X/* DOSUID
  148. X *    This symbol, if defined, indicates that the C program should
  149. X *    check the script that it is executing for setuid/setgid bits, and
  150. X *    attempt to emulate setuid/setgid on systems that have disabled
  151. X *    setuid #! scripts because the kernel can't do it securely.
  152. X *    It is up to the package designer to make sure that this emulation
  153. X *    is done securely.  Among other things, it should do an fstat on
  154. X *    the script it just opened to make sure it really is a setuid/setgid
  155. X *    script, it should make sure the arguments passed correspond exactly
  156. X *    to the argument on the #! line, and it should not trust any
  157. X *    subprocesses to which it must pass the filename rather than the
  158. X *    file descriptor of the script to be executed.
  159. X */
  160. X/*#undef DOSUID        /**/
  161. X
  162. X/* HAS_DUP2
  163. X *    This symbol, if defined, indicates that the dup2 routine is available
  164. X *    to dup file descriptors.  Otherwise you should use dup().
  165. X */
  166. X#define    HAS_DUP2        /**/
  167. X
  168. X/* HAS_FCHMOD
  169. X *    This symbol, if defined, indicates that the fchmod routine is available
  170. X *    to change mode of opened files.  If unavailable, use chmod().
  171. X */
  172. X#define    HAS_FCHMOD        /**/
  173. X
  174. X/* HAS_FCHOWN
  175. X *    This symbol, if defined, indicates that the fchown routine is available
  176. X *    to change ownership of opened files.  If unavailable, use chown().
  177. X */
  178. X#define    HAS_FCHOWN        /**/
  179. X
  180. X/* HAS_FCNTL
  181. X *    This symbol, if defined, indicates to the C program that
  182. X *    the fcntl() function exists.
  183. X */
  184. X#define    HAS_FCNTL        /**/
  185. X
  186. X/* FLEXFILENAMES
  187. X *    This symbol, if defined, indicates that the system supports filenames
  188. X *    longer than 14 characters.
  189. X */
  190. X#define    FLEXFILENAMES        /**/
  191. X
  192. X/* HAS_FLOCK
  193. X *    This symbol, if defined, indicates that the flock() routine is
  194. X *    available to do file locking.
  195. X */
  196. X#define    HAS_FLOCK        /**/
  197. X
  198. X/* HAS_GETGROUPS
  199. X *    This symbol, if defined, indicates that the getgroups() routine is
  200. X *    available to get the list of process groups.  If unavailable, multiple
  201. X *    groups are probably not supported.
  202. X */
  203. X#define    HAS_GETGROUPS        /**/
  204. X
  205. X/* HAS_GETHOSTENT
  206. X *    This symbol, if defined, indicates that the gethostent() routine is
  207. X *    available to lookup host names in some data base or other.
  208. X */
  209. X#define    HAS_GETHOSTENT        /**/
  210. X
  211. X/* HAS_GETPGRP
  212. X *    This symbol, if defined, indicates that the getpgrp() routine is
  213. X *    available to get the current process group.
  214. X */
  215. X#define    HAS_GETPGRP        /**/
  216. X
  217. X/* HAS_GETPGRP2
  218. X *    This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
  219. X *    routine is available to get the current process group.
  220. X */
  221. X/*#undef    HAS_GETPGRP2        /**/
  222. X
  223. X/* HAS_GETPRIORITY
  224. X *    This symbol, if defined, indicates that the getpriority() routine is
  225. X *    available to get a process's priority.
  226. X */
  227. X#define    HAS_GETPRIORITY        /**/
  228. X
  229. X/* HAS_HTONS
  230. X *    This symbol, if defined, indicates that the htons routine (and friends)
  231. X *    are available to do network order byte swapping.
  232. X */
  233. X/* HAS_HTONL
  234. X *    This symbol, if defined, indicates that the htonl routine (and friends)
  235. X *    are available to do network order byte swapping.
  236. X */
  237. X/* HAS_NTOHS
  238. X *    This symbol, if defined, indicates that the ntohs routine (and friends)
  239. X *    are available to do network order byte swapping.
  240. X */
  241. X/* HAS_NTOHL
  242. X *    This symbol, if defined, indicates that the ntohl routine (and friends)
  243. X *    are available to do network order byte swapping.
  244. X */
  245. X#define    HAS_HTONS    /**/
  246. X#define    HAS_HTONL    /**/
  247. X#define    HAS_NTOHS    /**/
  248. X#define    HAS_NTOHL    /**/
  249. X
  250. X/* index
  251. X *    This preprocessor symbol is defined, along with rindex, if the system
  252. X *    uses the strchr and strrchr routines instead.
  253. X */
  254. X/* rindex
  255. X *    This preprocessor symbol is defined, along with index, if the system
  256. X *    uses the strchr and strrchr routines instead.
  257. X */
  258. X/*#undef    index strchr    /* cultural */
  259. X/*#undef    rindex strrchr    /*  differences? */
  260. X
  261. X/* HAS_KILLPG
  262. X *    This symbol, if defined, indicates that the killpg routine is available
  263. X *    to kill process groups.  If unavailable, you probably should use kill
  264. X *    with a negative process number.
  265. X */
  266. X#define    HAS_KILLPG        /**/
  267. X
  268. X/* HAS_LSTAT
  269. X *    This symbol, if defined, indicates that the lstat() routine is
  270. X *    available to stat symbolic links.
  271. X */
  272. X#define    HAS_LSTAT        /**/
  273. X
  274. X/* HAS_MEMCMP
  275. X *    This symbol, if defined, indicates that the memcmp routine is available
  276. X *    to compare blocks of memory.  If undefined, roll your own.
  277. X */
  278. X#define    HAS_MEMCMP        /**/
  279. X
  280. X/* HAS_MEMCPY
  281. X *    This symbol, if defined, indicates that the memcpy routine is available
  282. X *    to copy blocks of memory.  Otherwise you should probably use bcopy().
  283. X *    If neither is defined, roll your own.
  284. X */
  285. X#define    HAS_MEMCPY        /**/
  286. X
  287. X/* HAS_MKDIR
  288. X *    This symbol, if defined, indicates that the mkdir routine is available
  289. X *    to create directories.  Otherwise you should fork off a new process to
  290. X *    exec /bin/mkdir.
  291. X */
  292. X#define    HAS_MKDIR        /**/
  293. X
  294. X/* HAS_MSG
  295. X *    This symbol, if defined, indicates that the entire msg*(2) library is
  296. X *    supported.
  297. X */
  298. X#define    HAS_MSG        /**/
  299. X
  300. X/* HAS_MSGCTL
  301. X *    This symbol, if defined, indicates that the msgctl() routine is
  302. X *    available to stat symbolic links.
  303. X */
  304. X#define    HAS_MSGCTL        /**/
  305. X
  306. X/* HAS_MSGGET
  307. X *    This symbol, if defined, indicates that the msgget() routine is
  308. X *    available to stat symbolic links.
  309. X */
  310. X#define    HAS_MSGGET        /**/
  311. X
  312. X/* HAS_MSGRCV
  313. X *    This symbol, if defined, indicates that the msgrcv() routine is
  314. X *    available to stat symbolic links.
  315. X */
  316. X#define    HAS_MSGRCV        /**/
  317. X
  318. X/* HAS_MSGSND
  319. X *    This symbol, if defined, indicates that the msgsnd() routine is
  320. X *    available to stat symbolic links.
  321. X */
  322. X#define    HAS_MSGSND        /**/
  323. X
  324. X/* HAS_NDBM
  325. X *    This symbol, if defined, indicates that ndbm.h exists and should
  326. X *    be included.
  327. X */
  328. X#define    HAS_NDBM        /**/
  329. X
  330. X/* HAS_ODBM
  331. X *    This symbol, if defined, indicates that dbm.h exists and should
  332. X *    be included.
  333. X */
  334. X#define    HAS_ODBM        /**/
  335. X
  336. X/* HAS_OPEN3
  337. X *    This manifest constant lets the C program know that the three
  338. X *    argument form of open(2) is available.
  339. X */
  340. X#define    HAS_OPEN3        /**/
  341. X
  342. X/* HAS_READDIR
  343. X *    This symbol, if defined, indicates that the readdir routine is available
  344. X *    from the C library to read directories.
  345. X */
  346. X#define    HAS_READDIR        /**/
  347. X
  348. X/* HAS_RENAME
  349. X *    This symbol, if defined, indicates that the rename routine is available
  350. X *    to rename files.  Otherwise you should do the unlink(), link(), unlink()
  351. X *    trick.
  352. X */
  353. X#define    HAS_RENAME        /**/
  354. X
  355. X/* HAS_RMDIR
  356. X *    This symbol, if defined, indicates that the rmdir routine is available
  357. X *    to remove directories.  Otherwise you should fork off a new process to
  358. X *    exec /bin/rmdir.
  359. X */
  360. X#define    HAS_RMDIR        /**/
  361. X
  362. X/* HAS_SELECT
  363. X *    This symbol, if defined, indicates that the select() subroutine
  364. X *    exists.
  365. X */
  366. X#define    HAS_SELECT    /**/
  367. X
  368. X/* HAS_SEM
  369. X *    This symbol, if defined, indicates that the entire sem*(2) library is
  370. X *    supported.
  371. X */
  372. X#define    HAS_SEM        /**/
  373. X
  374. X/* HAS_SEMCTL
  375. X *    This symbol, if defined, indicates that the semctl() routine is
  376. X *    available to stat symbolic links.
  377. X */
  378. X#define    HAS_SEMCTL        /**/
  379. X
  380. X/* HAS_SEMGET
  381. X *    This symbol, if defined, indicates that the semget() routine is
  382. X *    available to stat symbolic links.
  383. X */
  384. X#define    HAS_SEMGET        /**/
  385. X
  386. X/* HAS_SEMOP
  387. X *    This symbol, if defined, indicates that the semop() routine is
  388. X *    available to stat symbolic links.
  389. X */
  390. X#define    HAS_SEMOP        /**/
  391. X
  392. X/* HAS_SETEGID
  393. X *    This symbol, if defined, indicates that the setegid routine is available
  394. X *    to change the effective gid of the current program.
  395. X */
  396. X#define    HAS_SETEGID        /**/
  397. X
  398. X/* HAS_SETEUID
  399. X *    This symbol, if defined, indicates that the seteuid routine is available
  400. X *    to change the effective uid of the current program.
  401. X */
  402. X#define    HAS_SETEUID        /**/
  403. X
  404. X/* HAS_SETPGRP
  405. X *    This symbol, if defined, indicates that the setpgrp() routine is
  406. X *    available to set the current process group.
  407. X */
  408. X#define    HAS_SETPGRP        /**/
  409. X
  410. X/* HAS_SETPGRP2
  411. X *    This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
  412. X *    routine is available to set the current process group.
  413. X */
  414. X/*#undef    HAS_SETPGRP2        /**/
  415. X
  416. X/* HAS_SETPRIORITY
  417. X *    This symbol, if defined, indicates that the setpriority() routine is
  418. X *    available to set a process's priority.
  419. X */
  420. X#define    HAS_SETPRIORITY        /**/
  421. X
  422. X/* HAS_SETREGID
  423. X *    This symbol, if defined, indicates that the setregid routine is
  424. X *    available to change the real and effective gid of the current program.
  425. X */
  426. X/* HAS_SETRESGID
  427. X *    This symbol, if defined, indicates that the setresgid routine is
  428. X *    available to change the real, effective and saved gid of the current
  429. X *    program.
  430. X */
  431. X#define    HAS_SETREGID        /**/
  432. X/*#undef    HAS_SETRESGID        /**/
  433. X
  434. X/* HAS_SETREUID
  435. X *    This symbol, if defined, indicates that the setreuid routine is
  436. X *    available to change the real and effective uid of the current program.
  437. X */
  438. X/* HAS_SETRESUID
  439. X *    This symbol, if defined, indicates that the setresuid routine is
  440. X *    available to change the real, effective and saved uid of the current
  441. X *    program.
  442. X */
  443. X#define    HAS_SETREUID        /**/
  444. X/*#undef    HAS_SETRESUID        /**/
  445. X
  446. X/* HAS_SETRGID
  447. X *    This symbol, if defined, indicates that the setrgid routine is available
  448. X *    to change the real gid of the current program.
  449. X */
  450. X#define    HAS_SETRGID        /**/
  451. X
  452. X/* HAS_SETRUID
  453. X *    This symbol, if defined, indicates that the setruid routine is available
  454. X *    to change the real uid of the current program.
  455. X */
  456. X#define    HAS_SETRUID        /**/
  457. X
  458. X/* HAS_SHM
  459. X *    This symbol, if defined, indicates that the entire shm*(2) library is
  460. X *    supported.
  461. X */
  462. X#define    HAS_SHM        /**/
  463. X
  464. X/* HAS_SHMAT
  465. X *    This symbol, if defined, indicates that the shmat() routine is
  466. X *    available to stat symbolic links.
  467. X */
  468. X#define    HAS_SHMAT        /**/
  469. X
  470. X/* HAS_SHMCTL
  471. X *    This symbol, if defined, indicates that the shmctl() routine is
  472. X *    available to stat symbolic links.
  473. X */
  474. X#define    HAS_SHMCTL        /**/
  475. X
  476. X/* HAS_SHMDT
  477. X *    This symbol, if defined, indicates that the shmdt() routine is
  478. X *    available to stat symbolic links.
  479. X */
  480. X#define    HAS_SHMDT        /**/
  481. X
  482. X/* HAS_SHMGET
  483. X *    This symbol, if defined, indicates that the shmget() routine is
  484. X *    available to stat symbolic links.
  485. X */
  486. X#define    HAS_SHMGET        /**/
  487. X
  488. X/* HAS_SOCKET
  489. X *    This symbol, if defined, indicates that the BSD socket interface is
  490. X *    supported.
  491. X */
  492. X/* HAS_SOCKETPAIR
  493. X *    This symbol, if defined, indicates that the BSD socketpair call is
  494. X *    supported.
  495. X */
  496. X/* OLDSOCKET
  497. X *    This symbol, if defined, indicates that the 4.1c BSD socket interface
  498. X *    is supported instead of the 4.2/4.3 BSD socket interface.
  499. X */
  500. X#define    HAS_SOCKET        /**/
  501. X
  502. X#define    HAS_SOCKETPAIR    /**/
  503. X
  504. X/*#undef    OLDSOCKET    /**/
  505. X
  506. X/* STATBLOCKS
  507. X *    This symbol is defined if this system has a stat structure declaring
  508. X *    st_blksize and st_blocks.
  509. X */
  510. X#define    STATBLOCKS     /**/
  511. X
  512. X/* STDSTDIO
  513. X *    This symbol is defined if this system has a FILE structure declaring
  514. X *    _ptr and _cnt in stdio.h.
  515. X */
  516. X#define    STDSTDIO     /**/
  517. X
  518. X/* STRUCTCOPY
  519. X *    This symbol, if defined, indicates that this C compiler knows how
  520. X *    to copy structures.  If undefined, you'll need to use a block copy
  521. X *    routine of some sort instead.
  522. X */
  523. X#define    STRUCTCOPY    /**/
  524. X
  525. X/* HAS_STRERROR
  526. X *    This symbol, if defined, indicates that the strerror() routine is
  527. X *    available to translate error numbers to strings.
  528. X */
  529. X/*#undef    HAS_STRERROR        /**/
  530. X
  531. X/* HAS_SYMLINK
  532. X *    This symbol, if defined, indicates that the symlink routine is available
  533. X *    to create symbolic links.
  534. X */
  535. X#define    HAS_SYMLINK        /**/
  536. X
  537. X/* HAS_SYSCALL
  538. X *    This symbol, if defined, indicates that the syscall routine is available
  539. X *    to call arbitrary system calls.  If undefined, that's tough.
  540. X */
  541. X#define    HAS_SYSCALL        /**/
  542. X
  543. X/* HAS_TRUNCATE
  544. X *    This symbol, if defined, indicates that the truncate routine is
  545. X *    available to truncate files.
  546. X */
  547. X#define    HAS_TRUNCATE        /**/
  548. X
  549. X/* HAS_VFORK
  550. X *    This symbol, if defined, indicates that vfork() exists.
  551. X */
  552. X#define    HAS_VFORK    /**/
  553. X
  554. X/* VOIDSIG
  555. X *    This symbol is defined if this system declares "void (*signal())()" in
  556. X *    signal.h.  The old way was to declare it as "int (*signal())()".  It
  557. X *    is up to the package author to declare things correctly based on the
  558. X *    symbol.
  559. X */
  560. X/* TO_SIGNAL
  561. X *    This symbol's value is either "void" or "int", corresponding to the
  562. X *    appropriate return "type" of a signal handler.  Thus, one can declare
  563. X *    a signal handler using "TO_SIGNAL (*handler())()", and define the
  564. X *    handler using "TO_SIGNAL handler(sig)".
  565. X */
  566. X/*#undef    VOIDSIG     /**/
  567. X#define    TO_SIGNAL         /**/
  568. X
  569. X/* HASVOLATILE
  570. X *    This symbol, if defined, indicates that this C compiler knows about
  571. X *    the volatile declaration.
  572. X */
  573. X/*#undef    HASVOLATILE    /**/
  574. X
  575. X/* HAS_VPRINTF
  576. X *    This symbol, if defined, indicates that the vprintf routine is available
  577. X *    to printf with a pointer to an argument list.  If unavailable, you
  578. X *    may need to write your own, probably in terms of _doprnt().
  579. X */
  580. X/* CHARVSPRINTF
  581. X *    This symbol is defined if this system has vsprintf() returning type
  582. X *    (char*).  The trend seems to be to declare it as "int vsprintf()".  It
  583. X *    is up to the package author to declare vsprintf correctly based on the
  584. X *    symbol.
  585. X */
  586. X/*#undef    HAS_VPRINTF    /**/
  587. X/*#undef    CHARVSPRINTF     /**/
  588. X
  589. X/* HAS_WAIT4
  590. X *    This symbol, if defined, indicates that wait4() exists.
  591. X */
  592. X#define    HAS_WAIT4    /**/
  593. X
  594. X/* HAS_WAITPID
  595. X *    This symbol, if defined, indicates that waitpid() exists.
  596. X */
  597. X/*#undef    HAS_WAITPID    /**/
  598. X
  599. X/* GIDTYPE
  600. X *    This symbol has a value like gid_t, int, ushort, or whatever type is
  601. X *    used to declare group ids in the kernel.
  602. X */
  603. X#define GIDTYPE int        /**/
  604. X
  605. X/* I_FCNTL
  606. X *    This manifest constant tells the C program to include <fcntl.h>.
  607. X */
  608. X/*#undef    I_FCNTL    /**/
  609. X
  610. X/* I_GDBM
  611. X *    This symbol, if defined, indicates that gdbm.h exists and should
  612. X *    be included.
  613. X */
  614. X/*#undef    I_GDBM        /**/
  615. X
  616. X/* I_GRP
  617. X *    This symbol, if defined, indicates to the C program that it should
  618. X *    include grp.h.
  619. X */
  620. X#define    I_GRP        /**/
  621. X
  622. X/* I_NETINET_IN
  623. X *    This symbol, if defined, indicates to the C program that it should
  624. X *    include netinet/in.h.
  625. X */
  626. X/* I_SYS_IN
  627. X *    This symbol, if defined, indicates to the C program that it should
  628. X *    include sys/in.h.
  629. X */
  630. X#define    I_NETINET_IN        /**/
  631. X/*#undef    I_SYS_IN        /**/
  632. X
  633. X/* I_PWD
  634. X *    This symbol, if defined, indicates to the C program that it should
  635. X *    include pwd.h.
  636. X */
  637. X/* PWQUOTA
  638. X *    This symbol, if defined, indicates to the C program that struct passwd
  639. X *    contains pw_quota.
  640. X */
  641. X/* PWAGE
  642. X *    This symbol, if defined, indicates to the C program that struct passwd
  643. X *    contains pw_age.
  644. X */
  645. X/* PWCHANGE
  646. X *    This symbol, if defined, indicates to the C program that struct passwd
  647. X *    contains pw_change.
  648. X */
  649. X/* PWCLASS
  650. X *    This symbol, if defined, indicates to the C program that struct passwd
  651. X *    contains pw_class.
  652. X */
  653. X/* PWEXPIRE
  654. X *    This symbol, if defined, indicates to the C program that struct passwd
  655. X *    contains pw_expire.
  656. X */
  657. X/* PWCOMMENT
  658. X *    This symbol, if defined, indicates to the C program that struct passwd
  659. X *    contains pw_comment.
  660. X */
  661. X#define    I_PWD        /**/
  662. X/*#undef    PWQUOTA        /**/
  663. X/*#undef    PWAGE        /**/
  664. X/*#undef    PWCHANGE    /**/
  665. X/*#undef    PWCLASS        /**/
  666. X/*#undef    PWEXPIRE    /**/
  667. X/*#undef    PWCOMMENT    /**/
  668. X
  669. X/* I_SYS_FILE
  670. X *    This manifest constant tells the C program to include <sys/file.h>.
  671. X */
  672. X#define    I_SYS_FILE    /**/
  673. X
  674. X/* I_SYSIOCTL
  675. X *    This symbol, if defined, indicates that sys/ioctl.h exists and should
  676. X *    be included.
  677. X */
  678. X#define    I_SYSIOCTL        /**/
  679. X
  680. X/* I_TIME
  681. X *    This symbol is defined if the program should include <time.h>.
  682. X */
  683. X/* I_SYS_TIME
  684. X *    This symbol is defined if the program should include <sys/time.h>.
  685. X */
  686. X/* SYSTIMEKERNEL
  687. X *    This symbol is defined if the program should include <sys/time.h>
  688. X *    with KERNEL defined.
  689. X */
  690. X/* I_SYS_SELECT
  691. X *    This symbol is defined if the program should include <sys/select.h>.
  692. X */
  693. X/*#undef    I_TIME         /**/
  694. X#define    I_SYS_TIME     /**/
  695. X/*#undef    SYSTIMEKERNEL     /**/
  696. X/*#undef    I_SYS_SELECT     /**/
  697. X
  698. X/* I_UTIME
  699. X *    This symbol, if defined, indicates to the C program that it should
  700. X *    include utime.h.
  701. X */
  702. X/*#undef    I_UTIME        /**/
  703. X
  704. X/* I_VARARGS
  705. X *    This symbol, if defined, indicates to the C program that it should
  706. X *    include varargs.h.
  707. X */
  708. X#define    I_VARARGS        /**/
  709. X
  710. X/* I_VFORK
  711. X *    This symbol, if defined, indicates to the C program that it should
  712. X *    include vfork.h.
  713. X */
  714. X/*#undef    I_VFORK        /**/
  715. X
  716. X/* INTSIZE
  717. X *    This symbol contains the size of an int, so that the C preprocessor
  718. X *    can make decisions based on it.
  719. X */
  720. X#define INTSIZE 4        /**/
  721. X
  722. X/* I_DIRENT
  723. X *    This symbol, if defined, indicates that the program should use the
  724. X *    P1003-style directory routines, and include <dirent.h>.
  725. X */
  726. X/* I_SYS_DIR
  727. X *    This symbol, if defined, indicates that the program should use the
  728. X *    directory functions by including <sys/dir.h>.
  729. X */
  730. X/* I_NDIR
  731. X *    This symbol, if defined, indicates that the program should include the
  732. X *    system's version of ndir.h, rather than the one with this package.
  733. X */
  734. X/* I_SYS_NDIR
  735. X *    This symbol, if defined, indicates that the program should include the
  736. X *    system's version of sys/ndir.h, rather than the one with this package.
  737. X */
  738. X/* I_MY_DIR
  739. X *    This symbol, if defined, indicates that the program should compile
  740. X *    the ndir.c code provided with the package.
  741. X */
  742. X/* DIRNAMLEN
  743. X *    This symbol, if defined, indicates to the C program that the length
  744. X *    of directory entry names is provided by a d_namlen field.  Otherwise
  745. X *    you need to do strlen() on the d_name field.
  746. X */
  747. X#define    I_DIRENT    /**/
  748. X/*#undef    I_SYS_DIR    /**/
  749. X/*#undef    I_NDIR        /**/
  750. X/*#undef    I_SYS_NDIR    /**/
  751. X/*#undef    I_MY_DIR    /**/
  752. X/*#undef    DIRNAMLEN    /**/
  753. X
  754. X
  755. X/* RANDBITS
  756. X *    This symbol contains the number of bits of random number the rand()
  757. X *    function produces.  Usual values are 15, 16, and 31.
  758. X */
  759. X#define RANDBITS 31        /**/
  760. X
  761. X/* SCRIPTDIR
  762. X *    This symbol holds the name of the directory in which the user wants
  763. X *    to put publicly executable scripts for the package in question.  It
  764. X *    is often a directory that is mounted across diverse architectures.
  765. X */
  766. X#define SCRIPTDIR "/usr/local/bin"             /**/
  767. X
  768. X/* SIG_NAME
  769. X *    This symbol contains an list of signal names in order.
  770. X */
  771. X#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","IOT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","URG","STOP","TSTP","CONT","CHLD","TTIN","TTOU","IO","XCPU","XFSZ","VTALRM","PROF","WINCH","LOST","USR1","USR2"        /**/
  772. X
  773. X/* STDCHAR
  774. X *    This symbol is defined to be the type of char used in stdio.h.
  775. X *    It has the values "unsigned char" or "char".
  776. X */
  777. X#define STDCHAR char    /**/
  778. X
  779. X/* UIDTYPE
  780. X *    This symbol has a value like uid_t, int, ushort, or whatever type is
  781. X *    used to declare user ids in the kernel.
  782. X */
  783. X#define UIDTYPE uid_t        /**/
  784. X
  785. X/* VOIDHAVE
  786. X *    This symbol indicates how much support of the void type is given by this
  787. X *    compiler.  What various bits mean:
  788. X *
  789. X *        1 = supports declaration of void
  790. X *        2 = supports arrays of pointers to functions returning void
  791. X *        4 = supports comparisons between pointers to void functions and
  792. X *            addresses of void functions
  793. X *
  794. X *    The package designer should define VOIDWANT to indicate the requirements
  795. X *    of the package.  This can be done either by #defining VOIDWANT before
  796. X *    including config.h, or by defining voidwant in Myinit.U.  If the level
  797. X *    of void support necessary is not present, config.h defines void to "int",
  798. X *    VOID to the empty string, and VOIDP to "char *".
  799. X */
  800. X/* void
  801. X *    This symbol is used for void casts.  On implementations which support
  802. X *    void appropriately, its value is "void".  Otherwise, its value maps
  803. X *    to "int".
  804. X */
  805. X/* VOID
  806. X *    This symbol's value is "void" if the implementation supports void
  807. X *    appropriately.  Otherwise, its value is the empty string.  The primary
  808. X *    use of this symbol is in specifying void parameter lists for function
  809. X *    prototypes.
  810. X */
  811. X/* VOIDP
  812. X *    This symbol is used for casting generic pointers.  On implementations
  813. X *    which support void appropriately, its value is "void *".  Otherwise,
  814. X *    its value is "char *".
  815. X */
  816. X#ifndef VOIDWANT
  817. X#define VOIDWANT 1
  818. X#endif
  819. X#define VOIDHAVE 1
  820. X#if (VOIDHAVE & VOIDWANT) != VOIDWANT
  821. X#define void int        /* is void to be avoided? */
  822. X#define VOID
  823. X#define VOIDP (char *)
  824. X#define M_VOID        /* Xenix strikes again */
  825. X#else
  826. X#define VOID void
  827. X#define VOIDP (void *)
  828. X#endif
  829. X
  830. X/* PRIVLIB
  831. X *    This symbol contains the name of the private library for this package.
  832. X *    The library is private in the sense that it needn't be in anyone's
  833. X *    execution path, but it should be accessible by the world.  The program
  834. X *    should be prepared to do ~ expansion.
  835. X */
  836. X#define PRIVLIB "/usr/local/lib/perl"        /**/
  837. X
  838. X#endif
  839. !STUFFY!FUNK!
  840. echo Extracting os2/config.h
  841. sed >os2/config.h <<'!STUFFY!FUNK!' -e 's/X//'
  842. X/* config.h
  843. X * This file was hand tailored for compiling under MS-DOS and MSC 5.1.
  844. X * Diomidis Spinellis, March 1990.
  845. X *
  846. X * Then it got mangled again for compiling under OS/2 and MSC 6.0.
  847. X * Raymond Chen, June 1990.
  848. X */
  849. X#define OS2        /**/
  850. X
  851. X/* OS/2 supports some additional things MS-DOS doesn't.
  852. X */
  853. X#ifdef OS2
  854. X#define PIPE
  855. X#define GETPPID
  856. X#define HAS_GETPRIORITY
  857. X#define HAS_SETPRIORITY
  858. X#define KILL
  859. X#endif /* OS2 */
  860. X
  861. X/* SUFFIX:
  862. X *      This symbol, if defined, indicates that the function add_suffix has
  863. X *      been supplied in a system-dependent .c file.  This function is
  864. X *      recommended for operating systems whose filenaming conventions
  865. X *      do not permit arbitrary strings as filenames.
  866. X */
  867. X#define SUFFIX    /**/
  868. X
  869. X/* EUNICE:
  870. X *    This symbol, if defined, indicates that the program is being compiled
  871. X *    under the EUNICE package under VMS.  The program will need to handle
  872. X *    things like files that don't go away the first time you unlink them,
  873. X *    due to version numbering.  It will also need to compensate for lack
  874. X *    of a respectable link() command.
  875. X */
  876. X/* VMS:
  877. X *    This symbol, if defined, indicates that the program is running under
  878. X *    VMS.  It is currently only set in conjunction with the EUNICE symbol.
  879. X */
  880. X/*#undef    EUNICE        /**/
  881. X/*#undef    VMS        /**/
  882. X
  883. X/* BIN:
  884. X *    This symbol holds the name of the directory in which the user wants
  885. X *    to put publicly executable images for the package in question.  It
  886. X *    is most often a local directory such as /usr/local/bin.
  887. X */
  888. X#define BIN "/usr/local/bin"             /**/
  889. X
  890. X/* BYTEORDER:
  891. X *    This symbol contains an encoding of the order of bytes in a long.
  892. X *    Usual values (in octal) are 01234, 04321, 02143, 03412...
  893. X */
  894. X/* CHECK */
  895. X#define BYTEORDER 0x1234        /**/
  896. X
  897. X/* CPPSTDIN:
  898. X *    This symbol contains the first part of the string which will invoke
  899. X *    the C preprocessor on the standard input and produce to standard
  900. X *    output.     Typical value of "cc -{" or "/lib/cpp".
  901. X */
  902. X/* CPPMINUS:
  903. X *    This symbol contains the second part of the string which will invoke
  904. X *    the C preprocessor on the standard input and produce to standard
  905. X *    output.  This symbol will have the value "-" if CPPSTDIN needs a minus
  906. X *    to specify standard input, otherwise the value is "".
  907. X */
  908. X/* TODO */
  909. X#define CPPSTDIN "cc -{"
  910. X#define CPPMINUS ""
  911. X
  912. X/* HAS_BCMP:
  913. X *    This symbol, if defined, indicates that the bcmp routine is available
  914. X *    to compare blocks of memory.  If undefined, use memcmp.  If that's
  915. X *    not available, roll your own.
  916. X */
  917. X/*#define    HAS_BCMP        /**/
  918. X
  919. X/* HAS_BCOPY:
  920. X *    This symbol, if defined, indicates that the bcopy routine is available
  921. X *    to copy blocks of memory.  Otherwise you should probably use memcpy().
  922. X */
  923. X/*#define    HAS_BCOPY        /**/
  924. X
  925. X/* CHARSPRINTF:
  926. X *    This symbol is defined if this system declares "char *sprintf()" in
  927. X *    stdio.h.  The trend seems to be to declare it as "int sprintf()".  It
  928. X *    is up to the package author to declare sprintf correctly based on the
  929. X *    symbol.
  930. X */
  931. X/*#define    CHARSPRINTF     /**/
  932. X
  933. X/* HAS_CRYPT:
  934. X *    This symbol, if defined, indicates that the crypt routine is available
  935. X *    to encrypt passwords and the like.
  936. X */
  937. X/* TODO */
  938. X/*#define    HAS_CRYPT        /**/
  939. X
  940. X/* DOSUID:
  941. X *    This symbol, if defined, indicates that the C program should
  942. X *    check the script that it is executing for setuid/setgid bits, and
  943. X *    attempt to emulate setuid/setgid on systems that have disabled
  944. X *    setuid #! scripts because the kernel can't do it securely.
  945. X *    It is up to the package designer to make sure that this emulation
  946. X *    is done securely.  Among other things, it should do an fstat on
  947. X *    the script it just opened to make sure it really is a setuid/setgid
  948. X *    script, it should make sure the arguments passed correspond exactly
  949. X *    to the argument on the #! line, and it should not trust any
  950. X *    subprocesses to which it must pass the filename rather than the
  951. X *    file descriptor of the script to be executed.
  952. X */
  953. X/*#define DOSUID        /**/
  954. X
  955. X/* HAS_DUP2:
  956. X *    This symbol, if defined, indicates that the dup2 routine is available
  957. X *    to dup file descriptors.  Otherwise you should use dup().
  958. X */
  959. X#define    HAS_DUP2        /**/
  960. X
  961. X/* HAS_FCHMOD:
  962. X *    This symbol, if defined, indicates that the fchmod routine is available
  963. X *    to change mode of opened files.  If unavailable, use chmod().
  964. X */
  965. X/*#define    HAS_FCHMOD        /**/
  966. X
  967. X/* HAS_FCHOWN:
  968. X *    This symbol, if defined, indicates that the fchown routine is available
  969. X *    to change ownership of opened files.  If unavailable, use chown().
  970. X */
  971. X/*#define    HAS_FCHOWN        /**/
  972. X
  973. X/* I_FCNTL:
  974. X *    This symbol, if defined, indicates to the C program that it should
  975. X *    include fcntl.h.
  976. X */
  977. X/*#define    I_FCNTL        /**/
  978. X
  979. X/* HAS_FLOCK:
  980. X *    This symbol, if defined, indicates that the flock() routine is
  981. X *    available to do file locking.
  982. X */
  983. X/*#define    HAS_FLOCK        /**/
  984. X
  985. X/* HAS_GETGROUPS:
  986. X *    This symbol, if defined, indicates that the getgroups() routine is
  987. X *    available to get the list of process groups.  If unavailable, multiple
  988. X *    groups are probably not supported.
  989. X */
  990. X/*#define    HAS_GETGROUPS        /**/
  991. X
  992. X/* HAS_GETHOSTENT:
  993. X *    This symbol, if defined, indicates that the gethostent() routine is
  994. X *    available to lookup host names in some data base or other.
  995. X */
  996. X/*#define    HAS_GETHOSTENT        /**/
  997. X
  998. X/* HAS_GETPGRP:
  999. X *    This symbol, if defined, indicates that the getpgrp() routine is
  1000. X *    available to get the current process group.
  1001. X */
  1002. X/*#define    HAS_GETPGRP        /**/
  1003. X
  1004. X/* HAS_GETPRIORITY:
  1005. X *    This symbol, if defined, indicates that the getpriority() routine is
  1006. X *    available to get a process's priority.
  1007. X */
  1008. X/*#define    HAS_GETPRIORITY        /**/
  1009. X
  1010. X/* HAS_HTONS:
  1011. X *    This symbol, if defined, indicates that the htons routine (and friends)
  1012. X *    are available to do network order byte swapping.
  1013. X */
  1014. X/* HAS_HTONL:
  1015. X *    This symbol, if defined, indicates that the htonl routine (and friends)
  1016. X *    are available to do network order byte swapping.
  1017. X */
  1018. X/* HAS_NTOHS:
  1019. X *    This symbol, if defined, indicates that the ntohs routine (and friends)
  1020. X *    are available to do network order byte swapping.
  1021. X */
  1022. X/* HAS_NTOHL:
  1023. X *    This symbol, if defined, indicates that the ntohl routine (and friends)
  1024. X *    are available to do network order byte swapping.
  1025. X */
  1026. X/*#define    HAS_HTONS        /**/
  1027. X/*#define    HAS_HTONL        /**/
  1028. X/*#define    HAS_NTOHS        /**/
  1029. X/*#define    HAS_NTOHL        /**/
  1030. X
  1031. X/* index:
  1032. X *    This preprocessor symbol is defined, along with rindex, if the system
  1033. X *    uses the strchr and strrchr routines instead.
  1034. X */
  1035. X/* rindex:
  1036. X *    This preprocessor symbol is defined, along with index, if the system
  1037. X *    uses the strchr and strrchr routines instead.
  1038. X */
  1039. X#define    index strchr    /* cultural */
  1040. X#define    rindex strrchr    /*  differences? */
  1041. X
  1042. X/* I_SYSIOCTL:
  1043. X *    This symbol, if defined, indicates that sys/ioctl.h exists and should
  1044. X *    be included.
  1045. X */
  1046. X/*#define    I_SYSIOCTL        /**/
  1047. X
  1048. X/* HAS_KILLPG:
  1049. X *    This symbol, if defined, indicates that the killpg routine is available
  1050. X *    to kill process groups.  If unavailable, you probably should use kill
  1051. X *    with a negative process number.
  1052. X */
  1053. X/*#define    HAS_KILLPG        /**/
  1054. X
  1055. X/* HAS_MEMCMP:
  1056. X *    This symbol, if defined, indicates that the memcmp routine is available
  1057. X *    to compare blocks of memory.  If undefined, roll your own.
  1058. X */
  1059. X#define    HAS_MEMCMP        /**/
  1060. X
  1061. X/* HAS_MEMCPY:
  1062. X *    This symbol, if defined, indicates that the memcpy routine is available
  1063. X *    to copy blocks of memory.  Otherwise you should probably use bcopy().
  1064. X *    If neither is defined, roll your own.
  1065. X */
  1066. X#define    HAS_MEMCPY        /**/
  1067. X
  1068. X/* HAS_MKDIR:
  1069. X *    This symbol, if defined, indicates that the mkdir routine is available
  1070. X *    to create directories.  Otherwise you should fork off a new process to
  1071. X *    exec /bin/mkdir.
  1072. X */
  1073. X#define    HAS_MKDIR        /**/
  1074. X
  1075. X/* HAS_NDBM:
  1076. X *    This symbol, if defined, indicates that ndbm.h exists and should
  1077. X *    be included.
  1078. X */
  1079. X#define    HAS_NDBM        /**/
  1080. X
  1081. X/* HAS_ODBM:
  1082. X *    This symbol, if defined, indicates that dbm.h exists and should
  1083. X *    be included.
  1084. X */
  1085. X/*#define    HAS_ODBM        /**/
  1086. X
  1087. X/* HAS_READDIR:
  1088. X *    This symbol, if defined, indicates that the readdir routine is available
  1089. X *    from the C library to create directories.
  1090. X */
  1091. X#define    HAS_READDIR        /**/
  1092. X
  1093. X/* HAS_RENAME:
  1094. X *    This symbol, if defined, indicates that the rename routine is available
  1095. X *    to rename files.  Otherwise you should do the unlink(), link(), unlink()
  1096. X *    trick.
  1097. X */
  1098. X#define    HAS_RENAME        /**/
  1099. X
  1100. X/* HAS_RMDIR:
  1101. X *    This symbol, if defined, indicates that the rmdir routine is available
  1102. X *    to remove directories.  Otherwise you should fork off a new process to
  1103. X *    exec /bin/rmdir.
  1104. X */
  1105. X#define    HAS_RMDIR        /**/
  1106. X
  1107. X/* HAS_SETEGID:
  1108. X *    This symbol, if defined, indicates that the setegid routine is available
  1109. X *    to change the effective gid of the current program.
  1110. X */
  1111. X/*#define    HAS_SETEGID        /**/
  1112. X
  1113. X/* HAS_SETEUID:
  1114. X *    This symbol, if defined, indicates that the seteuid routine is available
  1115. X *    to change the effective uid of the current program.
  1116. X */
  1117. X/*#define    HAS_SETEUID        /**/
  1118. X
  1119. X/* HAS_SETPGRP:
  1120. X *    This symbol, if defined, indicates that the setpgrp() routine is
  1121. X *    available to set the current process group.
  1122. X */
  1123. X/*#define    HAS_SETPGRP        /**/
  1124. X
  1125. X/* HAS_SETPRIORITY:
  1126. X *    This symbol, if defined, indicates that the setpriority() routine is
  1127. X *    available to set a process's priority.
  1128. X */
  1129. X/*#define    HAS_SETPRIORITY        /**/
  1130. X
  1131. X/* HAS_SETREGID:
  1132. X *    This symbol, if defined, indicates that the setregid routine is available
  1133. X *    to change the real and effective gid of the current program.
  1134. X */
  1135. X/*#define    HAS_SETREGID        /**/
  1136. X
  1137. X/* HAS_SETREUID:
  1138. X *    This symbol, if defined, indicates that the setreuid routine is available
  1139. X *    to change the real and effective uid of the current program.
  1140. X */
  1141. X/*#define    HAS_SETREUID        /**/
  1142. X
  1143. X/* HAS_SETRGID:
  1144. X *    This symbol, if defined, indicates that the setrgid routine is available
  1145. X *    to change the real gid of the current program.
  1146. X */
  1147. X/*#define    HAS_SETRGID        /**/
  1148. X
  1149. X/* HAS_SETRUID:
  1150. X *    This symbol, if defined, indicates that the setruid routine is available
  1151. X *    to change the real uid of the current program.
  1152. X */
  1153. X/*#define    HAS_SETRUID        /**/
  1154. X
  1155. X/* HAS_SOCKET:
  1156. X *      This symbol, if defined, indicates that the BSD socket interface is
  1157. X *      supported.
  1158. X */
  1159. X/* HAS_SOCKETPAIR:
  1160. X *      This symbol, if defined, indicates that the BSD socketpair call is
  1161. X *      supported.
  1162. X */
  1163. X/* OLDSOCKET:
  1164. X *      This symbol, if defined, indicates that the 4.1c BSD socket interface
  1165. X *      is supported instead of the 4.2/4.3 BSD socket interface.
  1166. X */
  1167. X/*#undef HAS_SOCKET          /**/
  1168. X
  1169. X/*#undef HAS_SOCKETPAIR      /**/
  1170. X
  1171. X/*#undef        OLDSOCKET       /**/
  1172. X
  1173. X/* STATBLOCKS:
  1174. X *    This symbol is defined if this system has a stat structure declaring
  1175. X *    st_blksize and st_blocks.
  1176. X */
  1177. X/*#define    STATBLOCKS     /**/
  1178. X
  1179. X/* STDSTDIO:
  1180. X *    This symbol is defined if this system has a FILE structure declaring
  1181. X *    _ptr and _cnt in stdio.h.
  1182. X */
  1183. X#define    STDSTDIO     /**/
  1184. X
  1185. X/* STRUCTCOPY:
  1186. X *    This symbol, if defined, indicates that this C compiler knows how
  1187. X *    to copy structures.  If undefined, you'll need to use a block copy
  1188. X *    routine of some sort instead.
  1189. X */
  1190. X#define    STRUCTCOPY    /**/
  1191. X
  1192. X/* HAS_SYMLINK:
  1193. X *    This symbol, if defined, indicates that the symlink routine is available
  1194. X *    to create symbolic links.
  1195. X */
  1196. X/*#define    HAS_SYMLINK        /**/
  1197. X
  1198. X/* HAS_SYSCALL:
  1199. X *    This symbol, if defined, indicates that the syscall routine is available
  1200. X *    to call arbitrary system calls.  If undefined, that's tough.
  1201. X */
  1202. X/*#define    HAS_SYSCALL        /**/
  1203. X
  1204. X/* s_tm:
  1205. X *    This symbol is defined if this system declares "struct tm" in
  1206. X *    in <sys/time.h> rather than <time.h>.  We can't just say
  1207. X *    -I/usr/include/sys because some systems have both time files, and
  1208. X *    the -I trick gets the wrong one.
  1209. X */
  1210. X/* I_SYS_TIME:
  1211. X *    This symbol is defined if this system has the file <sys/time.h>.
  1212. X */
  1213. X/*
  1214. X * I_TIME:
  1215. X *    This symbol is defined if time this  system has the file <time.h>.
  1216. X */
  1217. X/*#undef    s_tm     /**/
  1218. X/*#define    I_SYS_TIME     /**/
  1219. X#define I_TIME
  1220. X
  1221. X/* VARARGS:
  1222. X *    This symbol, if defined, indicates to the C program that it should
  1223. X *    include varargs.h.
  1224. X */
  1225. X#define    VARARGS        /**/
  1226. X
  1227. X/* vfork:
  1228. X *    This symbol, if defined, remaps the vfork routine to fork if the
  1229. X *    vfork() routine isn't supported here.
  1230. X */
  1231. X/*#undef    vfork fork    /**/
  1232. X
  1233. X/* VOIDSIG:
  1234. X *    This symbol is defined if this system declares "void (*signal())()" in
  1235. X *    signal.h.  The old way was to declare it as "int (*signal())()".  It
  1236. X *    is up to the package author to declare things correctly based on the
  1237. X *    symbol.
  1238. X */
  1239. X#define    VOIDSIG     /**/
  1240. X
  1241. X/* HAS_VPRINTF:
  1242. X *    This symbol, if defined, indicates that the vprintf routine is available
  1243. X *    to printf with a pointer to an argument list.  If unavailable, you
  1244. X *    may need to write your own, probably in terms of _doprnt().
  1245. X */
  1246. X/* CHARVSPRINTF:
  1247. X *    This symbol is defined if this system has vsprintf() returning type
  1248. X *    (char*).  The trend seems to be to declare it as "int vsprintf()".  It
  1249. X *    is up to the package author to declare vsprintf correctly based on the
  1250. X *    symbol.
  1251. X */
  1252. X#define    HAS_VPRINTF        /**/
  1253. X/*#undef    CHARVSPRINTF     /**/
  1254. X
  1255. X/* GIDTYPE:
  1256. X *    This symbol has a value like gid_t, int, ushort, or whatever type is
  1257. X *    used to declare group ids in the kernel.
  1258. X */
  1259. X/* TODO */
  1260. X#define GIDTYPE int        /**/
  1261. X
  1262. X/* I_DIRENT:
  1263. X *    This symbol, if defined, indicates to the C program that it should
  1264. X *    include dirent.h.
  1265. X */
  1266. X/* DIRNAMLEN:
  1267. X *    This symbol, if defined, indicates to the C program that the length
  1268. X *    of directory entry names is provided by a d_namlen field.  Otherwise
  1269. X *    you need to do strlen() on the d_name field.
  1270. X */
  1271. X/*#undef    I_DIRENT        /**/
  1272. X#define    DIRNAMLEN        /**/
  1273. X
  1274. X/* I_FCNTL:
  1275. X *    This symbol, if defined, indicates to the C program that it should
  1276. X *    include fcntl.h.
  1277. X */
  1278. X/*#define    I_FCNTL        /**/
  1279. X
  1280. X/* I_GRP:
  1281. X *    This symbol, if defined, indicates to the C program that it should
  1282. X *    include grp.h.
  1283. X */
  1284. X/*#define    I_GRP        /**/
  1285. X
  1286. X/* I_PWD:
  1287. X *    This symbol, if defined, indicates to the C program that it should
  1288. X *    include pwd.h.
  1289. X */
  1290. X/* PWQUOTA:
  1291. X *    This symbol, if defined, indicates to the C program that struct passwd
  1292. X *    contains pw_quota.
  1293. X */
  1294. X/* PWAGE:
  1295. X *    This symbol, if defined, indicates to the C program that struct passwd
  1296. X *    contains pw_age.
  1297. X */
  1298. X/*#define    I_PWD        /**/
  1299. X/*#define    PWQUOTA        /**/
  1300. X/*#undef    PWAGE        /**/
  1301. X
  1302. X/* I_SYS_DIR:
  1303. X *    This symbol, if defined, indicates to the C program that it should
  1304. X *    include sys/dir.h.
  1305. X */
  1306. X#define    I_SYS_DIR        /**/
  1307. X
  1308. X/* I_SYSIOCTL:
  1309. X *    This symbol, if defined, indicates that sys/ioctl.h exists and should
  1310. X *    be included.
  1311. X */
  1312. X/*#define    I_SYSIOCTL        /**/
  1313. X
  1314. X/* I_VARARGS:
  1315. X *    This symbol, if defined, indicates to the C program that it should
  1316. X *    include varargs.h.
  1317. X */
  1318. X#define    I_VARARGS        /**/
  1319. X
  1320. X/* INTSIZE:
  1321. X *    This symbol contains the size of an int, so that the C preprocessor
  1322. X *    can make decisions based on it.
  1323. X */
  1324. X#define INTSIZE 2        /**/
  1325. X
  1326. X/* RANDBITS:
  1327. X *    This symbol contains the number of bits of random number the rand()
  1328. X *    function produces.  Usual values are 15, 16, and 31.
  1329. X */
  1330. X#define RANDBITS 31        /**/
  1331. X
  1332. X/* SIG_NAME:
  1333. X *    This symbol contains an list of signal names in order.
  1334. X */
  1335. X#ifdef OS2
  1336. X#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","IOT","EMT","FPE",\
  1337. X      /*      0      1     2     3      4      5     6     7    8 */\
  1338. X   "KILL","BUS","SEGV","SYS","PIPE","UALRM","TERM","ALRM","USR2","CLD",\
  1339. X  /* 9     10     11    12    13     14     15     16     17    18 */\
  1340. X   "PWR","USR3","BREAK","ABRT"
  1341. X  /*19     20     21    22   */
  1342. X#else
  1343. X#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","IOT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","URG","STOP","TSTP","CONT","CHLD","TTIN","TTOU","IO","XCPU","XFSZ","VTALRM","PROF","WINCH","USR1","USR2"        /**/
  1344. X#endif /* OS2 */
  1345. X
  1346. X/* STDCHAR:
  1347. X *    This symbol is defined to be the type of char used in stdio.h.
  1348. X *    It has the values "unsigned char" or "char".
  1349. X */
  1350. X#define STDCHAR char    /**/
  1351. X
  1352. X/* UIDTYPE:
  1353. X *    This symbol has a value like uid_t, int, ushort, or whatever type is
  1354. X *    used to declare user ids in the kernel.
  1355. X */
  1356. X#define UIDTYPE int        /**/
  1357. X
  1358. X/* VOIDFLAGS:
  1359. X *    This symbol indicates how much support of the void type is given by this
  1360. X *    compiler.  What various bits mean:
  1361. X *
  1362. X *        1 = supports declaration of void
  1363. X *        2 = supports arrays of pointers to functions returning void
  1364. X *        4 = supports comparisons between pointers to void functions and
  1365. X *            addresses of void functions
  1366. X *
  1367. X *    The package designer should define VOIDUSED to indicate the requirements
  1368. X *    of the package.  This can be done either by #defining VOIDUSED before
  1369. X *    including config.h, or by defining defvoidused in Myinit.U.  If the
  1370. X *    latter approach is taken, only those flags will be tested.  If the
  1371. X *    level of void support necessary is not present, defines void to int.
  1372. X */
  1373. X#ifndef VOIDUSED
  1374. X#define VOIDUSED 7
  1375. X#endif
  1376. X#define VOIDFLAGS 7
  1377. X#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
  1378. X#define void int        /* is void to be avoided? */
  1379. X#define M_VOID        /* Xenix strikes again */
  1380. X#endif
  1381. X
  1382. X/* PRIVLIB:
  1383. X *    This symbol contains the name of the private library for this package.
  1384. X *    The library is private in the sense that it needn't be in anyone's
  1385. X *    execution path, but it should be accessible by the world.  The program
  1386. X *    should be prepared to do ^ expansion.
  1387. X */
  1388. X#define PRIVLIB "c:/bin/perl"        /**/
  1389. X
  1390. X/*
  1391. X * BUGGY_MSC:
  1392. X *    This symbol is defined if you are the unfortunate owner of a buggy
  1393. X *    Microsoft C compiler and want to use intrinsic functions.  Versions
  1394. X *    up to 5.1 are known conform to this definition.
  1395. X */
  1396. X/*#define BUGGY_MSC            /**/
  1397. X
  1398. X/*
  1399. X * BINARY:
  1400. X *    This symbol is defined if you run under an operating system that
  1401. X *    distinguishes between binary and text files.  If so the function
  1402. X *    setmode will be used to set the file into binary mode.
  1403. X */
  1404. X#define BINARY
  1405. X
  1406. X#define S_ISUID 0
  1407. X#define S_ISGID 0
  1408. X#define CASTNEGFLOAT
  1409. !STUFFY!FUNK!
  1410. echo Extracting os2/popen.c
  1411. sed >os2/popen.c <<'!STUFFY!FUNK!' -e 's/X//'
  1412. X/* added real/protect mode branch at runtime and real mode version
  1413. X * names changed for perl
  1414. X * Kai Uwe Rommel
  1415. X */
  1416. X
  1417. X/*
  1418. XSeveral people in the past have asked about having Unix-like pipe
  1419. Xcalls in OS/2.  The following source file, adapted from 4.3 BSD Unix,
  1420. Xuses a #define to give you a pipe(2) call, and contains function
  1421. Xdefinitions for popen(3) and pclose(3).  Anyone with problems should
  1422. Xsend mail to me; they seem to work fine.
  1423. X
  1424. XMark Towfigh
  1425. XRacal Interlan, Inc.
  1426. X----------------------------------cut-here------------------------------------
  1427. X*/
  1428. X
  1429. X/*
  1430. X * The following code segment is derived from BSD 4.3 Unix.  See
  1431. X * copyright below.  Any bugs, questions, improvements, or problems
  1432. X * should be sent to Mark Towfigh (towfiq@interlan.interlan.com).
  1433. X *
  1434. X * Racal InterLan Inc.
  1435. X */
  1436. X
  1437. X/*
  1438. X * Copyright (c) 1980 Regents of the University of California.
  1439. X * All rights reserved.  The Berkeley software License Agreement
  1440. X * specifies the terms and conditions for redistribution.
  1441. X */
  1442. X
  1443. X#include <stdio.h>
  1444. X#include <stdlib.h>
  1445. X#include <io.h>
  1446. X#include <string.h>
  1447. X#include <process.h>
  1448. X#include <errno.h>
  1449. X
  1450. X#define INCL_NOPM
  1451. X#define    INCL_DOS
  1452. X#include <os2.h>
  1453. X
  1454. Xstatic FILE *dos_popen(const char *cmd, const char *flags);
  1455. Xstatic int dos_pclose(FILE *pipe);
  1456. X
  1457. X/*
  1458. X * emulate Unix pipe(2) call
  1459. X */
  1460. X
  1461. X#define    tst(a,b)    (*mode == 'r'? (b) : (a))
  1462. X#define READH           0
  1463. X#define WRITEH          1
  1464. X
  1465. Xstatic  int       popen_pid[20];
  1466. X
  1467. XFILE *mypopen(char *cmd, char *mode)
  1468. X{
  1469. X    int p[2];
  1470. X        register myside, hisside, save_stream;
  1471. X        char *shell = getenv("COMPSPEC");
  1472. X
  1473. X        if ( shell == NULL )
  1474. X          shell = "C:\\OS2\\CMD.EXE";
  1475. X
  1476. X        if ( _osmode == DOS_MODE )
  1477. X          return dos_popen(cmd, mode);
  1478. X
  1479. X    if (DosMakePipe((PHFILE) &p[0], (PHFILE) &p[1], 4096) < 0)
  1480. X                return NULL;
  1481. X
  1482. X        myside = tst(p[WRITEH], p[READH]);
  1483. X        hisside = tst(p[READH], p[WRITEH]);
  1484. X
  1485. X    /* set up file descriptors for remote function */
  1486. X    save_stream = dup(tst(0, 1));        /* don't lose stdin/out! */
  1487. X        if (dup2(hisside, tst(0, 1)) < 0)
  1488. X        {
  1489. X        perror("dup2");
  1490. X        return NULL;
  1491. X    }
  1492. X        close(hisside);
  1493. X
  1494. X    /*
  1495. X     * make sure that we can close our side of the pipe, by
  1496. X     * preventing it from being inherited!
  1497. X     */
  1498. X
  1499. X    /* set no-inheritance flag */
  1500. X    DosSetFHandState(myside, OPEN_FLAGS_NOINHERIT);
  1501. X
  1502. X    /* execute the command:  it will inherit our other file descriptors */
  1503. X        popen_pid[myside] = spawnlp(P_NOWAIT, shell, shell, "/C", cmd, NULL);
  1504. X
  1505. X    /* now restore our previous file descriptors */
  1506. X        if (dup2(save_stream, tst(0, 1)) < 0)   /* retrieve stdin/out */
  1507. X        {
  1508. X        perror("dup2");
  1509. X        return NULL;
  1510. X    }
  1511. X        close(save_stream);
  1512. X
  1513. X    return fdopen(myside, mode);        /* return a FILE pointer */
  1514. X}
  1515. X
  1516. Xint mypclose(FILE *ptr)
  1517. X{
  1518. X    register f;
  1519. X        int status;
  1520. X
  1521. X        if ( _osmode == DOS_MODE )
  1522. X          return dos_pclose(ptr);
  1523. X
  1524. X    f = fileno(ptr);
  1525. X        fclose(ptr);
  1526. X
  1527. X    /* wait for process to terminate */
  1528. X    cwait(&status, popen_pid[f], WAIT_GRANDCHILD);
  1529. X
  1530. X    return status;
  1531. X}
  1532. X
  1533. X
  1534. Xint pipe(int *filedes)
  1535. X{
  1536. X  int res;
  1537. X
  1538. X  if ( res = DosMakePipe((PHFILE) &filedes[0], (PHFILE) &filedes[1], 4096) )
  1539. X    return res;
  1540. X
  1541. X  DosSetFHandState(filedes[0], OPEN_FLAGS_NOINHERIT);
  1542. X  DosSetFHandState(filedes[1], OPEN_FLAGS_NOINHERIT);
  1543. X  return 0;
  1544. X}
  1545. X
  1546. X
  1547. X/* this is the MS-DOS version */
  1548. X
  1549. Xtypedef enum { unopened = 0, reading, writing } pipemode;
  1550. X
  1551. Xstatic struct
  1552. X{
  1553. X    char *name;
  1554. X    char *command;
  1555. X    pipemode pmode;
  1556. X}
  1557. Xpipes[_NFILE];
  1558. X
  1559. Xstatic FILE *dos_popen(const char *command, const char *mode)
  1560. X{
  1561. X    FILE *current;
  1562. X    char name[128];
  1563. X    int cur;
  1564. X    pipemode curmode;
  1565. X
  1566. X    /*
  1567. X    ** decide on mode.
  1568. X    */
  1569. X    if(strchr(mode, 'r') != NULL)
  1570. X        curmode = reading;
  1571. X    else if(strchr(mode, 'w') != NULL)
  1572. X        curmode = writing;
  1573. X    else
  1574. X        return NULL;
  1575. X
  1576. X    /*
  1577. X    ** get a name to use.
  1578. X    */
  1579. X    strcpy(name, "piXXXXXX");
  1580. X    Mktemp(name);
  1581. X
  1582. X    /*
  1583. X    ** If we're reading, just call system to get a file filled with
  1584. X    ** output.
  1585. X    */
  1586. X    if(curmode == reading)
  1587. X    {
  1588. X        char cmd[256];
  1589. X        sprintf(cmd,"%s > %s", command, name);
  1590. X        system(cmd);
  1591. X
  1592. X        if((current = fopen(name, mode)) == NULL)
  1593. X            return NULL;
  1594. X    }
  1595. X    else
  1596. X    {
  1597. X        if((current = fopen(name, mode)) == NULL)
  1598. X            return NULL;
  1599. X    }
  1600. X
  1601. X    cur = fileno(current);
  1602. X    pipes[cur].name = strdup(name);
  1603. X    pipes[cur].command = strdup(command);
  1604. X    pipes[cur].pmode = curmode;
  1605. X
  1606. X    return current;
  1607. X}
  1608. X
  1609. Xstatic int dos_pclose(FILE * current)
  1610. X{
  1611. X    int cur = fileno(current), rval;
  1612. X    char command[256];
  1613. X
  1614. X    /*
  1615. X    ** check for an open file.
  1616. X    */
  1617. X    if(pipes[cur].pmode == unopened)
  1618. X        return -1;
  1619. X
  1620. X    if(pipes[cur].pmode == reading)
  1621. X    {
  1622. X        /*
  1623. X        ** input pipes are just files we're done with.
  1624. X        */
  1625. X        rval = fclose(current);
  1626. X        unlink(pipes[cur].name);
  1627. X    }
  1628. X    else
  1629. X    {
  1630. X        /*
  1631. X        ** output pipes are temporary files we have
  1632. X        ** to cram down the throats of programs.
  1633. X        */
  1634. X        fclose(current);
  1635. X        sprintf(command,"%s < %s", pipes[cur].command, pipes[cur].name);
  1636. X        rval = system(command);
  1637. X        unlink(pipes[cur].name);
  1638. X    }
  1639. X
  1640. X    /*
  1641. X    ** clean up current pipe.
  1642. X    */
  1643. X    free(pipes[cur].name);
  1644. X    free(pipes[cur].command);
  1645. X    pipes[cur].pmode = unopened;
  1646. X
  1647. X    return rval;
  1648. X}
  1649. !STUFFY!FUNK!
  1650. echo Extracting h2pl/tcbreak2
  1651. sed >h2pl/tcbreak2 <<'!STUFFY!FUNK!' -e 's/X//'
  1652. X#!/usr/bin/perl
  1653. X
  1654. Xrequire 'cbreak2.pl';
  1655. X
  1656. X&cbreak;
  1657. X
  1658. X$| = 1;
  1659. X
  1660. Xprint "gimme a char: ";
  1661. X
  1662. X$c = getc;
  1663. X
  1664. Xprint "$c\n";
  1665. X
  1666. Xprintf "you gave me `%s', which is 0x%02x\n", $c, ord($c);
  1667. X
  1668. X&cooked;
  1669. !STUFFY!FUNK!
  1670. echo " "
  1671. echo "End of kit 25 (of 36)"
  1672. cat /dev/null >kit25isdone
  1673. run=''
  1674. config=''
  1675. for iskit in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36; do
  1676.     if test -f kit${iskit}isdone; then
  1677.     run="$run $iskit"
  1678.     else
  1679.     todo="$todo $iskit"
  1680.     fi
  1681. done
  1682. case $todo in
  1683.     '')
  1684.     echo "You have run all your kits.  Please read README and then type Configure."
  1685.     for combo in *:AA; do
  1686.         if test -f "$combo"; then
  1687.         realfile=`basename $combo :AA`
  1688.         cat $realfile:[A-Z][A-Z] >$realfile
  1689.         rm -rf $realfile:[A-Z][A-Z]
  1690.         fi
  1691.     done
  1692.     rm -rf kit*isdone
  1693.     chmod 755 Configure
  1694.     ;;
  1695.     *)  echo "You have run$run."
  1696.     echo "You still need to run$todo."
  1697.     ;;
  1698. esac
  1699. : Someone might mail this, so...
  1700. exit
  1701.  
  1702. exit 0 # Just in case...
  1703. -- 
  1704. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1705. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1706. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1707. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1708.