OSDN Git Service

Pull upstream FreeBSD revision 249810.
authorElliott Hughes <enh@google.com>
Tue, 14 May 2013 21:56:54 +0000 (14:56 -0700)
committerElliott Hughes <enh@google.com>
Tue, 14 May 2013 22:02:16 +0000 (15:02 -0700)
Fix license clause numbering.

Convert libc/stdio from K&R to ANSI C.

And add '__restrict' where it appeared in the header prototypes.

Change-Id: I5fdb22f79d3effa2298d03f9aa8412b4b087da04
Upstream: http://svnweb.freebsd.org/base?view=revision&revision=249810

31 files changed:
libc/NOTICE
libc/upstream-freebsd/lib/libc/stdio/clrerr.c
libc/upstream-freebsd/lib/libc/stdio/fclose.c
libc/upstream-freebsd/lib/libc/stdio/fdopen.c
libc/upstream-freebsd/lib/libc/stdio/feof.c
libc/upstream-freebsd/lib/libc/stdio/ferror.c
libc/upstream-freebsd/lib/libc/stdio/fgetln.c
libc/upstream-freebsd/lib/libc/stdio/fgetpos.c
libc/upstream-freebsd/lib/libc/stdio/fgets.c
libc/upstream-freebsd/lib/libc/stdio/fileno.c
libc/upstream-freebsd/lib/libc/stdio/flags.c
libc/upstream-freebsd/lib/libc/stdio/fopen.c
libc/upstream-freebsd/lib/libc/stdio/fpurge.c
libc/upstream-freebsd/lib/libc/stdio/fputs.c
libc/upstream-freebsd/lib/libc/stdio/fsetpos.c
libc/upstream-freebsd/lib/libc/stdio/funopen.c
libc/upstream-freebsd/lib/libc/stdio/fwalk.c
libc/upstream-freebsd/lib/libc/stdio/fwrite.c
libc/upstream-freebsd/lib/libc/stdio/getc.c
libc/upstream-freebsd/lib/libc/stdio/getchar.c
libc/upstream-freebsd/lib/libc/stdio/putc.c
libc/upstream-freebsd/lib/libc/stdio/putchar.c
libc/upstream-freebsd/lib/libc/stdio/puts.c
libc/upstream-freebsd/lib/libc/stdio/putw.c
libc/upstream-freebsd/lib/libc/stdio/remove.c
libc/upstream-freebsd/lib/libc/stdio/rget.c
libc/upstream-freebsd/lib/libc/stdio/setbuf.c
libc/upstream-freebsd/lib/libc/stdio/setbuffer.c
libc/upstream-freebsd/lib/libc/stdio/tempnam.c
libc/upstream-freebsd/lib/libc/stdio/tmpnam.c
libc/upstream-freebsd/lib/libc/stdio/wsetup.c

index 730fa46..be59d38 100644 (file)
@@ -2056,6 +2056,35 @@ SUCH DAMAGE.
 Copyright (c) 1992, 1993
    The Regents of the University of California.  All rights reserved.
 
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+   The Regents of the University of California.  All rights reserved.
+
 This code is derived from software contributed to Berkeley by
 Ralph Campbell.
 
index 1b318e6..f161a6e 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
 #undef clearerr_unlocked
 
 void
