home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume41 / wwfs / part19 < prev    next >
Encoding:
Text File  |  1994-01-17  |  88.6 KB  |  2,802 lines

  1. Newsgroups: comp.sources.misc
  2. From: youki-k@is.aist-nara.ac.jp (Youki Kadobayashi)
  3. Subject: v41i104:  wwfs - WorldWide File System, Part19/22
  4. Message-ID: <1994Jan17.202535.20584@sparky.sterling.com>
  5. X-Md4-Signature: 1eb91e7fb0e25903123ab4979840bcd9
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Nara Institute of Science and Technology, Japan
  8. Date: Mon, 17 Jan 1994 20:25:35 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: youki-k@is.aist-nara.ac.jp (Youki Kadobayashi)
  12. Posting-number: Volume 41, Issue 104
  13. Archive-name: wwfs/part19
  14. Environment: UNIX, inet
  15.  
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then feed it
  18. # into a shell via "sh file" or similar.  To overwrite existing files,
  19. # type "sh file -c".
  20. # Contents:  config/mount_irix.c config/os-acis43.h
  21. #   config/os-concentrix.h config/os-convex.h config/os-fpx4.h
  22. #   config/os-hcx.h config/os-hlh42.h config/os-next.h
  23. #   config/os-pyrOSx.h config/os-riscix.h config/os-sos3.h
  24. #   config/os-stellix.h config/os-umax43.h csd/conn.c csd/dumpvar.c
  25. #   csd/err.c csd/global.h csd/proto.c csd/util.h doc/Copyright
  26. #   include/am.h libww/renamesym.pl mule/wwfs-access-hook.el
  27. #   release.pl rpc/cs_prot_svc.c wwmount/Makefile.build
  28. # Wrapped by kent@sparky on Sun Jan 16 17:48:40 1994
  29. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  30. echo If this archive is complete, you will see the following message:
  31. echo '          "shar: End of archive 19 (of 22)."'
  32. if test -f 'config/mount_irix.c' -a "${1}" != "-c" ; then 
  33.   echo shar: Will not clobber existing file \"'config/mount_irix.c'\"
  34. else
  35.   echo shar: Extracting \"'config/mount_irix.c'\" \(2792 characters\)
  36.   sed "s/^X//" >'config/mount_irix.c' <<'END_OF_FILE'
  37. X/*
  38. X * Copyright (c) 1990 Jan-Simon Pendry
  39. X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
  40. X * Copyright (c) 1990 The Regents of the University of California.
  41. X * All rights reserved.
  42. X *
  43. X * This code is derived from software contributed to Berkeley by
  44. X * Jan-Simon Pendry at Imperial College, London.
  45. X *
  46. X * Redistribution and use in source and binary forms, with or without
  47. X * modification, are permitted provided that the following conditions
  48. X * are met:
  49. X * 1. Redistributions of source code must retain the above copyright
  50. X *    notice, this list of conditions and the following disclaimer.
  51. X * 2. Redistributions in binary form must reproduce the above copyright
  52. X *    notice, this list of conditions and the following disclaimer in the
  53. X *    documentation and/or other materials provided with the distribution.
  54. X * 3. All advertising materials mentioning features or use of this software
  55. X *    must display the following acknowledgement:
  56. X *      This product includes software developed by the University of
  57. X *      California, Berkeley and its contributors.
  58. X * 4. Neither the name of the University nor the names of its contributors
  59. X *    may be used to endorse or promote products derived from this software
  60. X *    without specific prior written permission.
  61. X *
  62. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  63. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  64. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  65. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  66. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  67. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  68. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  69. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  70. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  71. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  72. X * SUCH DAMAGE.
  73. X *
  74. X *    %W% (Berkeley) %G%
  75. X *
  76. X * $Id: mount_irix.c,v 5.2.2.1 1992/02/09 15:10:32 jsp beta $
  77. X *
  78. X */
  79. X
  80. X
  81. X/*
  82. X * IRIX Mount helper
  83. X */
  84. X
  85. X#include "misc-irix.h"
  86. X
  87. X/*
  88. X * Map from conventional mount arguments
  89. X * to IRIX style arguments.
  90. X */
  91. Xirix_mount(fsname, dir, flags, type, data)
  92. Xchar *fsname;
  93. Xchar *dir;
  94. Xint flags;
  95. Xint type;
  96. Xvoid *data;
  97. X{
  98. X    int size;
  99. X
  100. X#ifdef DEBUG
  101. X    dlog("irix_mount: fsname %s, dir %s, type %d", fsname, dir, type);
  102. X#endif /* DEBUG */
  103. X
  104. X    if (type == MOUNT_TYPE_NFS) {
  105. X
  106. X        size = sizeof (struct nfs_args);
  107. X
  108. X        return mount(dir, dir, (MS_FSS|MS_DATA|flags),
  109. X                 type, (struct nfs_args *) data, size);
  110. X
  111. X    } else if (type == MOUNT_TYPE_UFS) {
  112. X
  113. X        return mount(fsname, dir, (MS_FSS|flags), type);
  114. X
  115. X    } else {
  116. X        return EINVAL;
  117. X    }
  118. X
  119. X}
  120. END_OF_FILE
  121.   if test 2792 -ne `wc -c <'config/mount_irix.c'`; then
  122.     echo shar: \"'config/mount_irix.c'\" unpacked with wrong size!
  123.   fi
  124.   # end of 'config/mount_irix.c'
  125. fi
  126. if test -f 'config/os-acis43.h' -a "${1}" != "-c" ; then 
  127.   echo shar: Will not clobber existing file \"'config/os-acis43.h'\"
  128. else
  129.   echo shar: Extracting \"'config/os-acis43.h'\" \(2902 characters\)
  130.   sed "s/^X//" >'config/os-acis43.h' <<'END_OF_FILE'
  131. X/*
  132. X * Copyright (c) 1989 Jan-Simon Pendry
  133. X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
  134. X * Copyright (c) 1989 The Regents of the University of California.
  135. X * All rights reserved.
  136. X *
  137. X * This code is derived from software contributed to Berkeley by
  138. X * Jan-Simon Pendry at Imperial College, London.
  139. X *
  140. X * Redistribution and use in source and binary forms, with or without
  141. X * modification, are permitted provided that the following conditions
  142. X * are met:
  143. X * 1. Redistributions of source code must retain the above copyright
  144. X *    notice, this list of conditions and the following disclaimer.
  145. X * 2. Redistributions in binary form must reproduce the above copyright
  146. X *    notice, this list of conditions and the following disclaimer in the
  147. X *    documentation and/or other materials provided with the distribution.
  148. X * 3. All advertising materials mentioning features or use of this software
  149. X *    must display the following acknowledgement:
  150. X *      This product includes software developed by the University of
  151. X *      California, Berkeley and its contributors.
  152. X * 4. Neither the name of the University nor the names of its contributors
  153. X *    may be used to endorse or promote products derived from this software
  154. X *    without specific prior written permission.
  155. X *
  156. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  157. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  158. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  159. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  160. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  161. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  162. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  163. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  164. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  165. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  166. X * SUCH DAMAGE.
  167. X *
  168. X *    %W% (Berkeley) %G%
  169. X *
  170. X * $Id: os-acis43.h,v 5.2.2.1 1992/02/09 15:10:02 jsp beta $
  171. X *
  172. X * IBM RT ACIS4.3 definitions for Amd (automounter)
  173. X */
  174. X
  175. X/*
  176. X * Does the compiler grok void *
  177. X */
  178. X#define    VOIDP
  179. X
  180. X/*
  181. X * Which version of the Sun RPC library we are using
  182. X * This is the implementation release number, not
  183. X * the protocol revision number.
  184. X */
  185. X#define    RPC_3
  186. X
  187. X/*
  188. X * Which version of the NFS interface are we using.
  189. X * This is the implementation release number, not
  190. X * the protocol revision number.
  191. X */
  192. X#define    NFS_3
  193. X
  194. X/*
  195. X * Does this OS have NDBM support?
  196. X */
  197. X#define OS_HAS_NDBM
  198. X
  199. X/*
  200. X * Name of filesystem types
  201. X */
  202. X#define    MOUNT_TYPE_NFS    MOUNT_NFS
  203. X#define    MOUNT_TYPE_UFS    MOUNT_UFS
  204. X#undef MTAB_TYPE_UFS
  205. X#define    MTAB_TYPE_UFS    "ufs"
  206. X
  207. X#undef ARCH_ENDIAN
  208. X#define    ARCH_ENDIAN    "big"
  209. X
  210. X/*
  211. X * Need precise symlink lengths
  212. X#define PRECISE_SYMLINKS
  213. X */
  214. END_OF_FILE
  215.   if test 2902 -ne `wc -c <'config/os-acis43.h'`; then
  216.     echo shar: \"'config/os-acis43.h'\" unpacked with wrong size!
  217.   fi
  218.   # end of 'config/os-acis43.h'
  219. fi
  220. if test -f 'config/os-concentrix.h' -a "${1}" != "-c" ; then 
  221.   echo shar: Will not clobber existing file \"'config/os-concentrix.h'\"
  222. else
  223.   echo shar: Extracting \"'config/os-concentrix.h'\" \(2825 characters\)
  224.   sed "s/^X//" >'config/os-concentrix.h' <<'END_OF_FILE'
  225. X/*
  226. X * Copyright (c) 1989 Jan-Simon Pendry
  227. X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
  228. X * Copyright (c) 1989 The Regents of the University of California.
  229. X * All rights reserved.
  230. X *
  231. X * This code is derived from software contributed to Berkeley by
  232. X * Jan-Simon Pendry at Imperial College, London.
  233. X *
  234. X * Redistribution and use in source and binary forms, with or without
  235. X * modification, are permitted provided that the following conditions
  236. X * are met:
  237. X * 1. Redistributions of source code must retain the above copyright
  238. X *    notice, this list of conditions and the following disclaimer.
  239. X * 2. Redistributions in binary form must reproduce the above copyright
  240. X *    notice, this list of conditions and the following disclaimer in the
  241. X *    documentation and/or other materials provided with the distribution.
  242. X * 3. All advertising materials mentioning features or use of this software
  243. X *    must display the following acknowledgement:
  244. X *      This product includes software developed by the University of
  245. X *      California, Berkeley and its contributors.
  246. X * 4. Neither the name of the University nor the names of its contributors
  247. X *    may be used to endorse or promote products derived from this software
  248. X *    without specific prior written permission.
  249. X *
  250. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  251. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  252. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  253. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  254. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  255. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  256. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  257. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  258. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  259. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  260. X * SUCH DAMAGE.
  261. X *
  262. X *    %W% (Berkeley) %G%
  263. X *
  264. X * $Id: os-concentrix.h,v 5.2.2.1 1992/02/09 15:10:14 jsp beta $
  265. X *
  266. X * Alliant Concentrix 5.0.0 definitions for Amd (automounter)
  267. X */
  268. X
  269. X/*
  270. X * Does the compiler grok void *
  271. X */
  272. X#undef    VOIDP
  273. X
  274. X/*
  275. X * Which version of the Sun RPC library we are using
  276. X * This is the implementation release number, not
  277. X * the protocol revision number.
  278. X */
  279. X#define    RPC_3
  280. X
  281. X/*
  282. X * Which version of the NFS interface are we using.
  283. X * This is the implementation release number, not
  284. X * the protocol revision number.
  285. X */
  286. X#define    NFS_3
  287. X
  288. X/*
  289. X * Does this OS have NDBM support?
  290. X */
  291. X#define OS_HAS_NDBM
  292. X
  293. X/*
  294. X * Byte ordering
  295. X */
  296. X#undef ARCH_ENDIAN
  297. X#define    ARCH_ENDIAN    "big"
  298. X
  299. X/*
  300. X * Name of filesystem types
  301. X */
  302. X#define MOUNT_TYPE_NFS    MOUNT_NFS
  303. X#define MOUNT_TYPE_UFS    MOUNT_UFS
  304. END_OF_FILE
  305.   if test 2825 -ne `wc -c <'config/os-concentrix.h'`; then
  306.     echo shar: \"'config/os-concentrix.h'\" unpacked with wrong size!
  307.   fi
  308.   # end of 'config/os-concentrix.h'
  309. fi
  310. if test -f 'config/os-convex.h' -a "${1}" != "-c" ; then 
  311.   echo shar: Will not clobber existing file \"'config/os-convex.h'\"
  312. else
  313.   echo shar: Extracting \"'config/os-convex.h'\" \(2868 characters\)
  314.   sed "s/^X//" >'config/os-convex.h' <<'END_OF_FILE'
  315. X/*
  316. X * Copyright (c) 1990 Jan-Simon Pendry
  317. X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
  318. X * Copyright (c) 1990 The Regents of the University of California.
  319. X * All rights reserved.
  320. X *
  321. X * This code is derived from software contributed to Berkeley by
  322. X * Jan-Simon Pendry at Imperial College, London.
  323. X *
  324. X * Redistribution and use in source and binary forms, with or without
  325. X * modification, are permitted provided that the following conditions
  326. X * are met:
  327. X * 1. Redistributions of source code must retain the above copyright
  328. X *    notice, this list of conditions and the following disclaimer.
  329. X * 2. Redistributions in binary form must reproduce the above copyright
  330. X *    notice, this list of conditions and the following disclaimer in the
  331. X *    documentation and/or other materials provided with the distribution.
  332. X * 3. All advertising materials mentioning features or use of this software
  333. X *    must display the following acknowledgement:
  334. X *      This product includes software developed by the University of
  335. X *      California, Berkeley and its contributors.
  336. X * 4. Neither the name of the University nor the names of its contributors
  337. X *    may be used to endorse or promote products derived from this software
  338. X *    without specific prior written permission.
  339. X *
  340. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  341. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  342. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  343. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  344. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  345. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  346. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  347. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  348. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  349. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  350. X * SUCH DAMAGE.
  351. X *
  352. X *    %W% (Berkeley) %G%
  353. X *
  354. X * $Id: os-convex.h,v 5.2.2.1 1992/02/09 15:10:16 jsp beta $
  355. X *
  356. X * Convex C220, version 7.1 definitions for Amd (automounter)
  357. X *         from Eitan Mizrotsky <eitan@shum.huji.ac.il>
  358. X */
  359. X
  360. X
  361. X/*
  362. X * Does the compiler grok void *
  363. X */
  364. X#undef    VOIDP
  365. X/*
  366. X * Which version of the Sun RPC library we are using
  367. X * This is the implementation release number, not
  368. X * the protocol revision number.
  369. X */
  370. X#define    RPC_3
  371. X/*
  372. X * Which version of the NFS interface are we using.
  373. X * This is the implementation release number, not
  374. X * the protocol revision number.
  375. X */
  376. X#define    NFS_3
  377. X/*
  378. X * Byte ordering
  379. X */
  380. X#undef ARCH_ENDIAN
  381. X#define    ARCH_ENDIAN    "big"
  382. X/*
  383. X * Name of filesystem types
  384. X */
  385. X#define    MOUNT_TYPE_UFS    MOUNT_UFS
  386. X#define MOUNT_TYPE_NFS    MOUNT_NFS
  387. X#define strrchr rindex
  388. X#define strchr  index
  389. END_OF_FILE
  390.   if test 2868 -ne `wc -c <'config/os-convex.h'`; then
  391.     echo shar: \"'config/os-convex.h'\" unpacked with wrong size!
  392.   fi
  393.   # end of 'config/os-convex.h'
  394. fi
  395. if test -f 'config/os-fpx4.h' -a "${1}" != "-c" ; then 
  396.   echo shar: Will not clobber existing file \"'config/os-fpx4.h'\"
  397. else
  398.   echo shar: Extracting \"'config/os-fpx4.h'\" \(3121 characters\)
  399.   sed "s/^X//" >'config/os-fpx4.h' <<'END_OF_FILE'
  400. X/*
  401. X * Copyright (c) 1990 Jan-Simon Pendry
  402. X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
  403. X * Copyright (c) 1990 The Regents of the University of California.
  404. X * All rights reserved.
  405. X *
  406. X * This code is derived from software contributed to Berkeley by
  407. X * Jan-Simon Pendry at Imperial College, London.
  408. X *
  409. X * Redistribution and use in source and binary forms, with or without
  410. X * modification, are permitted provided that the following conditions
  411. X * are met:
  412. X * 1. Redistributions of source code must retain the above copyright
  413. X *    notice, this list of conditions and the following disclaimer.
  414. X * 2. Redistributions in binary form must reproduce the above copyright
  415. X *    notice, this list of conditions and the following disclaimer in the
  416. X *    documentation and/or other materials provided with the distribution.
  417. X * 3. All advertising materials mentioning features or use of this software
  418. X *    must display the following acknowledgement:
  419. X *      This product includes software developed by the University of
  420. X *      California, Berkeley and its contributors.
  421. X * 4. Neither the name of the University nor the names of its contributors
  422. X *    may be used to endorse or promote products derived from this software
  423. X *    without specific prior written permission.
  424. X *
  425. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  426. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  427. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  428. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  429. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  430. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  431. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  432. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  433. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  434. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  435. X * SUCH DAMAGE.
  436. X *
  437. X *    %W% (Berkeley) %G%
  438. X *
  439. X * $Id: os-fpx4.h,v 5.2.2.2 1992/05/31 16:39:34 jsp Exp $
  440. X *
  441. X * Celerity FPX 4.1/2 definitions for Amd (automounter)
  442. X *      from Stephen Pope <scp@grizzly.acl.lanl.gov>
  443. X */
  444. X
  445. X/*
  446. X * FPX wants to include sys headers multiple times
  447. X */
  448. X#define INCLUDE_HEADERS
  449. X
  450. X/*
  451. X * FPX sys/mount.h includes sys/nfs.h; prevent this
  452. X */
  453. X#define INCLUDED_nfs
  454. X
  455. X/*
  456. X * FPX doesn't define NMOUNT anywhere
  457. X */
  458. X#define NMOUNT 40
  459. X
  460. X/*
  461. X * Does the compiler grok void *
  462. X */
  463. X/* #define VOIDP */
  464. X
  465. X/*
  466. X * Which version of the Sun RPC library we are using
  467. X * This is the implementation release number, not
  468. X * the protocol revision number.
  469. X */
  470. X#define    RPC_4
  471. X#define    svc_fdset svc_fds
  472. X#define    svc_getreqset(p) svc_getreq((*p).fds_bits[0])
  473. X
  474. X/*
  475. X * Which version of the NFS interface are we using.
  476. X * This is the implementation release number, not
  477. X * the protocol revision number.
  478. X */
  479. X#define NFS_3
  480. X
  481. X/*
  482. X * Byte ordering
  483. X */
  484. X#undef ARCH_ENDIAN
  485. X#define ARCH_ENDIAN     "big"
  486. X
  487. X/*
  488. X * Name of filesystem types
  489. X */
  490. X#define MOUNT_TYPE_NFS MOUNT_NFS
  491. X#define MOUNT_TYPE_UFS MOUNT_UFS
  492. END_OF_FILE
  493.   if test 3121 -ne `wc -c <'config/os-fpx4.h'`; then
  494.     echo shar: \"'config/os-fpx4.h'\" unpacked with wrong size!
  495.   fi
  496.   # end of 'config/os-fpx4.h'
  497. fi
  498. if test -f 'config/os-hcx.h' -a "${1}" != "-c" ; then 
  499.   echo shar: Will not clobber existing file \"'config/os-hcx.h'\"
  500. else
  501.   echo shar: Extracting \"'config/os-hcx.h'\" \(3020 characters\)
  502.   sed "s/^X//" >'config/os-hcx.h' <<'END_OF_FILE'
  503. X/*
  504. X * Copyright (c) 1990 Jan-Simon Pendry
  505. X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
  506. X * Copyright (c) 1990 The Regents of the University of California.
  507. X * All rights reserved.
  508. X *
  509. X * This code is derived from software contributed to Berkeley by
  510. X * Jan-Simon Pendry at Imperial College, London.
  511. X *
  512. X * Redistribution and use in source and binary forms, with or without
  513. X * modification, are permitted provided that the following conditions
  514. X * are met:
  515. X * 1. Redistributions of source code must retain the above copyright
  516. X *    notice, this list of conditions and the following disclaimer.
  517. X * 2. Redistributions in binary form must reproduce the above copyright
  518. X *    notice, this list of conditions and the following disclaimer in the
  519. X *    documentation and/or other materials provided with the distribution.
  520. X * 3. All advertising materials mentioning features or use of this software
  521. X *    must display the following acknowledgement:
  522. X *      This product includes software developed by the University of
  523. X *      California, Berkeley and its contributors.
  524. X * 4. Neither the name of the University nor the names of its contributors
  525. X *    may be used to endorse or promote products derived from this software
  526. X *    without specific prior written permission.
  527. X *
  528. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  529. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  530. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  531. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  532. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  533. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  534. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  535. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  536. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  537. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  538. X * SUCH DAMAGE.
  539. X *
  540. X *    %W% (Berkeley) %G%
  541. X *
  542. X * $Id: os-hcx.h,v 5.2.2.1 1992/02/09 15:10:20 jsp beta $
  543. X *
  544. X * Harris HCX/UX Release 3.0 definitions for Amd (automounter)
  545. X */
  546. X
  547. X/*
  548. X * Which version of the Sun RPC library we are using
  549. X * This is the implementation release number, not
  550. X * the protocol revision number.
  551. X */
  552. X#define    RPC_3
  553. X
  554. X/*
  555. X * Which version of the NFS interface are we using.
  556. X * This is the implementation release number, not
  557. X * the protocol revision number.
  558. X */
  559. X#define    NFS_3
  560. X
  561. X/*
  562. X * Deviant call necessary.  The mount() routine in libc only works for UFS
  563. X * (it's a backward-compatible piece of C code which traps to mountsyscall).
  564. X */
  565. X#undef MOUNT_TRAP
  566. X#define    MOUNT_TRAP(type, mnt, flags, mnt_data) \
  567. X    mountsyscall(type, mnt->mnt_dir, flags, mnt_data)
  568. X
  569. X/*
  570. X * Name of filesystem types
  571. X */
  572. X#define    MOUNT_TYPE_NFS    MOUNT_NFS
  573. X#define    MOUNT_TYPE_UFS    MOUNT_UFS
  574. X
  575. X/*
  576. X * Byte ordering
  577. X */
  578. X#undef ARCH_ENDIAN
  579. X#ifdef _hcx
  580. X#define ARCH_ENDIAN "big"
  581. X#else
  582. XXXX - bizarre!
  583. X#endif
  584. END_OF_FILE
  585.   if test 3020 -ne `wc -c <'config/os-hcx.h'`; then
  586.     echo shar: \"'config/os-hcx.h'\" unpacked with wrong size!
  587.   fi
  588.   # end of 'config/os-hcx.h'
  589. fi
  590. if test -f 'config/os-hlh42.h' -a "${1}" != "-c" ; then 
  591.   echo shar: Will not clobber existing file \"'config/os-hlh42.h'\"
  592. else
  593.   echo shar: Extracting \"'config/os-hlh42.h'\" \(2996 characters\)
  594.   sed "s/^X//" >'config/os-hlh42.h' <<'END_OF_FILE'
  595. X/*
  596. X * Copyright (c) 1989 Jan-Simon Pendry
  597. X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
  598. X * Copyright (c) 1989 The Regents of the University of California.
  599. X * All rights reserved.
  600. X *
  601. X * This code is derived from software contributed to Berkeley by
  602. X * Jan-Simon Pendry at Imperial College, London.
  603. X *
  604. X * Redistribution and use in source and binary forms, with or without
  605. X * modification, are permitted provided that the following conditions
  606. X * are met:
  607. X * 1. Redistributions of source code must retain the above copyright
  608. X *    notice, this list of conditions and the following disclaimer.
  609. X * 2. Redistributions in binary form must reproduce the above copyright
  610. X *    notice, this list of conditions and the following disclaimer in the
  611. X *    documentation and/or other materials provided with the distribution.
  612. X * 3. All advertising materials mentioning features or use of this software
  613. X *    must display the following acknowledgement:
  614. X *      This product includes software developed by the University of
  615. X *      California, Berkeley and its contributors.
  616. X * 4. Neither the name of the University nor the names of its contributors
  617. X *    may be used to endorse or promote products derived from this software
  618. X *    without specific prior written permission.
  619. X *
  620. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  621. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  622. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  623. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  624. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  625. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  626. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  627. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  628. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  629. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  630. X * SUCH DAMAGE.
  631. X *
  632. X *    %W% (Berkeley) %G%
  633. X *
  634. X * $Id: os-hlh42.h,v 5.2.2.1 1992/02/09 15:10:22 jsp beta $
  635. X *
  636. X * HLH OTS definitions for Amd (automounter)
  637. X */
  638. X
  639. X/*
  640. X * Does the compiler grok void *
  641. X */
  642. X#undef    VOIDP
  643. X
  644. X/*
  645. X * Which version of the Sun RPC library we are using
  646. X * This is the implementation release number, not
  647. X * the protocol revision number.
  648. X */
  649. X#define    RPC_3
  650. X
  651. X/*
  652. X * Which version of the NFS interface are we using.
  653. X * This is the implementation release number, not
  654. X * the protocol revision number.
  655. X */
  656. X#define    NFS_3
  657. X
  658. X/*
  659. X * Byte ordering
  660. X */
  661. X#undef ARCH_ENDIAN
  662. X#if defined(hlh)
  663. X#define    ARCH_ENDIAN    "little"
  664. X#endif
  665. X
  666. X/*
  667. X * Name of filesystem types
  668. X */
  669. X#define    MOUNT_TYPE_NFS    MOUNT_NFS
  670. X#define    MOUNT_TYPE_UFS    MOUNT_UFS
  671. X
  672. X/*
  673. X * Miscellaneous HLH 4.2 incantations
  674. X */
  675. X#define    strchr    index
  676. X#define strrchr    rindex
  677. X#define sigmask(x)    (1 << ((x)-1))
  678. X
  679. X/*
  680. X * HLH's 4.2 needs the extra RPC definitions.
  681. X */
  682. X#define NEED_XDR_POINTER
  683. X#define    NEED_CLNT_SPERRNO
  684. END_OF_FILE
  685.   if test 2996 -ne `wc -c <'config/os-hlh42.h'`; then
  686.     echo shar: \"'config/os-hlh42.h'\" unpacked with wrong size!
  687.   fi
  688.   # end of 'config/os-hlh42.h'
  689. fi
  690. if test -f 'config/os-next.h' -a "${1}" != "-c" ; then 
  691.   echo shar: Will not clobber existing file \"'config/os-next.h'\"
  692. else
  693.   echo shar: Extracting \"'config/os-next.h'\" \(2927 characters\)
  694.   sed "s/^X//" >'config/os-next.h' <<'END_OF_FILE'
  695. X/*
  696. X * Copyright (c) 1990 Jan-Simon Pendry
  697. X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
  698. X * Copyright (c) 1990 The Regents of the University of California.
  699. X * All rights reserved.
  700. X *
  701. X * This code is derived from software contributed to Berkeley by
  702. X * Jan-Simon Pendry at Imperial College, London.
  703. X *
  704. X * Redistribution and use in source and binary forms, with or without
  705. X * modification, are permitted provided that the following conditions
  706. X * are met:
  707. X * 1. Redistributions of source code must retain the above copyright
  708. X *    notice, this list of conditions and the following disclaimer.
  709. X * 2. Redistributions in binary form must reproduce the above copyright
  710. X *    notice, this list of conditions and the following disclaimer in the
  711. X *    documentation and/or other materials provided with the distribution.
  712. X * 3. All advertising materials mentioning features or use of this software
  713. X *    must display the following acknowledgement:
  714. X *      This product includes software developed by the University of
  715. X *      California, Berkeley and its contributors.
  716. X * 4. Neither the name of the University nor the names of its contributors
  717. X *    may be used to endorse or promote products derived from this software
  718. X *    without specific prior written permission.
  719. X *
  720. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  721. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  722. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  723. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  724. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  725. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  726. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  727. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  728. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  729. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  730. X * SUCH DAMAGE.
  731. X *
  732. X *    %W% (Berkeley) %G%
  733. X *
  734. X * $Id: os-next.h,v 5.2.2.1 1992/02/09 15:10:33 jsp beta $
  735. X *
  736. X * NeXT OS definitions for Amd (automounter)
  737. X * By Bill Trost, Reed College
  738. X * trost%reed@cse.ogi.edu,
  739. X *
  740. X * Derived from the Sun 3.2 definitions for Amd (os-sos3.h).
  741. X */
  742. X
  743. X/*
  744. X * Does the compiler grok void *    (NeXT uses gcc)
  745. X */
  746. X#define VOIDP
  747. X
  748. X/*
  749. X * Which version of the Sun RPC library we are using
  750. X * This is the implementation release number, not
  751. X * the protocol revision number.
  752. X */
  753. X#define RPC_3
  754. X
  755. X/*
  756. X * Which version of the NFS interface are we using.
  757. X * This is the implementation release number, not
  758. X * the protocol revision number.
  759. X */
  760. X#define NFS_3
  761. X
  762. X/*
  763. X * Name of filesystem types
  764. X */
  765. X#define MOUNT_TYPE_UFS    MOUNT_UFS
  766. X#define MOUNT_TYPE_NFS    MOUNT_NFS
  767. X#undef MTAB_TYPE_UFS
  768. X#define MTAB_TYPE_UFS    "4.3"
  769. X
  770. X/*
  771. X * Where to get NFS definitions
  772. X */
  773. X#define NFS_HDR "misc-next.h"
  774. END_OF_FILE
  775.   if test 2927 -ne `wc -c <'config/os-next.h'`; then
  776.     echo shar: \"'config/os-next.h'\" unpacked with wrong size!
  777.   fi
  778.   # end of 'config/os-next.h'
  779. fi
  780. if test -f 'config/os-pyrOSx.h' -a "${1}" != "-c" ; then 
  781.   echo shar: Will not clobber existing file \"'config/os-pyrOSx.h'\"
  782. else
  783.   echo shar: Extracting \"'config/os-pyrOSx.h'\" \(2864 characters\)
  784.   sed "s/^X//" >'config/os-pyrOSx.h' <<'END_OF_FILE'
  785. X/*
  786. X * Copyright (c) 1990 Jan-Simon Pendry
  787. X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
  788. X * Copyright (c) 1990 The Regents of the University of California.
  789. X * All rights reserved.
  790. X *
  791. X * This code is derived from software contributed to Berkeley by
  792. X * Jan-Simon Pendry at Imperial College, London.
  793. X *
  794. X * Redistribution and use in source and binary forms, with or without
  795. X * modification, are permitted provided that the following conditions
  796. X * are met:
  797. X * 1. Redistributions of source code must retain the above copyright
  798. X *    notice, this list of conditions and the following disclaimer.
  799. X * 2. Redistributions in binary form must reproduce the above copyright
  800. X *    notice, this list of conditions and the following disclaimer in the
  801. X *    documentation and/or other materials provided with the distribution.
  802. X * 3. All advertising materials mentioning features or use of this software
  803. X *    must display the following acknowledgement:
  804. X *      This product includes software developed by the University of
  805. X *      California, Berkeley and its contributors.
  806. X * 4. Neither the name of the University nor the names of its contributors
  807. X *    may be used to endorse or promote products derived from this software
  808. X *    without specific prior written permission.
  809. X *
  810. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  811. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  812. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  813. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  814. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  815. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  816. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  817. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  818. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  819. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  820. X * SUCH DAMAGE.
  821. X *
  822. X *    %W% (Berkeley) %G%
  823. X *
  824. X * $Id: os-pyrOSx.h,v 5.2.2.1 1992/02/09 15:10:37 jsp beta $
  825. X *
  826. X * Pyramid OSx definitions for Amd (automounter)
  827. X *        from Stefan Petri <petri@tubsibr.UUCP>
  828. X */
  829. X
  830. X/*
  831. X * Does the compiler grok void *
  832. X */
  833. X#define    VOIDP
  834. X
  835. X/*
  836. X * Which version of the Sun RPC library we are using
  837. X * This is the implementation release number, not
  838. X * the protocol revision number.
  839. X */
  840. X#define    RPC_3
  841. X
  842. X/*
  843. X * Which version of the NFS interface are we using.
  844. X * This is the implementation release number, not
  845. X * the protocol revision number.
  846. X */
  847. X#define    NFS_3
  848. X
  849. X/*
  850. X * Byte ordering
  851. X */
  852. X#undef ARCH_ENDIAN
  853. X#define    ARCH_ENDIAN    "big"
  854. X
  855. X/*
  856. X * Name of filesystem types
  857. X */
  858. X#define    MOUNT_TYPE_UFS    MOUNT_UFS
  859. X#define MOUNT_TYPE_NFS    MOUNT_NFS
  860. X
  861. X#define    strchr    index
  862. X#define    strrchr    rindex
  863. X
  864. X#define    hostname    mnthostname
  865. END_OF_FILE
  866.   if test 2864 -ne `wc -c <'config/os-pyrOSx.h'`; then
  867.     echo shar: \"'config/os-pyrOSx.h'\" unpacked with wrong size!
  868.   fi
  869.   # end of 'config/os-pyrOSx.h'
  870. fi
  871. if test -f 'config/os-riscix.h' -a "${1}" != "-c" ; then 
  872.   echo shar: Will not clobber existing file \"'config/os-riscix.h'\"
  873. else
  874.   echo shar: Extracting \"'config/os-riscix.h'\" \(2983 characters\)
  875.   sed "s/^X//" >'config/os-riscix.h' <<'END_OF_FILE'
  876. X/*
  877. X * Copyright (c) 1989 Jan-Simon Pendry
  878. X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
  879. X * Copyright (c) 1989 The Regents of the University of California.
  880. X * All rights reserved.
  881. X *
  882. X * This code is derived from software contributed to Berkeley by
  883. X * Jan-Simon Pendry at Imperial College, London.
  884. X *
  885. X * Redistribution and use in source and binary forms, with or without
  886. X * modification, are permitted provided that the following conditions
  887. X * are met:
  888. X * 1. Redistributions of source code must retain the above copyright
  889. X *    notice, this list of conditions and the following disclaimer.
  890. X * 2. Redistributions in binary form must reproduce the above copyright
  891. X *    notice, this list of conditions and the following disclaimer in the
  892. X *    documentation and/or other materials provided with the distribution.
  893. X * 3. All advertising materials mentioning features or use of this software
  894. X *    must display the following acknowledgement:
  895. X *      This product includes software developed by the University of
  896. X *      California, Berkeley and its contributors.
  897. X * 4. Neither the name of the University nor the names of its contributors
  898. X *    may be used to endorse or promote products derived from this software
  899. X *    without specific prior written permission.
  900. X *
  901. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  902. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  903. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  904. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  905. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  906. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  907. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  908. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  909. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  910. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  911. X * SUCH DAMAGE.
  912. X *
  913. X *    %W% (Berkeley) %G%
  914. X *
  915. X * $Id: os-riscix.h,v 5.2.2.1 1992/02/09 15:10:38 jsp beta $
  916. X *
  917. X * Acorn Archimedes RISC iX definitions for Amd (automounter)
  918. X * Contributed by Piete Brooks.
  919. X */
  920. X
  921. X/*
  922. X * Does the compiler grok void *
  923. X */
  924. X#define    VOIDP
  925. X
  926. X/*
  927. X * Which version of the Sun RPC library we are using
  928. X * This is the implementation release number, not
  929. X * the protocol revision number.
  930. X */
  931. X#define    RPC_3
  932. X
  933. X/*
  934. X * Which version of the NFS interface are we using.
  935. X * This is the implementation release number, not
  936. X * the protocol revision number.
  937. X */
  938. X#define    NFS_3
  939. X
  940. X/*
  941. X * Does this OS have NDBM support?
  942. X */
  943. X#define OS_HAS_NDBM
  944. X
  945. X/*
  946. X * Byte ordering
  947. X */
  948. X#undef    ARCH_ENDIAN
  949. X#define    ARCH_ENDIAN "little"
  950. X
  951. X/*
  952. X * Is the mount table mirrored in software
  953. X */
  954. X#define    UPDATE_MTAB
  955. X
  956. X/*
  957. X * Name of filesystem types
  958. X */
  959. X#define    MOUNT_TYPE_NFS    MOUNT_NFS
  960. X#define    MOUNT_TYPE_UFS    MOUNT_UFS
  961. X
  962. X#undef    MTAB_TYPE_UFS
  963. X#define    MTAB_TYPE_UFS    MNTTYPE_43
  964. END_OF_FILE
  965.   if test 2983 -ne `wc -c <'config/os-riscix.h'`; then
  966.     echo shar: \"'config/os-riscix.h'\" unpacked with wrong size!
  967.   fi
  968.   # end of 'config/os-riscix.h'
  969. fi
  970. if test -f 'config/os-sos3.h' -a "${1}" != "-c" ; then 
  971.   echo shar: Will not clobber existing file \"'config/os-sos3.h'\"
  972. else
  973.   echo shar: Extracting \"'config/os-sos3.h'\" \(2862 characters\)
  974.   sed "s/^X//" >'config/os-sos3.h' <<'END_OF_FILE'
  975. X/*
  976. X * Copyright (c) 1989 Jan-Simon Pendry
  977. X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
  978. X * Copyright (c) 1989 The Regents of the University of California.
  979. X * All rights reserved.
  980. X *
  981. X * This code is derived from software contributed to Berkeley by
  982. X * Jan-Simon Pendry at Imperial College, London.
  983. X *
  984. X * Redistribution and use in source and binary forms, with or without
  985. X * modification, are permitted provided that the following conditions
  986. X * are met:
  987. X * 1. Redistributions of source code must retain the above copyright
  988. X *    notice, this list of conditions and the following disclaimer.
  989. X * 2. Redistributions in binary form must reproduce the above copyright
  990. X *    notice, this list of conditions and the following disclaimer in the
  991. X *    documentation and/or other materials provided with the distribution.
  992. X * 3. All advertising materials mentioning features or use of this software
  993. X *    must display the following acknowledgement:
  994. X *      This product includes software developed by the University of
  995. X *      California, Berkeley and its contributors.
  996. X * 4. Neither the name of the University nor the names of its contributors
  997. X *    may be used to endorse or promote products derived from this software
  998. X *    without specific prior written permission.
  999. X *
  1000. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1001. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1002. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1003. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1004. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1005. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1006. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1007. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1008. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1009. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1010. X * SUCH DAMAGE.
  1011. X *
  1012. X *    %W% (Berkeley) %G%
  1013. X *
  1014. X * $Id: os-sos3.h,v 5.2.2.1 1992/02/09 15:10:39 jsp beta $
  1015. X *
  1016. X * SunOS 3.2 definitions for Amd (automounter)
  1017. X */
  1018. X
  1019. X/*
  1020. X * Does the compiler grok void *
  1021. X */
  1022. X#define    VOIDP
  1023. X
  1024. X/*
  1025. X * Which version of the Sun RPC library we are using
  1026. X * This is the implementation release number, not
  1027. X * the protocol revision number.
  1028. X */
  1029. X#define    RPC_3
  1030. X
  1031. X/*
  1032. X * Which version of the NFS interface are we using.
  1033. X * This is the implementation release number, not
  1034. X * the protocol revision number.
  1035. X */
  1036. X#define    NFS_3
  1037. X
  1038. X/*
  1039. X * Byte ordering
  1040. X */
  1041. X#undef ARCH_ENDIAN
  1042. X#if defined(mc68010) || defined(mc68020) || defined(sparc)
  1043. X#define    ARCH_ENDIAN    "big"
  1044. X#endif
  1045. X#if defined(i386)
  1046. X#define ARCH_ENDIAN    "little"
  1047. X#endif
  1048. X
  1049. X/*
  1050. X * Name of filesystem types
  1051. X */
  1052. X#define    MOUNT_TYPE_UFS    MOUNT_UFS
  1053. X#define MOUNT_TYPE_NFS    MOUNT_NFS
  1054. END_OF_FILE
  1055.   if test 2862 -ne `wc -c <'config/os-sos3.h'`; then
  1056.     echo shar: \"'config/os-sos3.h'\" unpacked with wrong size!
  1057.   fi
  1058.   # end of 'config/os-sos3.h'
  1059. fi
  1060. if test -f 'config/os-stellix.h' -a "${1}" != "-c" ; then 
  1061.   echo shar: Will not clobber existing file \"'config/os-stellix.h'\"
  1062. else
  1063.   echo shar: Extracting \"'config/os-stellix.h'\" \(2767 characters\)
  1064.   sed "s/^X//" >'config/os-stellix.h' <<'END_OF_FILE'
  1065. X/* $Id: os-stellix.h,v 5.2.2.1 1992/02/09 15:10:43 jsp beta $ */
  1066. X
  1067. X/*
  1068. X * Amd (automounter) definitions for Stellix.
  1069. X * From Stephen C. Pope <scp@acl.lanl.gov>
  1070. X *
  1071. X * Copyright (c) 1989 Jan-Simon Pendry
  1072. X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
  1073. X * Copyright (c) 1989 The Regents of the University of California.
  1074. X * All rights reserved.
  1075. X *
  1076. X * This code is derived from software contributed to Berkeley by
  1077. X * Jan-Simon Pendry at Imperial College, London.
  1078. X *
  1079. X * Redistribution and use in source and binary forms are permitted provided
  1080. X * that: (1) source distributions retain this entire copyright notice and
  1081. X * comment, and (2) distributions including binaries display the following
  1082. X * acknowledgement:  ``This product includes software developed by the
  1083. X * University of California, Berkeley and its contributors'' in the
  1084. X * documentation or other materials provided with the distribution and in
  1085. X * all advertising materials mentioning features or use of this software.
  1086. X * Neither the name of the University nor the names of its contributors may
  1087. X * be used to endorse or promote products derived from this software without
  1088. X * specific prior written permission.
  1089. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  1090. X * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  1091. X * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  1092. X *
  1093. X *    %W% (Berkeley) %G%
  1094. X */
  1095. X
  1096. X#define RPC_3
  1097. X
  1098. X#define NFS_3
  1099. X
  1100. X/*
  1101. X * Byte ordering
  1102. X */
  1103. X#undef ARCH_ENDIAN
  1104. X#define    ARCH_ENDIAN    "big"
  1105. X
  1106. X#define HAS_SYSLOG
  1107. X
  1108. X#define OS_HAS_NDBM
  1109. X
  1110. X#define UPDATE_MTAB
  1111. X
  1112. X#define USE_FCNTL
  1113. X
  1114. X#define LOCK_FCNTL
  1115. X
  1116. X/*
  1117. X * Name of filesystem types
  1118. X */
  1119. X#undef MTAB_TYPE_UFS
  1120. X#define    MTAB_TYPE_UFS    "sfs"
  1121. X
  1122. X#define MOUNT_TYPE_UFS sysfs(GETFSIND, "SFS1")
  1123. X#define MOUNT_TYPE_NFS sysfs(GETFSIND, "NFS")
  1124. X
  1125. X#define SYS5_SIGNALS
  1126. X#define HAS_SVR3_SIGNALS
  1127. X
  1128. X#define MOUNT_HELPER_SOURCE "mount_stellix.c"
  1129. X
  1130. X/*
  1131. X * Name of mount & unmount system calls
  1132. X *
  1133. X * NOTE:
  1134. X *  UNMOUNT_TRAP takes a struct mntent *
  1135. X */
  1136. X#undef MOUNT_TRAP
  1137. X#define    MOUNT_TRAP(type, mnt, flags, mnt_data) \
  1138. X    stellix_mount(mnt->mnt_fsname, mnt->mnt_dir, flags, type, mnt_data)
  1139. X#undef UNMOUNT_TRAP
  1140. X#define    UNMOUNT_TRAP(mnt)    umount(mnt->mnt_dir)
  1141. X
  1142. X/*
  1143. X * How to unmount filesystems.
  1144. X * NEED_UMOUNT_FS includes code to scan the mount table
  1145. X * to find the correct information for the unmount system
  1146. X * call.  Some systems, such as 4.4bsd, do not require
  1147. X * this - they can just do an unmount system call directly.
  1148. X */
  1149. X/* #define    NEED_UMOUNT_FS */
  1150. X/* #define    UMOUNT_FS(dir)    umount_fs(dir) */
  1151. X
  1152. X#define NFS_HDR "misc-stellix.h"
  1153. X#define UFS_HDR "misc-stellix.h"
  1154. X
  1155. X#define M_RDONLY        0x01            /* mount fs read only */
  1156. X
  1157. X#define bzero(ptr, len) memset(ptr, 0, len)
  1158. X#define bcopy(from, to, len) memcpy(to, from, len)
  1159. END_OF_FILE
  1160.   if test 2767 -ne `wc -c <'config/os-stellix.h'`; then
  1161.     echo shar: \"'config/os-stellix.h'\" unpacked with wrong size!
  1162.   fi
  1163.   # end of 'config/os-stellix.h'
  1164. fi
  1165. if test -f 'config/os-umax43.h' -a "${1}" != "-c" ; then 
  1166.   echo shar: Will not clobber existing file \"'config/os-umax43.h'\"
  1167. else
  1168.   echo shar: Extracting \"'config/os-umax43.h'\" \(2809 characters\)
  1169.   sed "s/^X//" >'config/os-umax43.h' <<'END_OF_FILE'
  1170. X/*
  1171. X * Copyright (c) 1989 Jan-Simon Pendry
  1172. X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
  1173. X * Copyright (c) 1989 The Regents of the University of California.
  1174. X * All rights reserved.
  1175. X *
  1176. X * This code is derived from software contributed to Berkeley by
  1177. X * Jan-Simon Pendry at Imperial College, London.
  1178. X *
  1179. X * Redistribution and use in source and binary forms, with or without
  1180. X * modification, are permitted provided that the following conditions
  1181. X * are met:
  1182. X * 1. Redistributions of source code must retain the above copyright
  1183. X *    notice, this list of conditions and the following disclaimer.
  1184. X * 2. Redistributions in binary form must reproduce the above copyright
  1185. X *    notice, this list of conditions and the following disclaimer in the
  1186. X *    documentation and/or other materials provided with the distribution.
  1187. X * 3. All advertising materials mentioning features or use of this software
  1188. X *    must display the following acknowledgement:
  1189. X *      This product includes software developed by the University of
  1190. X *      California, Berkeley and its contributors.
  1191. X * 4. Neither the name of the University nor the names of its contributors
  1192. X *    may be used to endorse or promote products derived from this software
  1193. X *    without specific prior written permission.
  1194. X *
  1195. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1196. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1197. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1198. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1199. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1200. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1201. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1202. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1203. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1204. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1205. X * SUCH DAMAGE.
  1206. X *
  1207. X *    %W% (Berkeley) %G%
  1208. X *
  1209. X * $Id: os-umax43.h,v 5.2.2.1 1992/02/09 15:10:55 jsp beta $
  1210. X *
  1211. X * UMAX 4.3 definitions for Amd (automounter)
  1212. X */
  1213. X
  1214. X/*
  1215. X * Does the compiler grok void *
  1216. X */
  1217. X#define    VOIDP
  1218. X
  1219. X/*
  1220. X * Which version of the Sun RPC library we are using
  1221. X * This is the implementation release number, not
  1222. X * the protocol revision number.
  1223. X */
  1224. X#define    RPC_4
  1225. X
  1226. X/*
  1227. X * Which version of the NFS interface are we using.
  1228. X * This is the implementation release number, not
  1229. X * the protocol revision number.
  1230. X */
  1231. X#define    NFS_3
  1232. X
  1233. X/*
  1234. X * Does this OS have NDBM support?
  1235. X */
  1236. X#define OS_HAS_NDBM
  1237. X
  1238. X/*
  1239. X * Byte ordering
  1240. X */
  1241. X#undef ARCH_ENDIAN
  1242. X#define ARCH_ENDIAN    "little"
  1243. X
  1244. X/*
  1245. X * Name of filesystem types
  1246. X */
  1247. X#define MOUNT_TYPE_NFS    MOUNT_NFS
  1248. X#define MOUNT_TYPE_UFS    MOUNT_UFS
  1249. END_OF_FILE
  1250.   if test 2809 -ne `wc -c <'config/os-umax43.h'`; then
  1251.     echo shar: \"'config/os-umax43.h'\" unpacked with wrong size!
  1252.   fi
  1253.   # end of 'config/os-umax43.h'
  1254. fi
  1255. if test -f 'csd/conn.c' -a "${1}" != "-c" ; then 
  1256.   echo shar: Will not clobber existing file \"'csd/conn.c'\"
  1257. else
  1258.   echo shar: Extracting \"'csd/conn.c'\" \(3170 characters\)
  1259.   sed "s/^X//" >'csd/conn.c' <<'END_OF_FILE'
  1260. X/* 
  1261. X * WorldWide File System
  1262. X * Copyright (c) 1992,1993 Youki Kadobayashi
  1263. X * Copyright (c) 1992,1993 Osaka University
  1264. X * All rights reserved.
  1265. X *
  1266. X * Permission to use, copy, modify and distribute this software and its
  1267. X * documentation is hereby granted, provided that the following conditions
  1268. X * are met:
  1269. X * 1. Both the copyright notice and this permission notice appear in
  1270. X *    all copies of the software, derivative works or modified versions,
  1271. X *    and any portions thereof, and that both notices appear in
  1272. X *    supporting documentation.
  1273. X * 2. All advertising materials mentioning features or use of this software
  1274. X *    must display the following acknowledgement:
  1275. X *      This product includes software developed by the Osaka University
  1276. X *      and its contributors.
  1277. X * 3. Neither the name of the University nor the names of its contributors
  1278. X *    may be used to endorse or promote products derived from this software
  1279. X *    without specific prior written permission.
  1280. X *
  1281. X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  1282. X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  1283. X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  1284. X *
  1285. X * Osaka University requests users of this software to return to
  1286. X *
  1287. X *  Youki Kadobayashi
  1288. X *  Department of Information and Computer Sciences
  1289. X *  Osaka University, Toyonaka 560, Osaka, Japan
  1290. X *
  1291. X * any improvements or extensions that they make and grant Osaka
  1292. X * University the rights to redistribute these changes.
  1293. X */
  1294. Xstatic char *AtFSid = "$Header: conn.c[109.0] Wed Nov 24 03:47:04 1993 youki-k@is.aist-nara.ac.jp saved $";
  1295. X
  1296. X#include "wfs.h"
  1297. X#include "util.h"
  1298. X#include "global.h"
  1299. X
  1300. Xextern qelem conn_head;
  1301. Xqelem conn_head = { &conn_head, &conn_head };
  1302. Xstatic void *conn_callout;
  1303. X
  1304. Xstatic void conn_gc(), conn_close();
  1305. X
  1306. Xvoid
  1307. Xconn_start()
  1308. X{
  1309. X    conn_callout = timeout_set(gettime()+60, conn_gc, 0);
  1310. X}
  1311. X
  1312. Xstatic void
  1313. Xconn_gc()
  1314. X{
  1315. X    wf_conn *p, *p2;
  1316. X
  1317. X    ITER2(p, p2, wf_conn, &conn_head) {
  1318. X        if (p->thrdp) continue;
  1319. X        p->idle += 60;
  1320. X        if (p->idle > WF_CONN_TTL) {
  1321. X            conn_close(p);
  1322. X        }
  1323. X    }
  1324. X    conn_callout = timeout_set(gettime()+60, conn_gc, 0);
  1325. X}
  1326. X
  1327. Xvoid
  1328. Xconn_stop()
  1329. X{
  1330. X    wf_conn *cp;
  1331. X    ITER(cp, wf_conn, &conn_head) {
  1332. X        conn_close(cp);
  1333. X    }
  1334. X}
  1335. X
  1336. Xint
  1337. Xconn_count()
  1338. X{
  1339. X    return q_len(&conn_head);
  1340. X}
  1341. X
  1342. Xwf_conn *
  1343. Xconn_alloc()
  1344. X{
  1345. X    wf_conn *cp;
  1346. X
  1347. X    cp = ALLOC(wf_conn);
  1348. X    cp->proto = &proto_ftp;        /* XXX */
  1349. X    q_insert(cp, &conn_head);
  1350. X    return cp;
  1351. X}
  1352. X
  1353. Xvoid
  1354. Xconn_free(cp)
  1355. Xwf_conn *cp;
  1356. X{
  1357. X    if (cp->id == 0) {
  1358. X        syslog(LOG_WARNING, "connp->id == 0");
  1359. X    }
  1360. X    q_remove(cp);
  1361. X    FREE(cp);
  1362. X}
  1363. X
  1364. Xstatic void
  1365. Xconn_close(cp)
  1366. Xwf_conn *cp;
  1367. X{
  1368. X    srv_releaseconn(cp->srv, cp);
  1369. X    proto_close(cp);
  1370. X    conn_free(cp);
  1371. X}
  1372. X
  1373. Xvoid
  1374. Xconn_shutdown(cp, howto)
  1375. Xwf_conn *cp;
  1376. Xint howto;
  1377. X{
  1378. X    srv_releaseconn(cp->srv, cp);
  1379. X    proto_shutdown(cp, howto);
  1380. X    conn_free(cp);
  1381. X}
  1382. X
  1383. Xvoid
  1384. Xconn_dropped(so)
  1385. Xint so;
  1386. X{
  1387. X    wf_conn *p;
  1388. X
  1389. X    ITER(p, wf_conn, &conn_head) {
  1390. X        if (p->id == so) {
  1391. X            conn_close(p, 2);
  1392. X            return;
  1393. X        }
  1394. X    }
  1395. X    dlog("conn_dropped: no such connection");
  1396. X}
  1397. X
  1398. Xvoid
  1399. Xconn_inspect(reqp)
  1400. Xwf_req *reqp;
  1401. X{
  1402. X    wf_conn *p;
  1403. X
  1404. X    ITER(p, wf_conn, &conn_head) {
  1405. X        req_send(reqp, "conn %lx: id= %d\n", p, p->id);
  1406. X        req_send(reqp, "\tidle= %d, srv=%s, thrdp=%lx\n",
  1407. X             p->idle, PROT(p->srv->name), p->thrdp);
  1408. X    }
  1409. X}
  1410. END_OF_FILE
  1411.   if test 3170 -ne `wc -c <'csd/conn.c'`; then
  1412.     echo shar: \"'csd/conn.c'\" unpacked with wrong size!
  1413.   fi
  1414.   # end of 'csd/conn.c'
  1415. fi
  1416. if test -f 'csd/dumpvar.c' -a "${1}" != "-c" ; then 
  1417.   echo shar: Will not clobber existing file \"'csd/dumpvar.c'\"
  1418. else
  1419.   echo shar: Extracting \"'csd/dumpvar.c'\" \(2575 characters\)
  1420.   sed "s/^X//" >'csd/dumpvar.c' <<'END_OF_FILE'
  1421. X/* 
  1422. X * WorldWide File System
  1423. X * Copyright (c) 1992,1993 Youki Kadobayashi
  1424. X * Copyright (c) 1992,1993 Osaka University
  1425. X * All rights reserved.
  1426. X *
  1427. X * Permission to use, copy, modify and distribute this software and its
  1428. X * documentation is hereby granted, provided that the following conditions
  1429. X * are met:
  1430. X * 1. Both the copyright notice and this permission notice appear in
  1431. X *    all copies of the software, derivative works or modified versions,
  1432. X *    and any portions thereof, and that both notices appear in
  1433. X *    supporting documentation.
  1434. X * 2. All advertising materials mentioning features or use of this software
  1435. X *    must display the following acknowledgement:
  1436. X *      This product includes software developed by the Osaka University
  1437. X *      and its contributors.
  1438. X * 3. Neither the name of the University nor the names of its contributors
  1439. X *    may be used to endorse or promote products derived from this software
  1440. X *    without specific prior written permission.
  1441. X *
  1442. X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  1443. X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  1444. X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  1445. X *
  1446. X * Osaka University requests users of this software to return to
  1447. X *
  1448. X *  Youki Kadobayashi
  1449. X *  Department of Information and Computer Sciences
  1450. X *  Osaka University, Toyonaka 560, Osaka, Japan
  1451. X *
  1452. X * any improvements or extensions that they make and grant Osaka
  1453. X * University the rights to redistribute these changes.
  1454. X */
  1455. Xstatic char *AtFSid = "$Header: dumpvar.c[109.0] Wed Nov 24 03:47:07 1993 youki-k@is.aist-nara.ac.jp saved $";
  1456. X
  1457. X#include "wfs.h"
  1458. X#include "util.h"
  1459. X#include "global.h"
  1460. X
  1461. Xdump_srv(tag, srvp)
  1462. Xchar *tag;
  1463. Xwf_srv *srvp;
  1464. X{
  1465. X    dlog("%s (n= %s, f= %d, p= %d, a= %s)", tag,
  1466. X           srvp->name ? srvp->name : "(NULL)",
  1467. X           srvp->sin.sin_family,
  1468. X           srvp->sin.sin_port,
  1469. X           inet_ntoa(srvp->sin.sin_addr));
  1470. X    return 0;
  1471. X}
  1472. X
  1473. Xdump_fh(tag, fhp)
  1474. Xchar *tag;
  1475. Xwf_fh *fhp;
  1476. X{
  1477. X    dlog("%s (w= %x, pv= %x, d= %x, cv= %x, f= %x)", tag,
  1478. X           fhp->world_id,
  1479. X           fhp->parent_vol,
  1480. X           fhp->dir_id,
  1481. X           fhp->child_vol,
  1482. X           fhp->file_id);
  1483. X}
  1484. X
  1485. Xdump_vol(tag, volp)
  1486. Xchar *tag;
  1487. Xwf_vol *volp;
  1488. X{
  1489. X    dlog("%s (n= %s, i= %ld)", tag,
  1490. X           volp->name ? volp->name : "(NULL)",
  1491. X           volp->id);
  1492. X}
  1493. X
  1494. Xdump_dir(tag, dirp)
  1495. Xchar *tag;
  1496. Xwf_dir *dirp;
  1497. X{
  1498. X    dlog("%s (n= %s, i= %ld, t= %ld)", tag,
  1499. X           dirp->name,
  1500. X           dirp->id,
  1501. X           dirp->ctime);
  1502. X}
  1503. X
  1504. Xdump_fdset(tag, fdsetp)
  1505. Xchar *tag;
  1506. Xfd_set *fdsetp;
  1507. X{
  1508. X    int i;
  1509. X
  1510. X    for (i = 0; i < WF_MAX_SO; ++i) {
  1511. X        if (FD_ISSET(i, fdsetp)) {
  1512. X            dlog("%s %d", tag, i);
  1513. X        }
  1514. X    }
  1515. X}
  1516. END_OF_FILE
  1517.   if test 2575 -ne `wc -c <'csd/dumpvar.c'`; then
  1518.     echo shar: \"'csd/dumpvar.c'\" unpacked with wrong size!
  1519.   fi
  1520.   # end of 'csd/dumpvar.c'
  1521. fi
  1522. if test -f 'csd/err.c' -a "${1}" != "-c" ; then 
  1523.   echo shar: Will not clobber existing file \"'csd/err.c'\"
  1524. else
  1525.   echo shar: Extracting \"'csd/err.c'\" \(3394 characters\)
  1526.   sed "s/^X//" >'csd/err.c' <<'END_OF_FILE'
  1527. X/* 
  1528. X * WorldWide File System
  1529. X * Copyright (c) 1992,1993 Youki Kadobayashi
  1530. X * Copyright (c) 1992,1993 Osaka University
  1531. X * All rights reserved.
  1532. X *
  1533. X * Permission to use, copy, modify and distribute this software and its
  1534. X * documentation is hereby granted, provided that the following conditions
  1535. X * are met:
  1536. X * 1. Both the copyright notice and this permission notice appear in
  1537. X *    all copies of the software, derivative works or modified versions,
  1538. X *    and any portions thereof, and that both notices appear in
  1539. X *    supporting documentation.
  1540. X * 2. All advertising materials mentioning features or use of this software
  1541. X *    must display the following acknowledgement:
  1542. X *      This product includes software developed by the Osaka University
  1543. X *      and its contributors.
  1544. X * 3. Neither the name of the University nor the names of its contributors
  1545. X *    may be used to endorse or promote products derived from this software
  1546. X *    without specific prior written permission.
  1547. X *
  1548. X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  1549. X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  1550. X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  1551. X *
  1552. X * Osaka University requests users of this software to return to
  1553. X *
  1554. X *  Youki Kadobayashi
  1555. X *  Department of Information and Computer Sciences
  1556. X *  Osaka University, Toyonaka 560, Osaka, Japan
  1557. X *
  1558. X * any improvements or extensions that they make and grant Osaka
  1559. X * University the rights to redistribute these changes.
  1560. X */
  1561. X/* error file system */
  1562. Xstatic char *AtFSid = "$Header: err.c[109.0] Wed Nov 24 03:47:08 1993 youki-k@is.aist-nara.ac.jp saved $";
  1563. X
  1564. X#include "wfs.h"
  1565. X#include "util.h"
  1566. X#include "global.h"
  1567. X
  1568. Xvoid
  1569. Xerr_getattr(c)
  1570. Xwf_thrd *c;    /* rqstp, volp, fhp */
  1571. X{
  1572. X#ifdef DEBUG_ERR
  1573. X    dlog("err_getattr");
  1574. X#endif
  1575. X    (*c->reply)(c, WF_ERR_STALE);
  1576. X}
  1577. X
  1578. Xvoid
  1579. Xerr_getattr_miss(c)
  1580. Xwf_thrd *c;    /* volp, dirp, filep */
  1581. X{
  1582. X#ifdef DEBUG_ERR
  1583. X    dlog("err_getattr_miss");
  1584. X#endif
  1585. X}
  1586. X
  1587. Xvoid
  1588. Xerr_lookup(c)
  1589. Xwf_thrd *c;    /* rqstp, volp, fhp, fname */
  1590. X{
  1591. X#ifdef DEBUG_ERR
  1592. X    dlog("err_lookup");
  1593. X#endif
  1594. X    (*c->reply)(c, WF_ERR_NOENT);
  1595. X}
  1596. X
  1597. Xvoid
  1598. Xerr_lookup_miss(c)
  1599. Xwf_thrd *c;    /* rqstp, volp, fhp, fname, dotdotp */
  1600. X{
  1601. X#ifdef DEBUG_ERR
  1602. X    dlog("err_lookup_miss <%s>", c->fname);
  1603. X#endif
  1604. X    (*c->reply)(c, WF_ERR_NOENT);
  1605. X}
  1606. X
  1607. Xvoid
  1608. Xerr_readlink(c)
  1609. Xwf_thrd *c;    /* rqstp, volp, fhp */
  1610. X{
  1611. X#ifdef DEBUG_ERR
  1612. X    dlog("err_readlink");
  1613. X#endif
  1614. X    (*c->reply)(c, WF_ERR_STALE);
  1615. X}
  1616. X
  1617. Xvoid
  1618. Xerr_read(c)
  1619. Xwf_thrd *c;    /* rqstp, volp, fhp, offset, count, totalcount */
  1620. X{
  1621. X#ifdef DEBUG_ERR
  1622. X    dlog("err_read");
  1623. X#endif
  1624. X    (*c->reply)(c, WF_ERR_STALE);
  1625. X}
  1626. X
  1627. Xvoid
  1628. Xerr_read_miss(c)
  1629. Xwf_thrd *c;    /* rqstp, volp, fhp, offset, count, totalcount */
  1630. X{
  1631. X#ifdef DEBUG_ERR
  1632. X    dlog("err_read_miss");
  1633. X#endif
  1634. X    (*c->reply)(c, WF_ERR_STALE);
  1635. X}
  1636. X
  1637. Xvoid
  1638. Xerr_readdir(c)
  1639. Xwf_thrd *c;    /* rqstp, volp, fhp, cookie, count */
  1640. X{
  1641. X#ifdef DEBUG_ERR
  1642. X    dlog("err_readdir");
  1643. X#endif
  1644. X    (*c->reply)(c, WF_ERR_STALE);
  1645. X}
  1646. X
  1647. Xvoid
  1648. Xerr_readdir_miss(c)
  1649. Xwf_thrd *c;    /* rqstp, volp, fhp, cookie, count, dotdotp, olddirp */
  1650. X{
  1651. X#ifdef DEBUG_ERR
  1652. X    dlog("err_readdir_miss");
  1653. X#endif
  1654. X    (*c->reply)(c, WF_ERR_STALE);
  1655. X}
  1656. X
  1657. Xvoid
  1658. Xerr_getuda(c)
  1659. Xwf_thrd *c;
  1660. X{
  1661. X#ifdef DEBUG_ERR
  1662. X    dlog("err_getuda");
  1663. X#endif
  1664. X}
  1665. X
  1666. Xvoid
  1667. Xerr_keepalive(c)
  1668. Xwf_thrd *c;
  1669. X{
  1670. X#ifdef DEBUG_ERR
  1671. X    dlog("err_keepalive");
  1672. X#endif
  1673. X}
  1674. X
  1675. Xvoid
  1676. Xerr_close(cp)
  1677. Xwf_conn *cp;
  1678. X{
  1679. X#ifdef DEBUG_ERR
  1680. X    dlog("err_close");
  1681. X#endif
  1682. X}
  1683. X
  1684. Xvoid
  1685. Xerr_shutdown(cp, howto)
  1686. Xwf_conn *cp;
  1687. Xint howto;
  1688. X{
  1689. X#ifdef DEBUG_ERR
  1690. X    dlog("err_shutdown");
  1691. X#endif
  1692. X}
  1693. X
  1694. END_OF_FILE
  1695.   if test 3394 -ne `wc -c <'csd/err.c'`; then
  1696.     echo shar: \"'csd/err.c'\" unpacked with wrong size!
  1697.   fi
  1698.   # end of 'csd/err.c'
  1699. fi
  1700. if test -f 'csd/global.h' -a "${1}" != "-c" ; then 
  1701.   echo shar: Will not clobber existing file \"'csd/global.h'\"
  1702. else
  1703.   echo shar: Extracting \"'csd/global.h'\" \(3059 characters\)
  1704.   sed "s/^X//" >'csd/global.h' <<'END_OF_FILE'
  1705. X/* 
  1706. X * WorldWide File System
  1707. X * Copyright (c) 1992,1993 Youki Kadobayashi
  1708. X * Copyright (c) 1992,1993 Osaka University
  1709. X * All rights reserved.
  1710. X *
  1711. X * Permission to use, copy, modify and distribute this software and its
  1712. X * documentation is hereby granted, provided that the following conditions
  1713. X * are met:
  1714. X * 1. Both the copyright notice and this permission notice appear in
  1715. X *    all copies of the software, derivative works or modified versions,
  1716. X *    and any portions thereof, and that both notices appear in
  1717. X *    supporting documentation.
  1718. X * 2. All advertising materials mentioning features or use of this software
  1719. X *    must display the following acknowledgement:
  1720. X *      This product includes software developed by the Osaka University
  1721. X *      and its contributors.
  1722. X * 3. Neither the name of the University nor the names of its contributors
  1723. X *    may be used to endorse or promote products derived from this software
  1724. X *    without specific prior written permission.
  1725. X *
  1726. X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  1727. X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  1728. X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  1729. X *
  1730. X * Osaka University requests users of this software to return to
  1731. X *
  1732. X *  Youki Kadobayashi
  1733. X *  Department of Information and Computer Sciences
  1734. X *  Osaka University, Toyonaka 560, Osaka, Japan
  1735. X *
  1736. X * any improvements or extensions that they make and grant Osaka
  1737. X * University the rights to redistribute these changes.
  1738. X */
  1739. X/* $Header: global.h[109.0] Wed Nov 24 03:47:10 1993 youki-k@is.aist-nara.ac.jp saved $ */
  1740. X
  1741. X/* network related information */
  1742. Xextern char        cs_hostname[];        /* my hostname */
  1743. Xextern char        *cs_domain;        /* my domain name */
  1744. Xextern struct in_addr    cs_ipaddr;        /* my IP address */
  1745. Xextern int        cs_nfsport;        /* my NFS port */
  1746. Xextern SVCXPRT        *nfsxprt;
  1747. Xextern SVCXPRT        *csxprt;
  1748. X
  1749. X/* verbosity */
  1750. Xextern char        *cs_progname;        /* my program name */
  1751. Xextern char        *cs_topdir;        /* my top directory */
  1752. Xextern int        cs_world;        /* my world id */
  1753. Xextern int        cs_pid;            /* my process id */
  1754. Xextern int        cs_year;        /* this year */
  1755. Xextern int        cs_month;        /* this month */
  1756. Xextern int        cs_day;            /* day of month */
  1757. Xextern char        cs_date[];        /* "yymmdd" of today */
  1758. Xextern int        cs_serial;        /* action id of today */
  1759. X
  1760. X/* internal state */
  1761. Xextern serv_state    cs_state;        /* my state */
  1762. Xextern int        select_intr_valid;
  1763. Xextern time_t        now;
  1764. Xextern time_t        next_softclock;
  1765. Xextern int        task_notify_todo;
  1766. Xextern int        foreground;
  1767. Xextern int        immediate_abort;
  1768. X
  1769. X/* for debugging */
  1770. Xextern wf_req *cs_ftp_debug;
  1771. X
  1772. X/* "public" buffer for interim purpose. go cheap here.. */
  1773. Xextern char        cs_databuf[];
  1774. X
  1775. X/* protocol switches */
  1776. Xextern wf_proto        proto_root;
  1777. Xextern wf_proto        proto_ftp;
  1778. Xextern wf_proto        proto_ufs;
  1779. X#if 0
  1780. Xextern wf_proto        proto_host;
  1781. Xextern wf_proto        proto_cwd;
  1782. X#endif
  1783. Xextern wf_proto        proto_fh;
  1784. X
  1785. X/* libc complementary */
  1786. Xextern int    sys_nerr;
  1787. Xextern char    *sys_errlist[];
  1788. X
  1789. X#include "config.h"    /* platform-specific settings */
  1790. X#ifndef __CEXTRACT__
  1791. X#include "auto.h"    /* automatically generated by cextract */
  1792. X#endif
  1793. END_OF_FILE
  1794.   if test 3059 -ne `wc -c <'csd/global.h'`; then
  1795.     echo shar: \"'csd/global.h'\" unpacked with wrong size!
  1796.   fi
  1797.   # end of 'csd/global.h'
  1798. fi
  1799. if test -f 'csd/proto.c' -a "${1}" != "-c" ; then 
  1800.   echo shar: Will not clobber existing file \"'csd/proto.c'\"
  1801. else
  1802.   echo shar: Extracting \"'csd/proto.c'\" \(2928 characters\)
  1803.   sed "s/^X//" >'csd/proto.c' <<'END_OF_FILE'
  1804. X/* 
  1805. X * WorldWide File System
  1806. X * Copyright (c) 1992,1993 Youki Kadobayashi
  1807. X * Copyright (c) 1992,1993 Osaka University
  1808. X * All rights reserved.
  1809. X *
  1810. X * Permission to use, copy, modify and distribute this software and its
  1811. X * documentation is hereby granted, provided that the following conditions
  1812. X * are met:
  1813. X * 1. Both the copyright notice and this permission notice appear in
  1814. X *    all copies of the software, derivative works or modified versions,
  1815. X *    and any portions thereof, and that both notices appear in
  1816. X *    supporting documentation.
  1817. X * 2. All advertising materials mentioning features or use of this software
  1818. X *    must display the following acknowledgement:
  1819. X *      This product includes software developed by the Osaka University
  1820. X *      and its contributors.
  1821. X * 3. Neither the name of the University nor the names of its contributors
  1822. X *    may be used to endorse or promote products derived from this software
  1823. X *    without specific prior written permission.
  1824. X *
  1825. X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  1826. X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  1827. X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  1828. X *
  1829. X * Osaka University requests users of this software to return to
  1830. X *
  1831. X *  Youki Kadobayashi
  1832. X *  Department of Information and Computer Sciences
  1833. X *  Osaka University, Toyonaka 560, Osaka, Japan
  1834. X *
  1835. X * any improvements or extensions that they make and grant Osaka
  1836. X * University the rights to redistribute these changes.
  1837. X */
  1838. X/* protocol switch */
  1839. Xstatic char *AtFSid = "$Header: proto.c[109.0] Wed Nov 24 03:47:15 1993 youki-k@is.aist-nara.ac.jp saved $";
  1840. X
  1841. X#include "wfs.h"
  1842. X#include "util.h"
  1843. X#include "global.h"
  1844. X
  1845. Xvoid
  1846. Xproto_getattr(c)
  1847. Xwf_thrd *c;
  1848. X{
  1849. X    c->proto = pol_select_proto(c->child_volp);
  1850. X    (*c->proto->wf_getattr)(c);
  1851. X}
  1852. X
  1853. Xvoid
  1854. Xproto_lookup(c)
  1855. Xwf_thrd *c;
  1856. X{
  1857. X    c->proto = pol_select_proto(c->child_volp);
  1858. X    (*c->proto->wf_lookup)(c);
  1859. X}
  1860. X
  1861. Xvoid
  1862. Xproto_readlink(c)
  1863. Xwf_thrd *c;
  1864. X{
  1865. X    c->proto = pol_select_proto(c->child_volp);
  1866. X    (*c->proto->wf_readlink)(c);
  1867. X}
  1868. X
  1869. Xvoid
  1870. Xproto_read(c)
  1871. Xwf_thrd *c;
  1872. X{
  1873. X    c->proto = pol_select_proto(c->child_volp);
  1874. X    (*c->proto->wf_read)(c);
  1875. X}
  1876. X
  1877. Xvoid
  1878. Xproto_readdir(c)
  1879. Xwf_thrd *c;
  1880. X{
  1881. X    c->proto = pol_select_proto(c->child_volp);
  1882. X    (*c->proto->wf_readdir)(c);
  1883. X}
  1884. X
  1885. Xvoid
  1886. Xproto_getuda(c)
  1887. Xwf_thrd *c;
  1888. X{
  1889. X    c->proto = pol_select_proto(c->child_volp);
  1890. X    (*c->proto->wf_getuda)(c);
  1891. X}
  1892. X
  1893. Xvoid
  1894. Xproto_keepalive(c)
  1895. Xwf_thrd *c;
  1896. X{
  1897. X    c->proto = pol_select_proto(c->child_volp);
  1898. X    (*c->proto->wf_keepalive)(c);
  1899. X}
  1900. X
  1901. Xvoid
  1902. Xproto_close(cp)
  1903. Xwf_conn *cp;
  1904. X{
  1905. X    (*cp->proto->wf_close)(cp);
  1906. X}
  1907. X
  1908. Xvoid
  1909. Xproto_shutdown(cp, howto)
  1910. Xwf_conn *cp;
  1911. Xint howto;
  1912. X{
  1913. X    (*cp->proto->wf_shutdown)(cp, howto);
  1914. X}
  1915. X
  1916. Xvoid
  1917. Xproto_getattr_miss(c)
  1918. Xwf_thrd *c;
  1919. X{
  1920. X    (*c->proto->wf_getattr_miss)(c);
  1921. X}
  1922. X
  1923. Xvoid
  1924. Xproto_lookup_miss(c)
  1925. Xwf_thrd *c;
  1926. X{
  1927. X    (*c->proto->wf_lookup_miss)(c);
  1928. X}
  1929. X
  1930. Xvoid
  1931. Xproto_readdir_miss(c)
  1932. Xwf_thrd *c;
  1933. X{
  1934. X    (*c->proto->wf_readdir_miss)(c);
  1935. X}
  1936. X
  1937. Xvoid
  1938. Xproto_read_miss(c)
  1939. Xwf_thrd *c;
  1940. X{
  1941. X    (*c->proto->wf_read_miss)(c);
  1942. X}
  1943. END_OF_FILE
  1944.   if test 2928 -ne `wc -c <'csd/proto.c'`; then
  1945.     echo shar: \"'csd/proto.c'\" unpacked with wrong size!
  1946.   fi
  1947.   # end of 'csd/proto.c'
  1948. fi
  1949. if test -f 'csd/util.h' -a "${1}" != "-c" ; then 
  1950.   echo shar: Will not clobber existing file \"'csd/util.h'\"
  1951. else
  1952.   echo shar: Extracting \"'csd/util.h'\" \(3326 characters\)
  1953.   sed "s/^X//" >'csd/util.h' <<'END_OF_FILE'
  1954. X/* 
  1955. X * WorldWide File System
  1956. X * Copyright (c) 1992,1993 Youki Kadobayashi
  1957. X * Copyright (c) 1992,1993 Osaka University
  1958. X * All rights reserved.
  1959. X *
  1960. X * Permission to use, copy, modify and distribute this software and its
  1961. X * documentation is hereby granted, provided that the following conditions
  1962. X * are met:
  1963. X * 1. Both the copyright notice and this permission notice appear in
  1964. X *    all copies of the software, derivative works or modified versions,
  1965. X *    and any portions thereof, and that both notices appear in
  1966. X *    supporting documentation.
  1967. X * 2. All advertising materials mentioning features or use of this software
  1968. X *    must display the following acknowledgement:
  1969. X *      This product includes software developed by the Osaka University
  1970. X *      and its contributors.
  1971. X * 3. Neither the name of the University nor the names of its contributors
  1972. X *    may be used to endorse or promote products derived from this software
  1973. X *    without specific prior written permission.
  1974. X *
  1975. X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  1976. X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  1977. X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  1978. X *
  1979. X * Osaka University requests users of this software to return to
  1980. X *
  1981. X *  Youki Kadobayashi
  1982. X *  Department of Information and Computer Sciences
  1983. X *  Osaka University, Toyonaka 560, Osaka, Japan
  1984. X *
  1985. X * any improvements or extensions that they make and grant Osaka
  1986. X * University the rights to redistribute these changes.
  1987. X */
  1988. X/* $Header: util.h[109.1] Tue Dec  7 23:38:01 1993 youki-k@is.aist-nara.ac.jp saved $ */
  1989. X
  1990. X/* Debugging malloc library of Conor P. Cahill */
  1991. X#ifdef DEBUG_MALLOC
  1992. X#include "/usr/local/include/dbmalloc/malloc.h"
  1993. X#endif
  1994. X/* If you want event traces */
  1995. X/* #define TRACE */
  1996. X
  1997. X#ifndef MIN
  1998. X#define    MIN(a,b)    ((a)<(b)?(a):(b))
  1999. X#endif    /* !MIN */
  2000. X
  2001. X#define WF_WRITE(fp, info)    fwrite(&(info), sizeof(info), 1, fp)
  2002. X#define WF_READ(fp, info)    fread(&(info), sizeof(info), 1, fp)
  2003. X
  2004. X#define WF_MAX_SO    64    /* machine dependent */
  2005. X#define WF_SO_READ    0x1
  2006. X#define WF_SO_WRITE    0x2
  2007. X#define WF_SO_EXCEPT    0x4
  2008. X#define WF_SO_ALL    0x7
  2009. X
  2010. X#define WF_VOL_TTL    (30 * 60)    /* volume in-core lifetime */
  2011. X#define WF_DIR_TTLMEM    (5 * 60)    /* directory in-core lifetime */
  2012. X#define WF_DIR_TTLDISK    (24 * 60 * 60)
  2013. X#define WF_CONN_TTL    (2 * 60)    /* idle connection lifetime */
  2014. X#define WF_THREAD_TTL    (2 * 60)    /* sucked thead lifetime */
  2015. X
  2016. Xextern time_t    now;
  2017. X#define gettime()    (now ? now : time(&now))
  2018. X#define realtime()    (time(&now))
  2019. X
  2020. X#ifdef DEBUG_MALLOC
  2021. X#define    ALLOC(s)    (s *)alloc_and_clear(__FILE__, __LINE__, sizeof(s))
  2022. X#define    CLONE(v)    alloc_and_copy(__FILE__, __LINE__, (v), sizeof(*(v)))
  2023. X#define    db_alist    file, line, 
  2024. X#define    db_dcl        char *file; int line;
  2025. X#else
  2026. X#define    ALLOC(s)    (s *)alloc_and_clear(sizeof(s))
  2027. X#define    CLONE(v)    alloc_and_copy((v), sizeof(*(v)))
  2028. X#define    debug_malloc(s)    malloc(s)
  2029. X#define    db_alist
  2030. X#define    db_dcl
  2031. X#endif
  2032. X#define    FREE(s)        free(s)
  2033. X
  2034. X#define assert(e)    { if (!(e)) {dlog("assertion failed at %s:%d", __FILE__, __LINE__); exit(1); } }
  2035. X#define    warn_negative(a)    { if ((a) < 0) {dlog("should not take negative value at %s:%d", __FILE__, __LINE__); }}
  2036. X#define    warn_zero(a)    { if ((a) < 0) {dlog("should not compute to zero at %s:%d", __FILE__, __LINE__); }}
  2037. X#define    PROT(s)        ((s) ? (s) : "(null)")
  2038. X
  2039. X#define errno_diag()    errno_log(__FILE__, __LINE__)
  2040. X
  2041. X#include <sys/syslog.h>
  2042. END_OF_FILE
  2043.   if test 3326 -ne `wc -c <'csd/util.h'`; then
  2044.     echo shar: \"'csd/util.h'\" unpacked with wrong size!
  2045.   fi
  2046.   # end of 'csd/util.h'
  2047. fi
  2048. if test -f 'doc/Copyright' -a "${1}" != "-c" ; then 
  2049.   echo shar: Will not clobber existing file \"'doc/Copyright'\"
  2050. else
  2051.   echo shar: Extracting \"'doc/Copyright'\" \(1476 characters\)
  2052.   sed "s/^X//" >'doc/Copyright' <<'END_OF_FILE'
  2053. X
  2054. X * WorldWide File System
  2055. X * Copyright (c) 1992,1993 Youki Kadobayashi
  2056. X * Copyright (c) 1992,1993 Osaka University
  2057. X * All rights reserved.
  2058. X *
  2059. X * Permission to use, copy, modify and distribute this software and its
  2060. X * documentation is hereby granted, provided that the following conditions
  2061. X * are met:
  2062. X * 1. Both the copyright notice and this permission notice appear in
  2063. X *    all copies of the software, derivative works or modified versions,
  2064. X *    and any portions thereof, and that both notices appear in
  2065. X *    supporting documentation.
  2066. X * 2. All advertising materials mentioning features or use of this software
  2067. X *    must display the following acknowledgement:
  2068. X *      This product includes software developed by the Osaka University
  2069. X *      and its contributors.
  2070. X * 3. Neither the name of the University nor the names of its contributors
  2071. X *    may be used to endorse or promote products derived from this software
  2072. X *    without specific prior written permission.
  2073. X *
  2074. X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  2075. X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  2076. X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  2077. X *
  2078. X * Osaka University requests users of this software to return to
  2079. X *
  2080. X *  Youki Kadobayashi
  2081. X *  Department of Information and Computer Sciences
  2082. X *  Osaka University, Toyonaka 560, Osaka, Japan
  2083. X *
  2084. X * any improvements or extensions that they make and grant Osaka
  2085. X * University the rights to redistribute these changes.
  2086. END_OF_FILE
  2087.   if test 1476 -ne `wc -c <'doc/Copyright'`; then
  2088.     echo shar: \"'doc/Copyright'\" unpacked with wrong size!
  2089.   fi
  2090.   # end of 'doc/Copyright'
  2091. fi
  2092. if test -f 'include/am.h' -a "${1}" != "-c" ; then 
  2093.   echo shar: Will not clobber existing file \"'include/am.h'\"
  2094. else
  2095.   echo shar: Extracting \"'include/am.h'\" \(2683 characters\)
  2096.   sed "s/^X//" >'include/am.h' <<'END_OF_FILE'
  2097. X/* 
  2098. X * WorldWide File System
  2099. X * Copyright (c) 1992,1993 Youki Kadobayashi
  2100. X * Copyright (c) 1992,1993 Osaka University
  2101. X * All rights reserved.
  2102. X *
  2103. X * Permission to use, copy, modify and distribute this software and its
  2104. X * documentation is hereby granted, provided that the following conditions
  2105. X * are met:
  2106. X * 1. Both the copyright notice and this permission notice appear in
  2107. X *    all copies of the software, derivative works or modified versions,
  2108. X *    and any portions thereof, and that both notices appear in
  2109. X *    supporting documentation.
  2110. X * 2. All advertising materials mentioning features or use of this software
  2111. X *    must display the following acknowledgement:
  2112. X *      This product includes software developed by the Osaka University
  2113. X *      and its contributors.
  2114. X * 3. Neither the name of the University nor the names of its contributors
  2115. X *    may be used to endorse or promote products derived from this software
  2116. X *    without specific prior written permission.
  2117. X *
  2118. X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  2119. X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  2120. X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  2121. X *
  2122. X * Osaka University requests users of this software to return to
  2123. X *
  2124. X *  Youki Kadobayashi
  2125. X *  Department of Information and Computer Sciences
  2126. X *  Osaka University, Toyonaka 560, Osaka, Japan
  2127. X *
  2128. X * any improvements or extensions that they make and grant Osaka
  2129. X * University the rights to redistribute these changes.
  2130. X */
  2131. X/*
  2132. X * We need "amd" compatibility header here,
  2133. X * since I have incorporated NFS portability code of "amd" 5.3 beta 1.
  2134. X */
  2135. X
  2136. X#include "config.h"
  2137. X
  2138. X#include <sys/param.h>        /* for Ultrix */
  2139. X#include <sys/socket.h>
  2140. X#include <rpc/rpc.h>
  2141. X#include <netdb.h>        /* for hostent */
  2142. X#include "nfs_prot.h"
  2143. X#ifdef MNTENT_HDR
  2144. X#include MNTENT_HDR
  2145. X#endif /* MNTENT_HDR */
  2146. X#include <assert.h>
  2147. X
  2148. X#ifdef DEBUG_MEM
  2149. X#include <malloc.h>
  2150. X#endif /* DEBUG_MEM */
  2151. X
  2152. X#ifndef MAXHOSTNAMELEN
  2153. X#define MAXHOSTNAMELEN 64
  2154. X#endif /* MAXHOSTNAMELEN */
  2155. X
  2156. X#ifndef MNTTYPE_WWFS
  2157. X#define MNTTYPE_WWFS "nfs"
  2158. X/*
  2159. X * Different mount type string, (e.g., "wwfs") requires
  2160. X * lots of admininistrative overhead and deep understanding
  2161. X * of the internal workings of the whole system.
  2162. X */
  2163. X#endif /* MNTTYPE_WWFS */
  2164. X
  2165. X#ifndef FALSE
  2166. X#define FALSE 0
  2167. X#define TRUE 1
  2168. X#endif /* FALSE */
  2169. X#define    ALLOC(ty)    ((struct ty *) malloc(sizeof(struct ty)))
  2170. X
  2171. X/*
  2172. X * List of mount table entries
  2173. X */
  2174. Xtypedef struct mntlist mntlist;
  2175. Xstruct mntlist {
  2176. X    struct mntlist *mnext;
  2177. X    struct mntent *mnt;
  2178. X};
  2179. X
  2180. X/*
  2181. X * mostly for amd compatibility
  2182. X */
  2183. Xextern char *mtab;        /* Mount table */
  2184. Xextern time_t clock_valid;    /* Clock needs recalculating */
  2185. Xextern int mypid;        /* Current process id */
  2186. END_OF_FILE
  2187.   if test 2683 -ne `wc -c <'include/am.h'`; then
  2188.     echo shar: \"'include/am.h'\" unpacked with wrong size!
  2189.   fi
  2190.   # end of 'include/am.h'
  2191. fi
  2192. if test -f 'libww/renamesym.pl' -a "${1}" != "-c" ; then 
  2193.   echo shar: Will not clobber existing file \"'libww/renamesym.pl'\"
  2194. else
  2195.   echo shar: Extracting \"'libww/renamesym.pl'\" \(3030 characters\)
  2196.   sed "s/^X//" >'libww/renamesym.pl' <<'END_OF_FILE'
  2197. X#!/usr/local/bin/perl
  2198. X#
  2199. X#    renamesym.pl - rename symbol name in a object file.
  2200. X#        5minutes hack for splicing libc.
  2201. X# Author: Youki Kadobayashi <youki@ics.es.osaka-u.ac.jp>
  2202. X#
  2203. X# Usage: renamesym.pl [-l libraryfile] [-c] [-d] [-p] [-v] [-S sections]
  2204. X#    libraryfile can be either archive (.a) or object (.o).
  2205. X#    -c for capitalizing initial letter only.
  2206. X#    -d for debug! Children under age of 18 should not use this option.
  2207. X#    -p to preserve original object files with extension ".orig".
  2208. X#    -v for verbose.
  2209. X#    -S for other section letters.
  2210. X
  2211. Xrequire 'getopts.pl';
  2212. Xdo Getopts('l:cdpvS:');
  2213. X
  2214. X&usage if ((@ARGV) == 0);
  2215. X
  2216. Xsub usage {
  2217. X    system("head -14 $0");
  2218. X}
  2219. X
  2220. X$lib = $opt_l ? $opt_l : "/usr/lib/libc.a";
  2221. X$from_archive = 1 if ($lib =~ /\.a$/);
  2222. X$is_mips = 1 if (-e "/usr/lib/cmplrs");  # I guess you have MIPS cc
  2223. X$sections = $opt_S ? "[$opt_S]" : "^[0-9a-fA-F]+ [ADGIT]";
  2224. Xprint "NM target sections are: $sections\n" if $opt_v;
  2225. X
  2226. Xforeach $func (@ARGV) {
  2227. X    @objs = &search_library($lib, $func) if $from_archive;
  2228. X    next if !defined(@objs);
  2229. X
  2230. X    foreach $obj (@objs) {
  2231. X    &rename_symbol($obj, $func);
  2232. X    }
  2233. X}
  2234. X
  2235. Xsub rename_symbol {
  2236. X    local ($obj, $func) = @_;
  2237. X
  2238. X    $func = "_" . $func unless $is_mips;
  2239. X    $Func = $func;
  2240. X    if ($opt_c) {
  2241. X    $Func =~ /([^a-z]?)([a-z])(.*)$/;
  2242. X    $foo = $2;
  2243. X    $foo =~ tr/a-z/A-Z/;
  2244. X    $Func = $1 . $foo . $3;
  2245. X    } else {
  2246. X    $Func =~ tr/a-z/A-Z/;
  2247. X    }
  2248. X
  2249. X    if ($from_archive) {
  2250. X    if (-f "$obj.o" && $modified_files =~ /:$obj.o:/) {
  2251. X        # do not extract this file again!
  2252. X        print STDERR "Using previously modified $obj.o.\n" if $opt_v;
  2253. X    } else {
  2254. X        print STDERR "Extracting from $lib...\n" if $opt_v;
  2255. X        # ar x /usr/lib/libc.a foo.o
  2256. X        $line = "ar x $lib $obj.o";
  2257. X        system($line);
  2258. X        $modified_files .= ":$obj.o:";
  2259. X    }
  2260. X    } else {
  2261. X    $obj = $lib;
  2262. X    }
  2263. X    
  2264. X    print STDERR "Rename $func() to $Func().\n" if $opt_v;
  2265. X    open(OBJ, "$obj.o") || die;
  2266. X    open(OUT, ">new.$obj.o") || die;
  2267. X    while (<OBJ>) {
  2268. X    # sed -e 's/foo/Foo/g' < foo.o > new.foo.o
  2269. X    s/(\W)$func\000/\1$Func\000/g;
  2270. X    print OUT;
  2271. X    }
  2272. X    close(OBJ);
  2273. X    close(OUT);
  2274. X    rename("$obj.o", "$obj.o.orig");
  2275. X    rename("new.$obj.o", "$obj.o");
  2276. X     
  2277. X    if ($opt_d) {
  2278. X    system <<"EOF";
  2279. X    echo "================ $obj.o"
  2280. X    od -c $obj.o > /tmp/b
  2281. X    od -c $obj.o.orig > /tmp/a
  2282. X    diff -c /tmp/[ab]
  2283. X    rm -f /tmp/[ab]
  2284. XEOF
  2285. X    ;
  2286. X    }
  2287. X    unlink("$obj.o.orig") unless $opt_p;
  2288. X}
  2289. X
  2290. Xsub search_library {
  2291. X    local ($lib, $func) = @_;
  2292. X    local ($obj, $matches);
  2293. X    local (@found);
  2294. X
  2295. X    print STDERR "Searching $lib for $func()...\n" if $opt_v;
  2296. X    open(NM, "nm $lib |");
  2297. X    while (<NM>) {
  2298. X    /^(\S+)\.o:/ && ($obj = $1);
  2299. X    if (/$func$/) {
  2300. X        $matches .= $_;
  2301. X        if (/$sections $func/) {
  2302. X        push(found, $obj);
  2303. X        last unless $opt_S;
  2304. X        }
  2305. X    }
  2306. X    }
  2307. X    close(NM);            # yes, we love broken pipe!
  2308. X    print STDERR "Found $func() in @found.\n" if $opt_v && @found;
  2309. X    if (! scalar(@found)) {
  2310. X    print STDERR "Could not find $func() in $lib.\n";
  2311. X    print STDERR "Here's similar symbols in $lib:\n", $matches;
  2312. X    }
  2313. X    return @found;
  2314. X}
  2315. X
  2316. X# exit
  2317. X
  2318. X# Local Variables:
  2319. X# mode: perl
  2320. X# End:
  2321. END_OF_FILE
  2322.   if test 3030 -ne `wc -c <'libww/renamesym.pl'`; then
  2323.     echo shar: \"'libww/renamesym.pl'\" unpacked with wrong size!
  2324.   fi
  2325.   chmod +x 'libww/renamesym.pl'
  2326.   # end of 'libww/renamesym.pl'
  2327. fi
  2328. if test -f 'mule/wwfs-access-hook.el' -a "${1}" != "-c" ; then 
  2329.   echo shar: Will not clobber existing file \"'mule/wwfs-access-hook.el'\"
  2330. else
  2331.   echo shar: Extracting \"'mule/wwfs-access-hook.el'\" \(3123 characters\)
  2332.   sed "s/^X//" >'mule/wwfs-access-hook.el' <<'END_OF_FILE'
  2333. X;;; -*-Emacs-Lisp-*-
  2334. X;;; 
  2335. X;;; WorldWide File System
  2336. X;;; Copyright (c) 1992,1993 Youki Kadobayashi
  2337. X;;; Copyright (c) 1992,1993 Osaka University
  2338. X;;; All rights reserved.
  2339. X;;;
  2340. X;;; Permission to use, copy, modify and distribute this software and its
  2341. X;;; documentation is hereby granted, provided that the following conditions
  2342. X;;; are met:
  2343. X;;; 1. Both the copyright notice and this permission notice appear in
  2344. X;;;    all copies of the software, derivative works or modified versions,
  2345. X;;;    and any portions thereof, and that both notices appear in
  2346. X;;;    supporting documentation.
  2347. X;;; 2. All advertising materials mentioning features or use of this software
  2348. X;;;    must display the following acknowledgement:
  2349. X;;;      This product includes software developed by the Osaka University
  2350. X;;;      and its contributors.
  2351. X;;; 3. Neither the name of the University nor the names of its contributors
  2352. X;;;    may be used to endorse or promote products derived from this software
  2353. X;;;    without specific prior written permission.
  2354. X;;;
  2355. X;;; THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  2356. X;;; UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  2357. X;;; WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  2358. X;;;
  2359. X;;; Osaka University requests users of this software to return to
  2360. X;;;
  2361. X;;;  Youki Kadobayashi
  2362. X;;;  Department of Information and Computer Sciences
  2363. X;;;  Osaka University, Toyonaka 560, Osaka, Japan
  2364. X;;;
  2365. X;;; any improvements or extensions that they make and grant Osaka
  2366. X;;; University the rights to redistribute these changes.
  2367. X
  2368. X;;; $Header: wwfs-access-hook.el[109.1] Tue Dec  7 23:38:35 1993 youki-k@is.aist-nara.ac.jp saved $
  2369. X;;;
  2370. X;;; This file requires modification to mule.el that adds 'access-hook'
  2371. X;;; to 'insert-file-contents'.
  2372. X;;;
  2373. X;;; You must add the following lines to ~/.emacs if you want to use this
  2374. X;;; package.
  2375. X;;;
  2376. X;;; (if (boundp 'MULE)
  2377. X;;;    (require 'wwfs-access-hook))
  2378. X
  2379. X
  2380. X(defvar wwfs-blocking-read t
  2381. X  "If set to t, block find-file if the requested file is on WWFS.
  2382. XIf set to nil, remove zero-sized buffer of the same name.")
  2383. X
  2384. X(defvar wwfs-get-program "/usr/local/ww/bin/wwget"
  2385. X  "Name of the program to request csd to transfer files and/or directories.")
  2386. X
  2387. X(defun wwfs-insert-file-contents-hook (filename &optional visit)
  2388. X  "See also wwfs-blocking-read and insert-file-contents."
  2389. X;;  (debug)
  2390. X  (if (file-exists-p
  2391. X       (concat (file-name-directory filename) ".wwfs_fh"))
  2392. X      (if wwfs-blocking-read
  2393. X      (wwfs-get-file filename)
  2394. X    (wwfs-remove-junk-buffer filename))))
  2395. X
  2396. X(setq insert-file-contents-access-hook 'wwfs-insert-file-contents-hook)
  2397. X
  2398. X(defun wwfs-get-file (pathname &optional switches)
  2399. X  (let ((file (file-name-nondirectory pathname)))
  2400. X    (message "Retrieving %s via WWFS..." file)
  2401. X    (call-process wwfs-get-program nil t nil pathname)
  2402. X    (message "Retrieving %s via WWFS... done." file)))
  2403. X
  2404. X(defun wwfs-remove-junk-buffer (file)
  2405. X  (let ((junk-buffer (get-buffer (file-name-nondirectory file))))
  2406. X    (set-buffer junk-buffer)
  2407. X    (save-excursion
  2408. X      (if (and (zerop (buffer-size))
  2409. X           (not (buffer-file-name junk-buffer)))
  2410. X      (kill-buffer junk-buffer)))))
  2411. X
  2412. X(provide 'wwfs-access-hook)
  2413. END_OF_FILE
  2414.   if test 3123 -ne `wc -c <'mule/wwfs-access-hook.el'`; then
  2415.     echo shar: \"'mule/wwfs-access-hook.el'\" unpacked with wrong size!
  2416.   fi
  2417.   # end of 'mule/wwfs-access-hook.el'
  2418. fi
  2419. if test -f 'release.pl' -a "${1}" != "-c" ; then 
  2420.   echo shar: Will not clobber existing file \"'release.pl'\"
  2421. else
  2422.   echo shar: Extracting \"'release.pl'\" \(3010 characters\)
  2423.   sed "s/^X//" >'release.pl' <<'END_OF_FILE'
  2424. X#!/usr/local/bin/perl
  2425. X#
  2426. X# Check out the source tree from AtFS.
  2427. X#
  2428. X# Author:    Youki Kadobayashi, Osaka University, Japan
  2429. X#        E-mail: <youki@wide.ad.jp>
  2430. X#
  2431. X# 
  2432. X# WorldWide File System
  2433. X# Copyright (c) 1992,1993 Youki Kadobayashi
  2434. X# Copyright (c) 1992,1993 Osaka University
  2435. X# All rights reserved.
  2436. X#
  2437. X# Permission to use, copy, modify and distribute this software and its
  2438. X# documentation is hereby granted, provided that the following conditions
  2439. X# are met:
  2440. X# 1. Both the copyright notice and this permission notice appear in
  2441. X#    all copies of the software, derivative works or modified versions,
  2442. X#    and any portions thereof, and that both notices appear in
  2443. X#    supporting documentation.
  2444. X# 2. All advertising materials mentioning features or use of this software
  2445. X#    must display the following acknowledgement:
  2446. X#      This product includes software developed by the Osaka University
  2447. X#      and its contributors.
  2448. X# 3. Neither the name of the University nor the names of its contributors
  2449. X#    may be used to endorse or promote products derived from this software
  2450. X#    without specific prior written permission.
  2451. X#
  2452. X# THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  2453. X# UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  2454. X# WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  2455. X#
  2456. X# Osaka University requests users of this software to return to
  2457. X#
  2458. X#  Youki Kadobayashi
  2459. X#  Department of Information and Computer Sciences
  2460. X#  Osaka University, Toyonaka 560, Osaka, Japan
  2461. X#
  2462. X# any improvements or extensions that they make and grant Osaka
  2463. X# University the rights to redistribute these changes.
  2464. X
  2465. X# $Header: release.pl[109.0] Wed Nov 24 03:46:27 1993 youki-k@is.aist-nara.ac.jp saved $
  2466. X#
  2467. X
  2468. Xrequire "find.pl";
  2469. Xrequire "getopts.pl";
  2470. X
  2471. Xdo Getopts('dn:v');
  2472. X$opt_v = 1 if $opt_d;
  2473. Xif ($opt_n) {
  2474. X    $vlcmd = "vl -n $opt_n";
  2475. X} else {
  2476. X    $vlcmd = "vl -lastsaved";
  2477. X}
  2478. X
  2479. X$release = `pwd`;
  2480. Xchop $release;
  2481. X$release .= "/../release";
  2482. X
  2483. X# Traverse desired filesystems
  2484. X
  2485. X&find('.');
  2486. X
  2487. Xexit;
  2488. X
  2489. Xsub wanted {
  2490. X    local ($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_);
  2491. X    if (-l $_) {
  2492. X    # make symbolic link
  2493. X    $dest = $_;
  2494. X    $src = readlink($dest);
  2495. X    print "Creating symbolic link $release/$dest -> $src\n" if $opt_v;
  2496. X    if (! $opt_d) {
  2497. X        unlink("$release/$dir/$dest");
  2498. X        symlink($src, "$release/$dir/$dest");
  2499. X    } else {
  2500. X        print "rm $release/$dir/$dest\n";
  2501. X        print "ln -s $src $release/$dir/$dest\n";
  2502. X    }
  2503. X    }
  2504. X    elsif (-d $_) {
  2505. X    next if ($name =~ m|/AtFS|);
  2506. X    if (! -e "$release/$name") {
  2507. X        print "Creating directory $release/$name\n" if $opt_v;
  2508. X        mkdir("$release/$name", 0755) unless $opt_d;
  2509. X    }
  2510. X    }
  2511. X    elsif (-f $_) {
  2512. X    next if ($dir =~ m|/AtFS|);
  2513. X    $file = `$vlcmd $_`;
  2514. X    next if ($?);        # no version object?
  2515. X    print "Retrieving $file\n" if $opt_v;
  2516. X#    &command("retrv -fq -dest $release/$dir $file");
  2517. X    &command("retrv -q -dest $release/$dir $file");
  2518. X    chmod $mode | 0200, "$release/$dir/$_" unless $opt_d;
  2519. X    }
  2520. X}
  2521. X
  2522. Xsub command {
  2523. X    local ($str) = @_;
  2524. X
  2525. X    if ($opt_d) {
  2526. X    print $str, "\n";
  2527. X    } else {
  2528. X    system($str);
  2529. X    }
  2530. X}
  2531. X
  2532. END_OF_FILE
  2533.   if test 3010 -ne `wc -c <'release.pl'`; then
  2534.     echo shar: \"'release.pl'\" unpacked with wrong size!
  2535.   fi
  2536.   chmod +x 'release.pl'
  2537.   # end of 'release.pl'
  2538. fi
  2539. if test -f 'rpc/cs_prot_svc.c' -a "${1}" != "-c" ; then 
  2540.   echo shar: Will not clobber existing file \"'rpc/cs_prot_svc.c'\"
  2541. else
  2542.   echo shar: Extracting \"'rpc/cs_prot_svc.c'\" \(2948 characters\)
  2543.   sed "s/^X//" >'rpc/cs_prot_svc.c' <<'END_OF_FILE'
  2544. X/*
  2545. X * Please do not edit this file.
  2546. X * It was generated using rpcgen.
  2547. X */
  2548. X
  2549. X#include <stdio.h>
  2550. X#include <rpc/rpc.h>
  2551. X#include "util.h"
  2552. X#include "cs_prot.h"
  2553. X#ifndef NFS_FH_DEFINED
  2554. X#define NFS_FH_DEFINED
  2555. X#endif
  2556. X
  2557. Xvoid
  2558. Xcs_program_1(rqstp, transp)
  2559. X    struct svc_req *rqstp;
  2560. X    register SVCXPRT *transp;
  2561. X{
  2562. X    union {
  2563. X        cs_volargs cs_proc_mount_1_arg;
  2564. X        cs_volargs cs_proc_umount_1_arg;
  2565. X        cs_diropargs cs_proc_lookup_1_arg;
  2566. X        cs_readdirargs cs_proc_readdir_1_arg;
  2567. X        cs_readargs cs_proc_read_1_arg;
  2568. X        cs_volargs cs_proc_getvol_1_arg;
  2569. X        nfs_fh cs_proc_getxfer_1_arg;
  2570. X        cs_udaargs cs_proc_getuda_1_arg;
  2571. X        cs_geterrargs cs_proc_geterr_1_arg;
  2572. X    } argument;
  2573. X    char *result;
  2574. X    bool_t (*xdr_argument)(), (*xdr_result)();
  2575. X    char *(*local)();
  2576. X
  2577. X    switch (rqstp->rq_proc) {
  2578. X    case CS_PROC_NULL:
  2579. X        xdr_argument = xdr_void;
  2580. X        xdr_result = xdr_void;
  2581. X        local = (char *(*)()) cs_proc_null_1;
  2582. X        break;
  2583. X
  2584. X    case CS_PROC_GETPORT:
  2585. X        xdr_argument = xdr_void;
  2586. X        xdr_result = xdr_int;
  2587. X        local = (char *(*)()) cs_proc_getport_1;
  2588. X        break;
  2589. X
  2590. X    case CS_PROC_REGISTER:
  2591. X        xdr_argument = xdr_void;
  2592. X        xdr_result = xdr_cs_fhres;
  2593. X        local = (char *(*)()) cs_proc_register_1;
  2594. X        break;
  2595. X
  2596. X    case CS_PROC_UNREGISTER:
  2597. X        xdr_argument = xdr_void;
  2598. X        xdr_result = xdr_cs_res;
  2599. X        local = (char *(*)()) cs_proc_unregister_1;
  2600. X        break;
  2601. X
  2602. X    case CS_PROC_MOUNT:
  2603. X        xdr_argument = xdr_cs_volargs;
  2604. X        xdr_result = xdr_cs_res;
  2605. X        local = (char *(*)()) cs_proc_mount_1;
  2606. X        break;
  2607. X
  2608. X    case CS_PROC_UMOUNT:
  2609. X        xdr_argument = xdr_cs_volargs;
  2610. X        xdr_result = xdr_cs_res;
  2611. X        local = (char *(*)()) cs_proc_umount_1;
  2612. X        break;
  2613. X
  2614. X    case CS_PROC_LOOKUP:
  2615. X        xdr_argument = xdr_cs_diropargs;
  2616. X        xdr_result = xdr_cs_diropres;
  2617. X        local = (char *(*)()) cs_proc_lookup_1;
  2618. X        break;
  2619. X
  2620. X    case CS_PROC_READDIR:
  2621. X        xdr_argument = xdr_cs_readdirargs;
  2622. X        xdr_result = xdr_cs_readdirres;
  2623. X        local = (char *(*)()) cs_proc_readdir_1;
  2624. X        break;
  2625. X
  2626. X    case CS_PROC_READ:
  2627. X        xdr_argument = xdr_cs_readargs;
  2628. X        xdr_result = xdr_cs_readres;
  2629. X        local = (char *(*)()) cs_proc_read_1;
  2630. X        break;
  2631. X
  2632. X    case CS_PROC_GETVOL:
  2633. X        xdr_argument = xdr_cs_volargs;
  2634. X        xdr_result = xdr_cs_volres;
  2635. X        local = (char *(*)()) cs_proc_getvol_1;
  2636. X        break;
  2637. X
  2638. X    case CS_PROC_GETXFER:
  2639. X        xdr_argument = xdr_nfs_fh;
  2640. X        xdr_result = xdr_cs_xferres;
  2641. X        local = (char *(*)()) cs_proc_getxfer_1;
  2642. X        break;
  2643. X
  2644. X    case CS_PROC_GETUDA:
  2645. X        xdr_argument = xdr_cs_udaargs;
  2646. X        xdr_result = xdr_cs_udares;
  2647. X        local = (char *(*)()) cs_proc_getuda_1;
  2648. X        break;
  2649. X
  2650. X    case CS_PROC_GETERR:
  2651. X        xdr_argument = xdr_cs_geterrargs;
  2652. X        xdr_result = xdr_cs_geterrres;
  2653. X        local = (char *(*)()) cs_proc_geterr_1;
  2654. X        break;
  2655. X
  2656. X    default:
  2657. X        svcerr_noproc(transp);
  2658. X        return;
  2659. X    }
  2660. X    bzero((char *)&argument, sizeof(argument));
  2661. X    if (!svc_getargs(transp, xdr_argument, &argument)) {
  2662. X        svcerr_decode(transp);
  2663. X        return;
  2664. X    }
  2665. X    result = (*local)(&argument, rqstp);
  2666. X    if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
  2667. X        svcerr_systemerr(transp);
  2668. X    }
  2669. X    if (!svc_freeargs(transp, xdr_argument, &argument)) {
  2670. X        dlog( "unable to free arguments");
  2671. X        csd_abort(1);
  2672. X    }
  2673. X    return;
  2674. X}
  2675. END_OF_FILE
  2676.   if test 2948 -ne `wc -c <'rpc/cs_prot_svc.c'`; then
  2677.     echo shar: \"'rpc/cs_prot_svc.c'\" unpacked with wrong size!
  2678.   fi
  2679.   # end of 'rpc/cs_prot_svc.c'
  2680. fi
  2681. if test -f 'wwmount/Makefile.build' -a "${1}" != "-c" ; then 
  2682.   echo shar: Will not clobber existing file \"'wwmount/Makefile.build'\"
  2683. else
  2684.   echo shar: Extracting \"'wwmount/Makefile.build'\" \(3102 characters\)
  2685.   sed "s/^X//" >'wwmount/Makefile.build' <<'END_OF_FILE'
  2686. X#
  2687. X# Makefile.build for mount/umount; part of Worldwide File System.
  2688. X#
  2689. X# Author:    Youki Kadobayashi, Osaka University, Japan
  2690. X#        E-mail: <youki@wide.ad.jp>
  2691. X#
  2692. X# 
  2693. X# WorldWide File System
  2694. X# Copyright (c) 1992,1993 Youki Kadobayashi
  2695. X# Copyright (c) 1992,1993 Osaka University
  2696. X# All rights reserved.
  2697. X#
  2698. X# Permission to use, copy, modify and distribute this software and its
  2699. X# documentation is hereby granted, provided that the following conditions
  2700. X# are met:
  2701. X# 1. Both the copyright notice and this permission notice appear in
  2702. X#    all copies of the software, derivative works or modified versions,
  2703. X#    and any portions thereof, and that both notices appear in
  2704. X#    supporting documentation.
  2705. X# 2. All advertising materials mentioning features or use of this software
  2706. X#    must display the following acknowledgement:
  2707. X#      This product includes software developed by the Osaka University
  2708. X#      and its contributors.
  2709. X# 3. Neither the name of the University nor the names of its contributors
  2710. X#    may be used to endorse or promote products derived from this software
  2711. X#    without specific prior written permission.
  2712. X#
  2713. X# THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
  2714. X# UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  2715. X# WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  2716. X#
  2717. X# Osaka University requests users of this software to return to
  2718. X#
  2719. X#  Youki Kadobayashi
  2720. X#  Department of Information and Computer Sciences
  2721. X#  Osaka University, Toyonaka 560, Osaka, Japan
  2722. X#
  2723. X# any improvements or extensions that they make and grant Osaka
  2724. X# University the rights to redistribute these changes.
  2725. X
  2726. X# $Header: Makefile.build[109.0] Wed Nov 24 03:49:38 1993 youki-k@is.aist-nara.ac.jp saved $
  2727. X#
  2728. X
  2729. X# Lowest common denominator does not provide VPATH
  2730. X# VPATH = ../rpc:../config
  2731. X
  2732. XSTUBOBJS=    cs_prot_xdr.o nfs_prot_xdr.o misc_rpc.o
  2733. X
  2734. XMOUNTSRCS=    wwmount.c am_compat.c
  2735. X
  2736. XMOUNTOBJS=    $(MOUNTSRCS:.c=.o)
  2737. X
  2738. XUMOUNTSRCS=    wwumount.c am_compat.c
  2739. X
  2740. XUMOUNTOBJS=    $(UMOUNTSRCS:.c=.o)
  2741. X
  2742. XMTABOBJS=    mtab_aix.o mtab_bsd.o mtab_file.o mtab_ultrix.o
  2743. X
  2744. Xwwmount:    $(MOUNTOBJS) $(STUBOBJS) $(MTABOBJS)
  2745. X    $(CC) -o wwmount $(MOUNTOBJS) $(STUBOBJS) $(MTABOBJS) \
  2746. X    $(RPCLIB) $(RESOLV) $(SYSLIB)
  2747. X
  2748. Xwwumount:    $(UMOUNTOBJS) $(STUBOBJS) $(MTABOBJS)
  2749. X    $(CC) -o wwumount $(UMOUNTOBJS) $(STUBOBJS) $(MTABOBJS) \
  2750. X    $(RPCLIB) $(RESOLV) $(SYSLIB)
  2751. X
  2752. Xinstall-client:    wwmount wwumount
  2753. X    $(INSTBIN) wwmount $(ETCDIR)
  2754. X    $(INSTBIN) wwumount $(ETCDIR)
  2755. X
  2756. Xclean::
  2757. X    -rm -f wwmount wwumount
  2758. X
  2759. XFRC:
  2760. X
  2761. X# misc_rpc.o:        ../config/misc_rpc.c ../include/am.h
  2762. X# mount_aix.o:        ../config/mount_aix.c ../include/am.h
  2763. X# mount_irix.o:        ../config/mount_irix.c ../include/am.h
  2764. X# mount_stellix.o:    ../config/mount_stellix.c ../include/am.h
  2765. X# mtab_aix.o:        ../config/mtab_aix.c ../include/am.h
  2766. X# mtab_bsd.o:        ../config/mtab_bsd.c ../include/am.h
  2767. X# mtab_file.o:        ../config/mtab_file.c ../include/am.h
  2768. X# mtab_ultrix.o:        ../config/mtab_ultrix.c ../include/am.h
  2769. X# cs_prot_clnt.o:        ../rpc/cs_prot_clnt.c ../rpc/cs_prot.h
  2770. X# cs_prot_xdr.o:        ../rpc/cs_prot_xdr.c ../rpc/cs_prot.h
  2771. X# nfs_prot_clnt.o:    ../rpc/nfs_prot_clnt.c ../rpc/nfs_prot.h
  2772. X# nfs_prot_xdr.o:        ../rpc/nfs_prot_xdr.c ../rpc/nfs_prot.h
  2773. END_OF_FILE
  2774.   if test 3102 -ne `wc -c <'wwmount/Makefile.build'`; then
  2775.     echo shar: \"'wwmount/Makefile.build'\" unpacked with wrong size!
  2776.   fi
  2777.   # end of 'wwmount/Makefile.build'
  2778. fi
  2779. echo shar: End of archive 19 \(of 22\).
  2780. cp /dev/null ark19isdone
  2781. MISSING=""
  2782. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ; do
  2783.     if test ! -f ark${I}isdone ; then
  2784.     MISSING="${MISSING} ${I}"
  2785.     fi
  2786. done
  2787. if test "${MISSING}" = "" ; then
  2788.     echo You have unpacked all 22 archives.
  2789.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2790. else
  2791.     echo You still must unpack the following archives:
  2792.     echo "        " ${MISSING}
  2793. fi
  2794. exit 0
  2795. exit 0 # Just in case...
  2796.