bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnulib] references to POSIX


From: Bruno Haible
Subject: [bug-gnulib] references to POSIX
Date: Fri, 27 May 2005 14:47:28 +0200
User-agent: KMail/1.5

Hi,

For those modules which implement some functionality specified by POSIX,
I propose to add a reference to the POSIX spec as an URL. This is a handy
reference.

See attached patch. Files affected:
  getaddrinfo.h  (Simon Josefsson)
  getcwd.h       (all)
  inet_ntop.h    (Yoann Vandoorselaere)
  time_r.h       (Paul Eggert)

Is this OK to commit?

Bruno


diff -c -3 -r1.3 getaddrinfo.h
*** getaddrinfo.h       14 May 2005 06:03:58 -0000      1.3
--- getaddrinfo.h       27 May 2005 12:43:19 -0000
***************
*** 72,87 ****
  # endif
  
  /* Translate name of a service location and/or a service name to set of
!    socket addresses.  */
  extern int getaddrinfo (const char *restrict nodename,
                        const char *restrict servname,
                        const struct addrinfo *restrict hints,
                        struct addrinfo **restrict res);
  
! /* Free `addrinfo' structure AI including associated storage.  */
  extern void freeaddrinfo (struct addrinfo *ai);
  
! /* Convert error return from getaddrinfo() to a string.  */
  extern const char *gai_strerror (int ecode);
  
  # endif
--- 72,93 ----
  # endif
  
  /* Translate name of a service location and/or a service name to set of
!    socket addresses.
!    For more details, see the POSIX:2001 specification
!    
<http://www.opengroup.org/onlinepubs/009695399/functions/getaddrinfo.html>.  */
  extern int getaddrinfo (const char *restrict nodename,
                        const char *restrict servname,
                        const struct addrinfo *restrict hints,
                        struct addrinfo **restrict res);
  
! /* Free `addrinfo' structure AI including associated storage.
!    For more details, see the POSIX:2001 specification
!    
<http://www.opengroup.org/onlinepubs/009695399/functions/getaddrinfo.html>.  */
  extern void freeaddrinfo (struct addrinfo *ai);
  
! /* Convert error return from getaddrinfo() to a string.
!    For more details, see the POSIX:2001 specification
!    
<http://www.opengroup.org/onlinepubs/009695399/functions/gai_strerror.html>.  */
  extern const char *gai_strerror (int ecode);
  
  # endif
diff -c -3 -r1.2 getcwd.h
*** getcwd.h    14 May 2005 06:03:58 -0000      1.2
--- getcwd.h    27 May 2005 12:43:19 -0000
***************
*** 1,6 ****
  /* Get the working directory, compatibly with the GNU C Library.
  
!    Copyright (C) 2004 Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,6 ----
  /* Get the working directory, compatibly with the GNU C Library.
  
!    Copyright (C) 2004-2005 Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
***************
*** 36,40 ****
--- 36,42 ----
  # define __GETCWD_XCONCAT(x, y) __GETCWD_CONCAT (x, y)
  # define __GETCWD_ID(y) __GETCWD_XCONCAT (__GETCWD_PREFIX, y)
  # define getcwd __GETCWD_ID (getcwd)
+ /* See the POSIX:2001 specification
+    <http://www.opengroup.org/onlinepubs/009695399/functions/getcwd.html>.  */
  char *getcwd (char *, size_t);
  #endif
diff -c -3 -r1.2 inet_ntop.h
*** inet_ntop.h 14 May 2005 06:03:58 -0000      1.2
--- inet_ntop.h 27 May 2005 12:43:19 -0000
***************
*** 31,37 ****
     DST is returned.  If an error occurs, the return value is NULL and
     errno is set.  If CNT bytes are not sufficient to hold the result,
     the return value is NULL and errno is set to ENOSPC.  A good value
!    for CNT is 46.  */
  
  #if !HAVE_INET_NTOP /* not already defined and declared in <arpa/inet.h> ? */
  extern const char *inet_ntop(int af, const void *src, char *dst, socklen_t 
cnt);
--- 31,40 ----
     DST is returned.  If an error occurs, the return value is NULL and
     errno is set.  If CNT bytes are not sufficient to hold the result,
     the return value is NULL and errno is set to ENOSPC.  A good value
!    for CNT is 46.
! 
!    For more details, see the POSIX:2001 specification
!    <http://www.opengroup.org/onlinepubs/009695399/functions/inet_ntop.html>.  
*/
  
  #if !HAVE_INET_NTOP /* not already defined and declared in <arpa/inet.h> ? */
  extern const char *inet_ntop(int af, const void *src, char *dst, socklen_t 
cnt);
diff -c -3 -r1.2 time_r.h
*** time_r.h    14 May 2005 06:03:58 -0000      1.2
--- time_r.h    27 May 2005 12:43:19 -0000
***************
*** 1,6 ****
  /* Reentrant time functions like localtime_r.
  
!    Copyright (C) 2003 Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,6 ----
  /* Reentrant time functions like localtime_r.
  
!    Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
***************
*** 37,45 ****
--- 37,56 ----
  # define gmtime_r rpl_gmtime_r
  # define localtime_r rpl_localtime_r
  
+ /* See the POSIX:2001 specification
+    <http://www.opengroup.org/onlinepubs/009695399/functions/asctime.html>.  */
  char *asctime_r (struct tm const * restrict, char * restrict);
+ 
+ /* See the POSIX:2001 specification
+    <http://www.opengroup.org/onlinepubs/009695399/functions/ctime.html>.  */
  char *ctime_r (time_t const *, char *);
+ 
+ /* See the POSIX:2001 specification
+    <http://www.opengroup.org/onlinepubs/009695399/functions/gmtime.html>.  */
  struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
+ 
+ /* See the POSIX:2001 specification
+    <http://www.opengroup.org/onlinepubs/009695399/functions/localtime.html>.  
*/
  struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
  #endif
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]