FreeBSD port (38): avoid warnings in linuxthreads
Bruno Haible
bruno@clisp.org
Thu Sep 5 05:08:00 GMT 2002
When building with --enable-all-warnings, I get these warnings:
errno.c:24: warning: function declaration isn't a prototype
errno.c:37: warning: function declaration isn't a prototype
This fixes it.
linuxthreads/ChangeLog:
2002-09-04 Bruno Haible <bruno@clisp.org>
* errno.c (__errno_location, __h_errno_location, __res_state): Use
prototype function declaration.
diff -r -c3 glibc-20020828.bak/linuxthreads/errno.c glibc-20020828/linuxthreads/errno.c
*** glibc-20020828.bak/linuxthreads/errno.c Mon Aug 5 13:24:34 2002
--- glibc-20020828/linuxthreads/errno.c Fri Aug 30 11:13:53 2002
***************
*** 23,42 ****
#if !USE_TLS || !HAVE___THREAD
/* The definition in libc is sufficient if we use TLS. */
! int * __errno_location()
{
pthread_descr self = thread_self();
return THREAD_GETMEM (self, p_errnop);
}
! int * __h_errno_location()
{
pthread_descr self = thread_self();
return THREAD_GETMEM (self, p_h_errnop);
}
/* Return thread specific resolver state. */
! struct __res_state * __res_state()
{
pthread_descr self = thread_self();
return THREAD_GETMEM (self, p_resp);
--- 23,45 ----
#if !USE_TLS || !HAVE___THREAD
/* The definition in libc is sufficient if we use TLS. */
! int *
! __errno_location (void)
{
pthread_descr self = thread_self();
return THREAD_GETMEM (self, p_errnop);
}
! int *
! __h_errno_location (void)
{
pthread_descr self = thread_self();
return THREAD_GETMEM (self, p_h_errnop);
}
/* Return thread specific resolver state. */
! struct __res_state *
! __res_state (void)
{
pthread_descr self = thread_self();
return THREAD_GETMEM (self, p_resp);
More information about the Libc-alpha
mailing list