-clearerr(fp)
-       FILE *fp;
+clearerr(FILE *fp)
 {
        FLOCKFILE(fp);
        __sclearerr(fp);
index 3957b6a..5ed8b2c 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
index 8fc90a4..2e19b9f 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -47,9 +47,7 @@ __FBSDID("$FreeBSD$");
 #include "local.h"
 
 FILE *
-fdopen(fd, mode)
-       int fd;
-       const char *mode;
+fdopen(int fd, const char *mode)
 {
        FILE *fp;
        int flags, oflags, fdflags, tmp;
index 502f1e5..b970248 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
index d155ff0..7e0f8f9 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
index 7cb2854..1779de2 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -115,7 +115,7 @@ fgetln(FILE *fp, size_t *lenp)
         * As a bonus, though, we can leave off the __SMOD.
         *
         * OPTIMISTIC is length that we (optimistically) expect will
-        * accomodate the `rest' of the string, on each trip through the
+        * accommodate the `rest' of the string, on each trip through the
         * loop below.
         */
 #define OPTIMISTIC 80
index 9053be8..f161f43 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
index a0cc724..9abf559 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -49,10 +49,7 @@ __FBSDID("$FreeBSD$");
  * Return first argument, or NULL if no characters were read.
  */
 char *
-fgets(buf, n, fp)
-       char *buf;
-       int n;
-       FILE *fp;
+fgets(char * __restrict buf, int n, FILE * __restrict fp)
 {
        size_t len;
        char *s;
index 1962bb7..3ac1830 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
index e445fed..1878c2f 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -49,9 +49,7 @@ __FBSDID("$FreeBSD$");
  * Return 0 on error.
  */
 int
-__sflags(mode, optr)
-       const char *mode;
-       int *optr;
+__sflags(const char *mode, int *optr)
 {
        int ret, m, o;
 
index 6fe536a..b08e336 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -49,9 +49,7 @@ __FBSDID("$FreeBSD$");
 #include "local.h"
 
 FILE *
-fopen(file, mode)
-       const char * __restrict file;
-       const char * __restrict mode;
+fopen(const char * __restrict file, const char * __restrict mode)
 {
        FILE *fp;
        int f;
index 148e490..f205bdf 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
  * given FILE's buffer empty.
  */
 int
-fpurge(fp)
-       FILE *fp;
+fpurge(FILE *fp)
 {
        int retval;
        FLOCKFILE(fp);
index eb20f9e..3b8f2c9 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -48,9 +48,7 @@ __FBSDID("$FreeBSD$");
  * Write the given string to the given file.
  */
 int
-fputs(s, fp)
-       const char * __restrict s;
-       FILE * __restrict fp;
+fputs(const char * __restrict s, FILE * __restrict fp)
 {
        int retval;
        struct __suio uio;
index f9a742e..c6b8b78 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$");
  * fsetpos: like fseek.
  */
 int
-fsetpos(iop, pos)
-       FILE *iop;
-       const fpos_t *pos;
+fsetpos(FILE *iop, const fpos_t *pos)
 {
        return (fseeko(iop, (off_t)*pos, SEEK_SET));
 }
index 573589f..983fe50 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
index cb20071..151837b 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -42,8 +42,7 @@ __FBSDID("$FreeBSD$");
 #include "glue.h"
 
 int
-_fwalk(function)
-       int (*function)(FILE *);
+_fwalk(int (*function)(FILE *))
 {
        FILE *fp;
        int n, ret;
index acac943..707d362 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -50,10 +50,7 @@ __FBSDID("$FreeBSD$");
  * Return the number of whole objects written.
  */
 size_t
-fwrite(buf, size, count, fp)
-       const void * __restrict buf;
-       size_t size, count;
-       FILE * __restrict fp;
+fwrite(const void * __restrict buf, size_t size, size_t count, FILE * __restrict fp)
 {
        size_t n;
        struct __suio uio;
index 5c94e60..4963c8c 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
index 90c84ab..21040bc 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
index d0882f0..aaffece 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$");
 #undef putc_unlocked
 
 int
-putc(c, fp)
-       int c;
-       FILE *fp;
+putc(int c, FILE *fp)
 {
        int retval;
        FLOCKFILE(fp);
index d263970..7561559 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
  * A subroutine version of the macro putchar
  */
 int
-putchar(c)
-       int c;
+putchar(int c)
 {
        int retval;
        FILE *so = stdout;
index 2dc945b..5ee7fc1 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -48,8 +48,7 @@ __FBSDID("$FreeBSD$");
  * Write the given string to stdout, appending a newline.
  */
 int
-puts(s)
-       char const *s;
+puts(char const *s)
 {
        int retval;
        size_t c = strlen(s);
index 8fc1b4d..0360caf 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$");
 #include "libc_private.h"
 
 int
-putw(w, fp)
-       int w;
-       FILE *fp;
+putw(int w, FILE *fp)
 {
        int retval;
        struct __suio uio;
index f08e47c..2e984ba 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -42,8 +42,7 @@ __FBSDID("$FreeBSD$");
 #include <stdio.h>
 
 int
-remove(file)
-       const char *file;
+remove(const char *file)
 {
        struct stat sb;
 
index 71c75e0..bdc0311 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
index 0daef54..5c65f97 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
index dd1caa0..af5eb3c 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -39,10 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <stdio.h>
 
 void
-setbuffer(fp, buf, size)
-       FILE *fp;
-       char *buf;
-       int size;
+setbuffer(FILE *fp, char *buf, int size)
 {
 
        (void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, (size_t)size);
@@ -52,8 +49,7 @@ setbuffer(fp, buf, size)
  * set line buffering
  */
 int
-setlinebuf(fp)
-       FILE *fp;
+setlinebuf(FILE *fp)
 {
 
        return (setvbuf(fp, (char *)NULL, _IOLBF, (size_t)0));
index ea4a2c8..e15746f 100644 (file)
@@ -10,7 +10,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -47,8 +47,7 @@ __warn_references(tempnam,
 extern char *_mktemp(char *);
 
 char *
-tempnam(dir, pfx)
-       const char *dir, *pfx;
+tempnam(const char *dir, const char *pfx)
 {
        int sverrno;
        char *f, *name;
index 05bcb5b..ce32dcc 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -47,8 +47,7 @@ __warn_references(tmpnam,
 extern char *_mktemp(char *);
 
 char *
-tmpnam(s)
-       char *s;
+tmpnam(char *s)
 {
        static u_long tmpcount;
        static char buf[L_tmpnam];
index 37bfc58..70f8247 100644 (file)
@@ -13,7 +13,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -47,8 +47,7 @@ __FBSDID("$FreeBSD$");
  * _wsetup returns 0 if OK to write; otherwise, it returns EOF and sets errno.
  */
 int
-__swsetup(fp)
-       FILE *fp;
+__swsetup(FILE *fp)
 {
        /* make sure stdio is set up */
        if (!__sdidinit)