This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix a number of warnings


Ulrich Drepper <drepper@redhat.com> writes:

> On Sun, 2002-03-03 at 06:49, Andreas Jaeger wrote:
>
>> Ok to commit?
>
> Yes.  But...

I'll add it together with some other patches (complete patchset
appended) - but without the linuxthreads patch.  That one didn't solve
all the issues, I need some more time to decide what's the right thing
to do.

>> 	* linuxthreads_db/thread_dbP.h: Include <unistd.h> for prototypes
>> 	of __libc_write.
>
> linuxthread_db also has its own ChangeLog file.

Ok,

Andreas

2002-03-03  Andreas Jaeger  <aj@suse.de>

	* elf/nodlopenmod2.c: Provide prototype to avoid warning.

	* posix/regcomp.c: Get regex.h from include for internal prototypes.

	* sysdeps/unix/sysv/linux/init-first.c: Move __init_misc prototype
	to libc-internal.h and include it.

	* misc/init-misc.c: Include libc-internal.h for prototypes.

	* sysdeps/wordsize-32/divdi3.c: Add prototypes to avoid warnings.

	* misc/error.c [_LIBC]: Include libioP.h for prototype of
	_IO_putc_internal.

For linuxthreads_db:
	* thread_dbP.h: Include <unistd.h> for prototypes
	of __libc_write.

For linuxthreads:
	* errno.c: Include resolv.h.

============================================================
Index: elf/nodlopenmod2.c
--- elf/nodlopenmod2.c	10 Feb 2002 22:30:55 -0000	1.1
+++ elf/nodlopenmod2.c	3 Mar 2002 17:08:09 -0000
@@ -1,5 +1,7 @@
 extern int a;
 
+extern int foo (void);
+
 int
 foo (void)
 {
============================================================
Index: elf/tst-tlsmod1.c
--- elf/tst-tlsmod1.c	14 Feb 2002 07:50:30 -0000	1.3
+++ elf/tst-tlsmod1.c	3 Mar 2002 16:37:20 -0000
@@ -12,6 +12,7 @@ VAR_INT_DEF(bar);
 VAR_INT_DECL(baz);
 #endif
 
+extern int in_dso (void);
 
 int
 in_dso (void)
============================================================
Index: include/libc-internal.h
--- include/libc-internal.h	23 Apr 2001 18:46:25 -0000	1.4
+++ include/libc-internal.h	3 Mar 2002 15:53:54 -0000
@@ -26,4 +26,7 @@ extern hp_timing_t __get_clockfreq (void
 /* Free all allocated resources.  */
 extern void __libc_freeres (void);
 
+/* Define and initialize `__progname' et. al.  */
+extern void __init_misc (int, char **, char **);
+
 #endif /* _LIBC_INTERNAL  */
============================================================
Index: linuxthreads/errno.c
--- linuxthreads/errno.c	4 Dec 1999 17:58:58 -0000	1.3
+++ linuxthreads/errno.c	3 Mar 2002 16:27:33 -0000
@@ -16,6 +16,7 @@
 
 #include <errno.h>
 #include <netdb.h>
+#include <resolv.h>
 #include "pthread.h"
 #include "internals.h"
 
============================================================
Index: linuxthreads_db/thread_dbP.h
--- linuxthreads_db/thread_dbP.h	5 Feb 2002 00:50:51 -0000	1.10
+++ linuxthreads_db/thread_dbP.h	3 Mar 2002 14:06:01 -0000
@@ -3,6 +3,7 @@
 #define _THREAD_DBP_H	1
 
 #include <string.h>
+#include <unistd.h>
 #include "proc_service.h"
 #include "thread_db.h"
 #include "../linuxthreads/descr.h"
============================================================
Index: misc/error.c
--- misc/error.c	26 Feb 2002 01:43:53 -0000	1.29
+++ misc/error.c	3 Mar 2002 14:06:01 -0000
@@ -74,6 +74,7 @@ unsigned int error_message_count;
 
 # define program_name program_invocation_name
 # include <errno.h>
+# include <libio/libioP.h>
 
 /* In GNU libc we want do not want to use the common name `error' directly.
    Instead make it a weak alias.  */
============================================================
Index: misc/init-misc.c
--- misc/init-misc.c	23 Feb 2002 08:46:24 -0000	1.11
+++ misc/init-misc.c	3 Mar 2002 15:52:34 -0000
@@ -18,6 +18,7 @@
    02111-1307 USA.  */
 
 #include <string.h>
+#include <libc-internal.h>
 
 char *__progname_full = (char *) "";
 char *__progname = (char *) "";
============================================================
Index: posix/regcomp.c
--- posix/regcomp.c	3 Mar 2002 18:17:58 -0000	1.3
+++ posix/regcomp.c	3 Mar 2002 19:27:16 -0000
@@ -54,7 +54,7 @@
 # define gettext_noop(String) String
 #endif
 
-#include "regex.h"
+#include <regex.h>
 #include "regex_internal.h"
 
 static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
============================================================
Index: sysdeps/unix/sysv/linux/init-first.c
--- sysdeps/unix/sysv/linux/init-first.c	24 Feb 2002 08:27:39 -0000	1.41
+++ sysdeps/unix/sysv/linux/init-first.c	3 Mar 2002 15:53:08 -0000
@@ -33,8 +33,6 @@
 # include "dl-osinfo.h"
 #endif
 
-extern void __init_misc (int, char **, char **);
-
 /* The function is called from assembly stubs the compiler can't see.  */
 static void init (int, char **, char **) __attribute__ ((unused));
 
============================================================
Index: sysdeps/wordsize-32/divdi3.c
--- sysdeps/wordsize-32/divdi3.c	28 Feb 2002 19:36:29 -0000	1.1
+++ sysdeps/wordsize-32/divdi3.c	3 Mar 2002 14:06:01 -0000
@@ -50,6 +50,12 @@ struct DWstruct { Wtype low, high;};
 #endif
 typedef union { struct DWstruct s; DWtype ll; } DWunion;
 
+/* Prototypes of exported functions.  */
+extern DWtype __divdi3 (DWtype u, DWtype v);
+extern DWtype __moddi3 (DWtype u, DWtype v);
+extern UDWtype __udivdi3 (UDWtype u, UDWtype v);
+extern UDWtype __umoddi3 (UDWtype u, UDWtype v);
+
 static UDWtype
 __udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp)
 {

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]