From b2637a22dbfe8a4c790f378d339e12d78fd3f43f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Jan 2004 18:41:22 +0000 Subject: Update. 2004-01-14 Ulrich Drepper * libio/libio.h: Add const to function tables types. * libio/libioP.h: Likewise. * /login/utmp-private.h: Likewise. * libio/fileops.c: Add const to jump table variable definition. * libio/genops.c: Likewise. * libio/iofopncook.c: Likewise. * libio/iopopen.c: Likewise. * libio/memstream.c: Likewise. * libio/obprintf.c: Likewise. * libio/oldfileops.c: Likewise. * libio/oldiopopen.c: Likewise. * libio/strops.c: Likewise. * libio/vsnprintf.c: Likewise. * libio/vswprintf.c: Likewise. * libio/wfileops.c: Likewise. * libio/wstrops.c: Likewise. * login/getutent_r.c: Likewise. * login/getutid_r.c Likewise. * login/getutline_r.c: Likewise. * sysdeps/generic/utmp_file.c: Likewise. --- libio/fileops.c | 8 ++++---- libio/genops.c | 4 ++-- libio/iofopncook.c | 6 +++--- libio/iopopen.c | 10 +++++----- libio/libio.h | 4 ++-- libio/libioP.h | 26 +++++++++++++------------- libio/memstream.c | 4 ++-- libio/obprintf.c | 4 ++-- libio/oldfileops.c | 4 ++-- libio/oldiopopen.c | 4 ++-- libio/strops.c | 4 ++-- libio/vsnprintf.c | 4 ++-- libio/vswprintf.c | 4 ++-- libio/wfileops.c | 8 ++++---- libio/wstrops.c | 6 +++--- 15 files changed, 50 insertions(+), 50 deletions(-) (limited to 'libio') diff --git a/libio/fileops.c b/libio/fileops.c index e6a9395ffd..ca25c98ad0 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997-2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -1579,7 +1579,7 @@ versioned_symbol (libc, _IO_new_file_write, _IO_file_write, GLIBC_2_1); versioned_symbol (libc, _IO_new_file_xsputn, _IO_file_xsputn, GLIBC_2_1); #endif -struct _IO_jump_t _IO_file_jumps = +const struct _IO_jump_t _IO_file_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, INTUSE(_IO_file_finish)), @@ -1604,7 +1604,7 @@ struct _IO_jump_t _IO_file_jumps = }; libc_hidden_data_def (_IO_file_jumps) -struct _IO_jump_t _IO_file_jumps_mmap = +const struct _IO_jump_t _IO_file_jumps_mmap = { JUMP_INIT_DUMMY, JUMP_INIT(finish, INTUSE(_IO_file_finish)), @@ -1628,7 +1628,7 @@ struct _IO_jump_t _IO_file_jumps_mmap = JUMP_INIT(imbue, _IO_default_imbue) }; -struct _IO_jump_t _IO_file_jumps_maybe_mmap = +const struct _IO_jump_t _IO_file_jumps_maybe_mmap = { JUMP_INIT_DUMMY, JUMP_INIT(finish, INTUSE(_IO_file_finish)), diff --git a/libio/genops.c b/libio/genops.c index 88877ad3f0..58dac005d8 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1995,1997-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1997-2002, 2003, 2004 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 @@ -638,7 +638,7 @@ _IO_no_init (fp, flags, orientation, wd, jmp) int flags; int orientation; struct _IO_wide_data *wd; - struct _IO_jump_t *jmp; + const struct _IO_jump_t *jmp; { _IO_old_init (fp, flags); fp->_mode = orientation; diff --git a/libio/iofopncook.c b/libio/iofopncook.c index b35b56d24b..eb5df886f9 100644 --- a/libio/iofopncook.c +++ b/libio/iofopncook.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,95,97,99,2000,2002 Free Software Foundation, Inc. +/* Copyright (C) 1993,95,97,99,2000,2002,2004 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 @@ -94,7 +94,7 @@ _IO_cookie_close (fp) } -static struct _IO_jump_t _IO_cookie_jumps = { +static const struct _IO_jump_t _IO_cookie_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, INTUSE(_IO_file_finish)), JUMP_INIT(overflow, INTUSE(_IO_file_overflow)), @@ -213,7 +213,7 @@ _IO_old_cookie_seek (fp, offset, dir) return (ret == -1) ? _IO_pos_BAD : ret; } -static struct _IO_jump_t _IO_old_cookie_jumps = { +static const struct _IO_jump_t _IO_old_cookie_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, INTUSE(_IO_file_finish)), JUMP_INIT(overflow, INTUSE(_IO_file_overflow)), diff --git a/libio/iopopen.c b/libio/iopopen.c index 63094389d7..30d804252f 100644 --- a/libio/iopopen.c +++ b/libio/iopopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997-2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -105,8 +105,8 @@ struct _IO_proc_file }; typedef struct _IO_proc_file _IO_proc_file; -static struct _IO_jump_t _IO_proc_jumps; -static struct _IO_jump_t _IO_wproc_jumps; +static const struct _IO_jump_t _IO_proc_jumps; +static const struct _IO_jump_t _IO_wproc_jumps; static struct _IO_proc_file *proc_file_chain; @@ -286,7 +286,7 @@ _IO_new_proc_close (fp) #endif } -static struct _IO_jump_t _IO_proc_jumps = { +static const struct _IO_jump_t _IO_proc_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_new_file_finish), JUMP_INIT(overflow, _IO_new_file_overflow), @@ -309,7 +309,7 @@ static struct _IO_jump_t _IO_proc_jumps = { JUMP_INIT(imbue, _IO_default_imbue) }; -static struct _IO_jump_t _IO_wproc_jumps = { +static const struct _IO_jump_t _IO_wproc_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_new_file_finish), JUMP_INIT(overflow, _IO_new_file_overflow), diff --git a/libio/libio.h b/libio/libio.h index e7d7bae2b5..1672f7b54f 100644 --- a/libio/libio.h +++ b/libio/libio.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1995, 1997-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1991-1995, 1997-2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -257,7 +257,7 @@ struct _IO_wide_data wchar_t _shortbuf[1]; - struct _IO_jump_t *_wide_vtable; + const struct _IO_jump_t *_wide_vtable; }; #endif diff --git a/libio/libioP.h b/libio/libioP.h index 3973b03cbd..5bfaaeb9fc 100644 --- a/libio/libioP.h +++ b/libio/libioP.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997-2003, 2004 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 @@ -462,19 +462,19 @@ extern int _IO_default_sync __P ((_IO_FILE *)); extern int _IO_default_showmanyc __P ((_IO_FILE *)); extern void _IO_default_imbue __P ((_IO_FILE *, void *)); -extern struct _IO_jump_t _IO_file_jumps; +extern const struct _IO_jump_t _IO_file_jumps; libc_hidden_proto (_IO_file_jumps) -extern struct _IO_jump_t _IO_file_jumps_mmap attribute_hidden; -extern struct _IO_jump_t _IO_file_jumps_maybe_mmap attribute_hidden; -extern struct _IO_jump_t _IO_wfile_jumps; +extern const struct _IO_jump_t _IO_file_jumps_mmap attribute_hidden; +extern const struct _IO_jump_t _IO_file_jumps_maybe_mmap attribute_hidden; +extern const struct _IO_jump_t _IO_wfile_jumps; libc_hidden_proto (_IO_wfile_jumps) -extern struct _IO_jump_t _IO_wfile_jumps_mmap attribute_hidden; -extern struct _IO_jump_t _IO_wfile_jumps_maybe_mmap attribute_hidden; -extern struct _IO_jump_t _IO_old_file_jumps attribute_hidden; -extern struct _IO_jump_t _IO_streambuf_jumps; -extern struct _IO_jump_t _IO_old_proc_jumps attribute_hidden; -extern struct _IO_jump_t _IO_str_jumps attribute_hidden; -extern struct _IO_jump_t _IO_wstr_jumps attribute_hidden; +extern const struct _IO_jump_t _IO_wfile_jumps_mmap attribute_hidden; +extern const struct _IO_jump_t _IO_wfile_jumps_maybe_mmap attribute_hidden; +extern const struct _IO_jump_t _IO_old_file_jumps attribute_hidden; +extern const struct _IO_jump_t _IO_streambuf_jumps; +extern const struct _IO_jump_t _IO_old_proc_jumps attribute_hidden; +extern const struct _IO_jump_t _IO_str_jumps attribute_hidden; +extern const struct _IO_jump_t _IO_wstr_jumps attribute_hidden; extern struct _IO_codecvt __libio_codecvt attribute_hidden; extern int _IO_do_write __P ((_IO_FILE *, const char *, _IO_size_t)); extern int _IO_new_do_write __P ((_IO_FILE *, const char *, _IO_size_t)); @@ -572,7 +572,7 @@ extern void _IO_new_file_finish __P ((_IO_FILE *, int)); extern _IO_FILE* _IO_new_file_fopen __P ((_IO_FILE *, const char *, const char *, int)); extern void _IO_no_init __P ((_IO_FILE *, int, int, struct _IO_wide_data *, - struct _IO_jump_t *)); + const struct _IO_jump_t *)); extern void _IO_new_file_init __P ((struct _IO_FILE_plus *)); extern _IO_FILE* _IO_new_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t)); extern _IO_FILE* _IO_file_setbuf_mmap __P ((_IO_FILE *, char *, _IO_ssize_t)); diff --git a/libio/memstream.c b/libio/memstream.c index 67a15584cc..8519832f34 100644 --- a/libio/memstream.c +++ b/libio/memstream.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1997,1999,2000,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1995-97,99,2000,2002,2003,2004 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 @@ -34,7 +34,7 @@ static int _IO_mem_sync __P ((_IO_FILE* fp)); static void _IO_mem_finish __P ((_IO_FILE* fp, int)); -static struct _IO_jump_t _IO_mem_jumps = +static const struct _IO_jump_t _IO_mem_jumps = { JUMP_INIT_DUMMY, JUMP_INIT (finish, _IO_mem_finish), diff --git a/libio/obprintf.c b/libio/obprintf.c index 97b5defc35..19300e80a3 100644 --- a/libio/obprintf.c +++ b/libio/obprintf.c @@ -1,5 +1,5 @@ /* Print output of stream to given obstack. - Copyright (C) 1996,1997,1999-2003 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1999-2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -93,7 +93,7 @@ _IO_obstack_xsputn (_IO_FILE *fp, const void *data, _IO_size_t n) /* the jump table. */ -static struct _IO_jump_t _IO_obstack_jumps = +static const struct _IO_jump_t _IO_obstack_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, NULL), diff --git a/libio/oldfileops.c b/libio/oldfileops.c index e1cc1bda41..a397a322d3 100644 --- a/libio/oldfileops.c +++ b/libio/oldfileops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,95,97,98,99,2000,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997-2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -764,7 +764,7 @@ _IO_old_file_xsputn (f, data, n) } -struct _IO_jump_t _IO_old_file_jumps = +const struct _IO_jump_t _IO_old_file_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_old_file_finish), diff --git a/libio/oldiopopen.c b/libio/oldiopopen.c index 01e8efed08..bd84b752d3 100644 --- a/libio/oldiopopen.c +++ b/libio/oldiopopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998-2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -284,7 +284,7 @@ _IO_old_proc_close (fp) #endif } -struct _IO_jump_t _IO_old_proc_jumps = { +const struct _IO_jump_t _IO_old_proc_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_old_file_finish), JUMP_INIT(overflow, _IO_old_file_overflow), diff --git a/libio/strops.c b/libio/strops.c index 8e5ec6d4e9..2de83403a2 100644 --- a/libio/strops.c +++ b/libio/strops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997-2003 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997-2003, 2004 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 @@ -305,7 +305,7 @@ _IO_str_finish (fp, dummy) INTUSE(_IO_default_finish) (fp, 0); } -struct _IO_jump_t _IO_str_jumps = +const struct _IO_jump_t _IO_str_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_str_finish), diff --git a/libio/vsnprintf.c b/libio/vsnprintf.c index 3057082ea4..e5920438fa 100644 --- a/libio/vsnprintf.c +++ b/libio/vsnprintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994,1997,1999-2003 Free Software Foundation, Inc. +/* Copyright (C) 1994,1997,1999-2003, 2004 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 @@ -77,7 +77,7 @@ _IO_strn_overflow (fp, c) } -static struct _IO_jump_t _IO_strn_jumps = +static const struct _IO_jump_t _IO_strn_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_str_finish), diff --git a/libio/vswprintf.c b/libio/vswprintf.c index 3ec44d1463..0fa9f68873 100644 --- a/libio/vswprintf.c +++ b/libio/vswprintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994,1997,1999,2000,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1994,1997,1999-2002,2004 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 @@ -75,7 +75,7 @@ _IO_wstrn_overflow (fp, c) } -static struct _IO_jump_t _IO_wstrn_jumps = +static const struct _IO_jump_t _IO_wstrn_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_wstr_finish), diff --git a/libio/wfileops.c b/libio/wfileops.c index aa4daa905e..5f9faac223 100644 --- a/libio/wfileops.c +++ b/libio/wfileops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,95,97,98,99,2000,2001,2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1997-2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper . Based on the single byte version by Per Bothner . @@ -854,7 +854,7 @@ _IO_wfile_xsputn (f, data, n) INTDEF(_IO_wfile_xsputn) -struct _IO_jump_t _IO_wfile_jumps = +const struct _IO_jump_t _IO_wfile_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_new_file_finish), @@ -880,7 +880,7 @@ struct _IO_jump_t _IO_wfile_jumps = libc_hidden_data_def (_IO_wfile_jumps) -struct _IO_jump_t _IO_wfile_jumps_mmap = +const struct _IO_jump_t _IO_wfile_jumps_mmap = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_new_file_finish), @@ -904,7 +904,7 @@ struct _IO_jump_t _IO_wfile_jumps_mmap = JUMP_INIT(imbue, _IO_default_imbue) }; -struct _IO_jump_t _IO_wfile_jumps_maybe_mmap = +const struct _IO_jump_t _IO_wfile_jumps_maybe_mmap = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_new_file_finish), diff --git a/libio/wstrops.c b/libio/wstrops.c index b180a8f9b6..32f7ef3cf7 100644 --- a/libio/wstrops.c +++ b/libio/wstrops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1997-1999,2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 1993,1997-1999,2001-2003,2004 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 @@ -71,7 +71,7 @@ _IO_wstr_init_static (fp, ptr, size, pstart) wchar_t *pstart; { wchar_t *end; - + if (size == 0) end = ptr + __wcslen (ptr); else if ((_IO_size_t) ptr + size * sizeof (wchar_t) > (_IO_size_t) ptr) @@ -290,7 +290,7 @@ _IO_wstr_finish (fp, dummy) INTUSE(_IO_wdefault_finish) (fp, 0); } -struct _IO_jump_t _IO_wstr_jumps = +const struct _IO_jump_t _IO_wstr_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_wstr_finish), -- cgit 1.4.1