From 54d79e995d5a6d0a393ed913b6e26dccc63de5b7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 Nov 1996 04:08:00 +0000 Subject: update from main archive 961114 --- Makerules | 9 ++-- db/btree/bt_put.c | 4 +- db/btree/bt_split.c | 3 +- db/hash/hash.c | 7 ++-- db/hash/hash_bigkey.c | 6 +-- db/mpool/mpool.c | 11 ++--- db/recno/rec_close.c | 4 +- db/recno/rec_put.c | 4 +- dirent/dirent.h | 40 +++++++++--------- elf/elf.h | 35 ++++++++-------- elf/link.h | 34 +++++++-------- gmon/sys/gmon_out.h | 39 +++++++++--------- gnu-versions.h | 34 +++++++-------- intl/libintl.h | 42 +++++++++---------- io/fcntl.h | 28 ++++++------- io/ftw.h | 32 +++++++-------- io/sys/statfs.h | 34 +++++++-------- io/utime.h | 32 +++++++-------- locale/langinfo.h | 34 +++++++-------- manual/examples/rprintf.c | 16 +++++++- manual/stdio.texi | 66 +++++++++++++++++++++--------- misc/ar.h | 34 ++++++++------- misc/error.h | 38 ++++++++++------- misc/mntent.h | 34 +++++++-------- misc/sgtty.h | 30 +++++++------- misc/sys/cdefs.h | 32 +++++++-------- misc/sys/dir.h | 34 +++++++-------- misc/sys/file.h | 32 +++++++-------- misc/sys/ioctl.h | 32 +++++++-------- misc/sys/ustat.h | 34 +++++++-------- nss/getXXbyYY.c | 10 ++++- nss/getXXent_r.c | 4 +- nss/nss_files/files-XXX.c | 2 +- nss/nss_files/files-alias.c | 1 + posix/fnmatch.h | 27 ++++++------ posix/getopt.h | 30 +++++++------- posix/glob.h | 31 +++++++------- posix/posix1_lim.h | 4 +- posix/posix2_lim.h | 32 +++++++-------- posix/regex.h | 57 +++++++++++++------------- posix/sys/times.h | 32 +++++++-------- posix/sys/types.h | 32 +++++++-------- posix/sys/utsname.h | 32 +++++++-------- posix/tar.h | 27 ++++++------ posix/wordexp.h | 30 +++++++------- resource/sys/resource.h | 32 +++++++-------- resource/sys/vlimit.h | 28 ++++++------- resource/sys/vtimes.h | 28 ++++++------- socket/sys/socket.h | 34 +++++++-------- socket/sys/un.h | 33 ++++++++------- stdio-common/printf.h | 33 ++++++++------- stdlib/alloca.h | 32 +++++++-------- string/argz.h | 21 +++++----- string/endian.h | 34 +++++++-------- string/envz.h | 25 ++++++----- string/memory.h | 34 +++++++-------- string/strings.h | 34 +++++++-------- sysdeps/generic/crypt.h | 7 ++-- sysdeps/generic/gnu/types.h | 26 ++++++------ sysdeps/generic/ioctl-types.h | 34 +++++++-------- sysdeps/generic/netinet/in.h | 31 +++++++------- sysdeps/generic/resourcebits.h | 28 ++++++------- sysdeps/generic/sigset.h | 34 +++++++-------- sysdeps/generic/sockaddrcom.h | 34 +++++++-------- sysdeps/generic/sys/mman.h | 34 +++++++-------- sysdeps/generic/sys/ptrace.h | 34 +++++++-------- sysdeps/generic/termbits.h | 34 +++++++-------- sysdeps/generic/waitstatus.h | 34 +++++++-------- sysdeps/ieee754/huge_val.h | 35 ++++++++-------- sysdeps/ieee754/nan.h | 35 ++++++++-------- sysdeps/mach/hurd/local_lim.h | 31 +++++++------- sysdeps/mach/hurd/statbuf.h | 34 +++++++-------- sysdeps/posix/Makefile | 8 ++-- sysdeps/stub/direntry.h | 28 ++++++------- sysdeps/stub/huge_val.h | 29 +++++++------ sysdeps/stub/libc-lock.h | 34 +++++++-------- sysdeps/stub/signum.h | 32 +++++++-------- sysdeps/stub/statbuf.h | 34 +++++++-------- sysdeps/stub/waitflags.h | 28 ++++++------- sysdeps/unix/bsd/bsd4.4/sockaddrcom.h | 34 +++++++-------- sysdeps/unix/bsd/osf/alpha/statbuf.h | 27 ++++++------ sysdeps/unix/bsd/osf/sys/mman.h | 34 +++++++-------- sysdeps/unix/bsd/signum.h | 28 ++++++------- sysdeps/unix/bsd/statbuf.h | 34 +++++++-------- sysdeps/unix/bsd/sun/signum.h | 28 ++++++------- sysdeps/unix/bsd/sun/sunos4/resourcebits.h | 28 ++++++------- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 34 +++++++-------- sysdeps/unix/bsd/sun/sunos4/termbits.h | 34 +++++++-------- sysdeps/unix/bsd/ultrix4/sys/mman.h | 34 +++++++-------- sysdeps/unix/bsd/waitflags.h | 28 ++++++------- sysdeps/unix/sysv/irix4/signum.h | 27 ++++++------ sysdeps/unix/sysv/irix4/statbuf.h | 30 +++++++------- sysdeps/unix/sysv/irix4/sys/mman.h | 34 +++++++-------- sysdeps/unix/sysv/linux/alpha/statbuf.h | 28 ++++++------- sysdeps/unix/sysv/linux/alpha/sys/io.h | 32 +++++++-------- sysdeps/unix/sysv/linux/direntry.h | 32 +++++++-------- sysdeps/unix/sysv/linux/gnu/types.h | 26 ++++++------ sysdeps/unix/sysv/linux/ioctl-types.h | 28 ++++++------- sysdeps/unix/sysv/linux/local_lim.h | 29 +++++++------ sysdeps/unix/sysv/linux/netinet/in.h | 31 +++++++------- sysdeps/unix/sysv/linux/resourcebits.h | 34 +++++++-------- sysdeps/unix/sysv/linux/signum.h | 28 ++++++------- sysdeps/unix/sysv/linux/statbuf.h | 28 ++++++------- sysdeps/unix/sysv/linux/sys/io.h | 32 +++++++-------- sysdeps/unix/sysv/linux/sys/klog.h | 26 ++++++------ sysdeps/unix/sysv/linux/sys/mman.h | 64 ++++++++++++++--------------- sysdeps/unix/sysv/linux/sys/ptrace.h | 34 +++++++-------- sysdeps/unix/sysv/linux/syscall.h | 28 ++++++------- sysdeps/unix/sysv/linux/termbits.h | 28 ++++++------- sysdeps/unix/sysv/linux/waitflags.h | 34 +++++++-------- sysdeps/unix/sysv/local_lim.h | 28 ++++++------- sysdeps/unix/sysv/sco3.2.4/syscall.h | 18 ++++++++ sysdeps/unix/sysv/sco3.2/local_lim.h | 34 +++++++-------- sysdeps/unix/sysv/signum.h | 34 +++++++-------- sysdeps/unix/sysv/statbuf.h | 30 +++++++------- sysdeps/unix/sysv/sysv4/i386/statbuf.h | 27 ++++++------ sysdeps/unix/sysv/sysv4/signum.h | 28 ++++++------- sysdeps/unix/sysv/sysv4/sigset.h | 34 +++++++-------- sysdeps/unix/sysv/sysv4/solaris2/signum.h | 28 ++++++------- sysdeps/unix/sysv/sysv4/solaris2/statbuf.h | 31 +++++++------- sysdeps/unix/sysv/sysv4/waitflags.h | 27 ++++++------ sysdeps/vax/huge_val.h | 29 +++++++------ values.h | 34 +++++++-------- 123 files changed, 1825 insertions(+), 1724 deletions(-) diff --git a/Makerules b/Makerules index d1ac04f2aa..6af4824604 100644 --- a/Makerules +++ b/Makerules @@ -12,9 +12,9 @@ # Library General Public License for more details. # You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. +# License along with the GNU C Library; see the file COPYING.LIB. If not, +# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. # # Common rules for making the GNU C library. This file is included @@ -26,9 +26,10 @@ This makefile requires GNU Make. endif REQUIRED_MAKE_VERSION = 3.74 +REAL_MAKE_VERSION = $(shell echo "$(MAKE_VERSION)" | sed 's/ .*//') ifneq ($(REQUIRED_MAKE_VERSION), \ - $(firstword $(sort $(MAKE_VERSION) $(REQUIRED_MAKE_VERSION)))) + $(firstword $(sort $(REAL_MAKE_VERSION) $(REQUIRED_MAKE_VERSION)))) Wrong GNU Make version. See above for the version needed. endif diff --git a/db/btree/bt_put.c b/db/btree/bt_put.c index 952be09e55..e6241152f3 100644 --- a/db/btree/bt_put.c +++ b/db/btree/bt_put.c @@ -201,7 +201,7 @@ delete: if (__bt_dleaf(t, key, h, index) == RET_ERROR) { * into the offset array, shift the pointers up. */ nbytes = NBLEAFDBT(key->size, data->size); - if (h->upper - h->lower < nbytes + sizeof(indx_t)) { + if ((u_int32_t) (h->upper - h->lower) < nbytes + sizeof(indx_t)) { if ((status = __bt_split(t, h, key, data, dflags, nbytes, index)) != RET_SUCCESS) return (status); @@ -284,7 +284,7 @@ bt_fast(t, key, data, exactp) * have to search to get split stack. */ nbytes = NBLEAFDBT(key->size, data->size); - if (h->upper - h->lower < nbytes + sizeof(indx_t)) + if ((u_int32_t) (h->upper - h->lower) < nbytes + sizeof(indx_t)) goto miss; if (t->bt_order == FORWARD) { diff --git a/db/btree/bt_split.c b/db/btree/bt_split.c index 1646d82159..d01db4ad9d 100644 --- a/db/btree/bt_split.c +++ b/db/btree/bt_split.c @@ -215,7 +215,8 @@ __bt_split(t, sp, key, data, flags, ilen, argskip) } /* Split the parent page if necessary or shift the indices. */ - if (h->upper - h->lower < nbytes + sizeof(indx_t)) { + if ((u_int32_t) (h->upper - h->lower) + < nbytes + sizeof(indx_t)) { sp = h; h = h->pgno == P_ROOT ? bt_root(t, h, &l, &r, &skip, nbytes) : diff --git a/db/hash/hash.c b/db/hash/hash.c index 1f26c7e68a..db6fd69a4b 100644 --- a/db/hash/hash.c +++ b/db/hash/hash.c @@ -157,7 +157,8 @@ __hash_open(file, flags, mode, info, dflags) if (hashp->VERSION != HASHVERSION && hashp->VERSION != OLDHASHVERSION) RETURN_ERROR(EFTYPE, error1); - if (hashp->hash(CHARKEY, sizeof(CHARKEY)) != hashp->H_CHARKEY) + if (hashp->hash(CHARKEY, sizeof(CHARKEY)) + != (u_int32_t) hashp->H_CHARKEY) RETURN_ERROR(EFTYPE, error1); /* * Figure out how many segments we need. Max_Bucket is the @@ -744,7 +745,7 @@ hash_seq(dbp, key, data, flag) for (bp = NULL; !bp || !bp[0]; ) { if (!(bufp = hashp->cpage)) { for (bucket = hashp->cbucket; - bucket <= hashp->MAX_BUCKET; + bucket <= (u_int32_t) hashp->MAX_BUCKET; bucket++, hashp->cndx = 1) { bufp = __get_buf(hashp, bucket, NULL, 0); if (!bufp) @@ -848,7 +849,7 @@ __expand_table(hashp) hashp->OVFL_POINT = spare_ndx; } - if (new_bucket > hashp->HIGH_MASK) { + if (new_bucket > (u_int32_t) hashp->HIGH_MASK) { /* Starting a new doubling */ hashp->LOW_MASK = hashp->HIGH_MASK; hashp->HIGH_MASK = new_bucket | hashp->LOW_MASK; diff --git a/db/hash/hash_bigkey.c b/db/hash/hash_bigkey.c index 578314a645..d2a7dfd597 100644 --- a/db/hash/hash_bigkey.c +++ b/db/hash/hash_bigkey.c @@ -147,7 +147,7 @@ __big_insert(hashp, bufp, key, val) * Here's the hack to make sure that if the data ends on the * same page as the key ends, FREESPACE is at least one. */ - if (space == val_size && val_size == val->size) + if ((int) space == val_size && (size_t) val_size == val->size) move_bytes--; off = OFFSET(p) - move_bytes; memmove(cp + off, val_data, move_bytes); @@ -431,7 +431,7 @@ __big_return(hashp, bufp, ndx, val, set_current) } val->size = collect_data(hashp, bufp, (int)len, set_current); - if (val->size == -1) + if (val->size == (size_t) -1) return (-1); if (save_p->addr != save_addr) { /* We are pretty short on buffers. */ @@ -510,7 +510,7 @@ __big_keydata(hashp, bufp, key, val, set) int set; { key->size = collect_key(hashp, bufp, 0, val, set); - if (key->size == -1) + if (key->size == (size_t) -1) return (-1); key->data = (u_char *)hashp->tmp_key; return (0); diff --git a/db/mpool/mpool.c b/db/mpool/mpool.c index a61041e091..9956aca87b 100644 --- a/db/mpool/mpool.c +++ b/db/mpool/mpool.c @@ -109,7 +109,7 @@ mpool_filter(mp, pgin, pgout, pgcookie) mp->pgout = pgout; mp->pgcookie = pgcookie; } - + /* * mpool_new -- * Get a new page of memory. @@ -205,7 +205,8 @@ mpool_get(mp, pgno, flags) off = mp->pagesize * pgno; if (lseek(mp->fd, off, SEEK_SET) != off) return (NULL); - if ((nr = read(mp->fd, bp->page, mp->pagesize)) != mp->pagesize) { + if ((u_long) (nr = read(mp->fd, bp->page, mp->pagesize)) + != mp->pagesize) { if (nr >= 0) errno = EFTYPE; return (NULL); @@ -380,7 +381,7 @@ mpool_write(mp, bp) off = mp->pagesize * bp->pgno; if (lseek(mp->fd, off, SEEK_SET) != off) return (RET_ERROR); - if (write(mp->fd, bp->page, mp->pagesize) != mp->pagesize) + if ((u_long) write(mp->fd, bp->page, mp->pagesize) != mp->pagesize) return (RET_ERROR); bp->flags &= ~MPOOL_DIRTY; @@ -436,7 +437,7 @@ mpool_stat(mp) mp->pagealloc, mp->pageflush); if (mp->cachehit + mp->cachemiss) (void)fprintf(stderr, - "%.0f%% cache hit rate (%lu hits, %lu misses)\n", + "%.0f%% cache hit rate (%lu hits, %lu misses)\n", ((double)mp->cachehit / (mp->cachehit + mp->cachemiss)) * 100, mp->cachehit, mp->cachemiss); (void)fprintf(stderr, "%lu page reads, %lu page writes\n", @@ -456,7 +457,7 @@ mpool_stat(mp) cnt = 0; } else sep = ", "; - + } (void)fprintf(stderr, "\n"); } diff --git a/db/recno/rec_close.c b/db/recno/rec_close.c index 16fb0b4eca..977493fe5b 100644 --- a/db/recno/rec_close.c +++ b/db/recno/rec_close.c @@ -150,7 +150,7 @@ __rec_sync(dbp, flags) */ status = (dbp->seq)(dbp, &key, &data, R_FIRST); while (status == RET_SUCCESS) { - if (write(t->bt_rfd, data.data, data.size) != data.size) + if ((size_t) write(t->bt_rfd, data.data, data.size) != data.size) return (RET_ERROR); status = (dbp->seq)(dbp, &key, &data, R_NEXT); } @@ -162,7 +162,7 @@ __rec_sync(dbp, flags) while (status == RET_SUCCESS) { iov[0].iov_base = data.data; iov[0].iov_len = data.size; - if (writev(t->bt_rfd, iov, 2) != data.size + 1) + if ((size_t) writev(t->bt_rfd, iov, 2) != data.size + 1) return (RET_ERROR); status = (dbp->seq)(dbp, &key, &data, R_NEXT); } diff --git a/db/recno/rec_put.c b/db/recno/rec_put.c index 1afae0d5a6..5454c40e8d 100644 --- a/db/recno/rec_put.c +++ b/db/recno/rec_put.c @@ -170,7 +170,7 @@ einval: errno = EINVAL; if (flags == R_SETCURSOR) t->bt_cursor.rcursor = nrec; - + F_SET(t, R_MODIFIED); return (__rec_ret(t, NULL, nrec, key, NULL)); } @@ -256,7 +256,7 @@ __rec_iput(t, nrec, data, flags) * the offset array, shift the pointers up. */ nbytes = NRLEAFDBT(data->size); - if (h->upper - h->lower < nbytes + sizeof(indx_t)) { + if ((u_int32_t) (h->upper - h->lower) < nbytes + sizeof(indx_t)) { status = __bt_split(t, h, NULL, data, dflags, nbytes, index); if (status == RET_SUCCESS) ++t->bt_nrecs; diff --git a/dirent/dirent.h b/dirent/dirent.h index 06e92cb6b9..044fc5a16c 100644 --- a/dirent/dirent.h +++ b/dirent/dirent.h @@ -1,20 +1,20 @@ /* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* * POSIX Standard: 5.1.2 Directory Operations @@ -106,15 +106,15 @@ extern DIR *opendir __P ((__const char *__name)); /* Close the directory stream DIRP. Return 0 if successful, -1 if not. */ -extern int __closedir __P ((DIR * __dirp)); -extern int closedir __P ((DIR * __dirp)); +extern int __closedir __P ((DIR *__dirp)); +extern int closedir __P ((DIR *__dirp)); /* Read a directory entry from DIRP. Return a pointer to a `struct dirent' describing the entry, or NULL for EOF or error. The storage returned may be overwritten by a later readdir call on the same DIR stream. */ -extern struct dirent *__readdir __P ((DIR * __dirp)); -extern struct dirent *readdir __P ((DIR * __dirp)); +extern struct dirent *__readdir __P ((DIR *__dirp)); +extern struct dirent *readdir __P ((DIR *__dirp)); #ifdef __USE_REENTRANT /* Reentrant versio of `readdir'. Return in RESULT a pointer to the @@ -124,7 +124,7 @@ extern int readdir_r __P ((DIR *__dirp, struct dirent *entry, #endif /* Rewind DIRP to the beginning of the directory. */ -extern void rewinddir __P ((DIR * __dirp)); +extern void rewinddir __P ((DIR *__dirp)); #if defined(__USE_BSD) || defined(__USE_MISC) @@ -152,10 +152,10 @@ extern int dirfd __P ((DIR *__dirp)); #include /* Seek to position POS on DIRP. */ -extern void seekdir __P ((DIR * __dirp, __off_t __pos)); +extern void seekdir __P ((DIR *__dirp, __off_t __pos)); /* Return the current position of DIRP. */ -extern __off_t telldir __P ((DIR * __dirp)); +extern __off_t telldir __P ((DIR *__dirp)); /* Scan the directory DIR, calling SELECT on each directory entry. Entries for which SELECT returns nonzero are individually malloc'd, diff --git a/elf/elf.h b/elf/elf.h index 0a4ec55cc8..f111508889 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -1,27 +1,29 @@ /* This file defines standard ELF types, structures, and macros. -Copyright (C) 1995, 1996 Free Software Foundation, Inc. -Contributed by Ian Lance Taylor (ian@cygnus.com). + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ian Lance Taylor . -This file is part of the GNU C Library. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _ELF_H + #define _ELF_H 1 +#include +__BEGIN_DECLS /* Standard ELF types. Using __attribute__ mode ensures that GCC will choose the right number of bits for these types. */ @@ -773,5 +775,6 @@ typedef Elf32_Addr Elf32_Conflict; #define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */ #define R_ALPHA_RELATIVE 27 /* Adjust by program base */ +__END_DECLS #endif /* elf.h */ diff --git a/elf/link.h b/elf/link.h index 1e3828afbb..17fea305ed 100644 --- a/elf/link.h +++ b/elf/link.h @@ -1,21 +1,21 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. -Copyright (C) 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _LINK_H #define _LINK_H 1 diff --git a/gmon/sys/gmon_out.h b/gmon/sys/gmon_out.h index ef5b191f3d..c02362ba47 100644 --- a/gmon/sys/gmon_out.h +++ b/gmon/sys/gmon_out.h @@ -1,30 +1,29 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. - Contributed by David Mosberger (davidm@cs.arizona.edu). + This file is part of the GNU C Library. + Contributed by David Mosberger . -This file is part of the GNU C Library. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* This file specifies the format of gmon.out files. It should have -as few external dependencies as possible as it is going to be included -in many different programs. That is, minimize the number of #include's. + as few external dependencies as possible as it is going to be included + in many different programs. That is, minimize the number of #include's. -A gmon.out file consists of a header (defined by gmon_hdr) followed by -a sequence of records. Each record starts with a one-byte tag -identifying the type of records, followed by records specific data. */ + A gmon.out file consists of a header (defined by gmon_hdr) followed by + a sequence of records. Each record starts with a one-byte tag + identifying the type of records, followed by records specific data. */ #ifndef _SYS_GMON_OUT_H_ #define _SYS_GMON_OUT_H_ diff --git a/gnu-versions.h b/gnu-versions.h index e2faba0398..15b07999dd 100644 --- a/gnu-versions.h +++ b/gnu-versions.h @@ -1,21 +1,21 @@ /* Header with interface version macros for library pieces copied elsewhere. -Copyright (C) 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _GNU_VERSIONS_H #define _GNU_VERSIONS_H 1 diff --git a/intl/libintl.h b/intl/libintl.h index dca41df647..34cd5e0d51 100644 --- a/intl/libintl.h +++ b/intl/libintl.h @@ -1,25 +1,25 @@ /* libintl.h -- Message catalogs for internationalization. -Copyright (C) 1995, 1996 Free Software Foundation, Inc. -Contributed by Ulrich Drepper , 1995. -This file is derived from the file libgettext.h in the GNU gettext package. - -This file is part of the GNU C Library. Its master source is NOT part of -the C library, however. The master source lives in /gd/gnu/lib. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + This file is derived from the file libgettext.h in the GNU gettext package. + + This file is part of the GNU C Library. Its master source is NOT part of + the C library, however. The master source lives in /gd/gnu/lib. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _LIBINTL_H diff --git a/io/fcntl.h b/io/fcntl.h index 26d42f315c..4e1b38a58e 100644 --- a/io/fcntl.h +++ b/io/fcntl.h @@ -1,20 +1,20 @@ /* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* * POSIX Standard: 6.5 File Control Operations @@ -59,7 +59,7 @@ extern int open __P ((__const char *__file, int __oflag, ...)); what `mode_t' will be widened to. */ extern int creat __P ((__const char *__file, __mode_t __mode)); -#if defined (__USE_MISC) && !defined (F_LOCK) +#if !defined(F_LOCK) && (defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED)) /* NOTE: These declarations also appear in ; be sure to keep both files consistent. Some systems have them there and some here, and some software depends on the macros being defined without including both. */ diff --git a/io/ftw.h b/io/ftw.h index c7c3a88305..9cc9b4fd18 100644 --- a/io/ftw.h +++ b/io/ftw.h @@ -1,24 +1,24 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by Ian Lance Taylor (ian@airs.com). +/* Copyright (C) 1992, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ian Lance Taylor (ian@airs.com). -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* - * SVID ftw.h + * X/Open Portability Guide 4.2: ftw.h */ #ifndef _FTW_H diff --git a/io/sys/statfs.h b/io/sys/statfs.h index 84ff1f9188..4871e50723 100644 --- a/io/sys/statfs.h +++ b/io/sys/statfs.h @@ -1,21 +1,21 @@ /* Definitions for getting information about a filesystem. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SYS_STATFS_H diff --git a/io/utime.h b/io/utime.h index 5d22cf8708..003e64778a 100644 --- a/io/utime.h +++ b/io/utime.h @@ -1,20 +1,20 @@ /* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* * POSIX Standard: 5.6.6 Set File Access and Modification Times diff --git a/locale/langinfo.h b/locale/langinfo.h index 4df8df7a45..81696479e5 100644 --- a/locale/langinfo.h +++ b/locale/langinfo.h @@ -1,21 +1,21 @@ /* nl_langinfo -- Access to locale-dependent parameters. -Copyright (C) 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _LANGINFO_H #define _LANGINFO_H 1 diff --git a/manual/examples/rprintf.c b/manual/examples/rprintf.c index eff1d8e7cf..723b3a3ef0 100644 --- a/manual/examples/rprintf.c +++ b/manual/examples/rprintf.c @@ -9,7 +9,7 @@ typedef struct } Widget; /*@end group*/ -int +int print_widget (FILE *stream, const struct printf_info *info, va_list *app) { Widget *w; @@ -33,6 +33,18 @@ print_widget (FILE *stream, const struct printf_info *info, va_list *app) } +int +print_widget_arginfo (const struct printf_info *info, size_t n, + int *argtypes) +{ + /* We always take exactly one argument and this is a pointer to the + structure.. */ + if (n > 0) + argtypes[0] = PA_POINTER; + return 1; +} + + int main (void) { @@ -41,7 +53,7 @@ main (void) mywidget.name = "mywidget"; /* Register the print function for widgets. */ - register_printf_function ('W', print_widget, NULL); /* No arginfo. */ + register_printf_function ('W', print_widget, print_widget_arginfo); /* Now print the widget. */ printf ("|%W|\n", &mywidget); diff --git a/manual/stdio.texi b/manual/stdio.texi index c666f5e7db..e6e5614930 100644 --- a/manual/stdio.texi +++ b/manual/stdio.texi @@ -1943,9 +1943,19 @@ The @var{arginfo-function} is the function called by template string. @xref{Parsing a Template String}, for information about this. -Normally, you install both functions for a conversion at the same time, -but if you are never going to call @code{parse_printf_format}, you do -not need to define an arginfo function. +@c The following is not true anymore. The `parse_printf_format' function +@c is now also called from `vfprintf' via `parse_one_spec'. +@c --drepper@gnu, 1996/11/14 +@c +@c Normally, you install both functions for a conversion at the same time, +@c but if you are never going to call @code{parse_printf_format}, you do +@c not need to define an arginfo function. + +@strong{Attention:} In the GNU C library version before 2.0 the +@var{arginfo-function} function did not need to be installed unless +the user uses the @code{parse_printf_format} function. This changed. +Now a call to any of the @code{printf} functions will call this +function when this format specifier appears in the format string. The return value is @code{0} on success, and @code{-1} on failure (which occurs if @var{spec} is out of range). @@ -1995,7 +2005,7 @@ actual value retrieved from the argument list. But the structure passed to the arginfo function contains a value of @code{INT_MIN}, since the actual value is not known. -@item char spec +@item wchar_t spec This is the conversion specifier character specified. It's stored in the structure so that you can register the same handler function for multiple characters, but still have a way to tell them apart when the @@ -2028,7 +2038,13 @@ This is a boolean that is true if the @samp{+} flag was specified. @item unsigned int group This is a boolean that is true if the @samp{'} flag was specified. -@item char pad +@item unsigned int extra +This flag has a special meaning depending on the context. It could +be used freely by the user-defined handlers but when called from +the @code{printf} function this variable always contains the value +@code{0}. + +@item wchar_t pad This is the character to use for padding the output to the minimum field width. The value is @code{'0'} if the @samp{0} flag was specified, and @code{' '} otherwise. @@ -2042,32 +2058,42 @@ width. The value is @code{'0'} if the @samp{0} flag was specified, and Now let's look at how to define the handler and arginfo functions which are passed as arguments to @code{register_printf_function}. +@strong{Compatibility Note:} The interface change in the GNU libc +version 2.0. Previously the third argument was of type +@code{va_list *}. + You should define your handler functions with a prototype like: @smallexample int @var{function} (FILE *stream, const struct printf_info *info, - va_list *ap_pointer) + const void *const *args) @end smallexample -The @code{stream} argument passed to the handler function is the stream to +The @var{stream} argument passed to the handler function is the stream to which it should write output. -The @code{info} argument is a pointer to a structure that contains +The @var{info} argument is a pointer to a structure that contains information about the various options that were included with the conversion in the template string. You should not modify this structure inside your handler function. @xref{Conversion Specifier Options}, for a description of this data structure. -The @code{ap_pointer} argument is used to pass the tail of the variable -argument list containing the values to be printed to your handler. -Unlike most other functions that can be passed an explicit variable -argument list, this is a @emph{pointer} to a @code{va_list}, rather than -the @code{va_list} itself. Thus, you should fetch arguments by -means of @code{va_arg (*ap_pointer, @var{type})}. - -(Passing a pointer here allows the function that calls your handler -function to update its own @code{va_list} variable to account for the -arguments that your handler processes. @xref{Variadic Functions}.) +@c The following changes some time back. --drepper@gnu, 1996/11/14 +@c +@c The @code{ap_pointer} argument is used to pass the tail of the variable +@c argument list containing the values to be printed to your handler. +@c Unlike most other functions that can be passed an explicit variable +@c argument list, this is a @emph{pointer} to a @code{va_list}, rather than +@c the @code{va_list} itself. Thus, you should fetch arguments by +@c means of @code{va_arg (*ap_pointer, @var{type})}. +@c +@c (Passing a pointer here allows the function that calls your handler +@c function to update its own @code{va_list} variable to account for the +@c arguments that your handler processes. @xref{Variadic Functions}.) + +The @var{args} is a vector of pointers to the arguments data. +The number of arguments were determined by calling the argument +information function provided by the user. Your handler function should return a value just like @code{printf} does: it should return the number of characters it has written, or a @@ -2080,11 +2106,11 @@ This is the data type that a handler function should have. @end deftp If you are going to use @w{@code{parse_printf_format}} in your -application, you should also define a function to pass as the +application, you must also define a function to pass as the @var{arginfo-function} argument for each new conversion you install with @code{register_printf_function}. -You should define these functions with a prototype like: +You have to define these functions with a prototype like: @smallexample int @var{function} (const struct printf_info *info, diff --git a/misc/ar.h b/misc/ar.h index 80d0144edf..5e131f2586 100644 --- a/misc/ar.h +++ b/misc/ar.h @@ -1,24 +1,26 @@ /* Header describing `ar' archive file format. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _AR_H + #define _AR_H 1 +#include /* Archive files start with the ARMAG identifying string. Then follows a `struct ar_hdr', and as many bytes of member file data as its `ar_size' @@ -29,6 +31,8 @@ Cambridge, MA 02139, USA. */ #define ARFMAG "`\n" /* String in ar_fmag at end of each header. */ +__BEGIN_DECLS + struct ar_hdr { char ar_name[16]; /* Member file name, sometimes / terminated. */ @@ -39,4 +43,6 @@ struct ar_hdr char ar_fmag[2]; /* Always contains ARFMAG. */ }; +__END_DECLS + #endif /* ar.h */ diff --git a/misc/error.h b/misc/error.h index 95ceb1aa82..34d58c11b2 100644 --- a/misc/error.h +++ b/misc/error.h @@ -1,23 +1,23 @@ /* error.h -- declaration for error-reporting function - Copyright (C) 1995, 1996 Software Foundation, Inc. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. Its master source is NOT part of -the C library, however. The master source lives in /gd/gnu/lib. + This file is part of the GNU C Library. Its master source is NOT part of + the C library, however. The master source lives in /gd/gnu/lib. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _error_h_ #define _error_h_ @@ -35,6 +35,10 @@ Cambridge, MA 02139, USA. */ # endif #endif +#ifdef __cplusplus +extern "C" { +#endif + #if defined (__STDC__) && __STDC__ /* Print a message with `fprintf (stderr, FORMAT, ...)'; @@ -66,4 +70,8 @@ extern unsigned int error_message_count; variable controls whether this mode is selected or not. */ extern int error_one_per_line; +#ifdef __cplusplus +} +#endif + #endif /* _error_h_ */ diff --git a/misc/mntent.h b/misc/mntent.h index bfa1dee797..4a4fbfc23e 100644 --- a/misc/mntent.h +++ b/misc/mntent.h @@ -1,21 +1,21 @@ /* -- Utilities for reading/writing fstab, mtab, etc. -Copyright (C) 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _MNTENT_H #define _MNTENT_H 1 diff --git a/misc/sgtty.h b/misc/sgtty.h index 29acb59292..c232dfc823 100644 --- a/misc/sgtty.h +++ b/misc/sgtty.h @@ -1,20 +1,20 @@ /* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SGTTY_H #define _SGTYY_H 1 @@ -29,10 +29,10 @@ struct sgttyb; __BEGIN_DECLS /* Fill in *PARAMS with terminal parameters associated with FD. */ -extern int gtty __P ((int __fd, struct sgttyb * __params)); +extern int gtty __P ((int __fd, struct sgttyb *__params)); /* Set the terminal parameters associated with FD to *PARAMS. */ -extern int stty __P ((int __fd, __const struct sgttyb * __params)); +extern int stty __P ((int __fd, __const struct sgttyb *__params)); __END_DECLS diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 983526a075..b4a2fd285d 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -1,20 +1,20 @@ /* Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SYS_CDEFS_H diff --git a/misc/sys/dir.h b/misc/sys/dir.h index cd78d5d313..a6384e6cc6 100644 --- a/misc/sys/dir.h +++ b/misc/sys/dir.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* Copyright (C) 1991, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SYS_DIR_H diff --git a/misc/sys/file.h b/misc/sys/file.h index 9cb3e6442e..4120882476 100644 --- a/misc/sys/file.h +++ b/misc/sys/file.h @@ -1,20 +1,20 @@ /* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SYS_FILE_H diff --git a/misc/sys/ioctl.h b/misc/sys/ioctl.h index 4e187c0c85..4e940bd29f 100644 --- a/misc/sys/ioctl.h +++ b/misc/sys/ioctl.h @@ -1,20 +1,20 @@ /* Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _SYS_IOCTL_H diff --git a/misc