Changeset 1fbd0baf in rtems


Ignore:
Timestamp:
Jul 2, 2008, 1:40:19 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
7f5a245d
Parents:
e03da15
Message:

2008-07-02 Joel Sherrill <joel.sherrill@…>

  • libnetworking/Makefile.am, libnetworking/libc/gethostnamadr.c, libnetworking/libc/getservbyname.c, libnetworking/libc/getservbyport.c: Add initial versions of getservbyport_r(), gethostbyaddr_r(), and getservbyport_r(). At this point they are just simple weappers for the version without the _r in the name.
Location:
cpukit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    re03da15 r1fbd0baf  
     12008-07-02      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * libnetworking/Makefile.am, libnetworking/libc/gethostnamadr.c,
     4        libnetworking/libc/getservbyname.c,
     5        libnetworking/libc/getservbyport.c: Add initial versions of
     6        getservbyport_r(), gethostbyaddr_r(), and getservbyport_r(). At this
     7        point they are just simple weappers for the version without the _r in
     8        the name.
     9
    1102008-07-01      Joel Sherrill <joel.sherrill@oarcorp.com>
    211
  • cpukit/libnetworking/Makefile.am

    re03da15 r1fbd0baf  
    150150## libc
    151151
    152 libc_CPPFLAGS = -DNOPOLL -DNOSELECT -D__BSD_VISIBLE
     152libc_CPPFLAGS = -DNOPOLL -DNOSELECT -D__BSD_VISIBLE -D_THREAD_SAFE
    153153
    154154noinst_LIBRARIES += libc.a
  • cpukit/libnetworking/libc/gethostnamadr.c

    re03da15 r1fbd0baf  
    157157        }
    158158        return hp;
     159}
     160
     161int gethostbyaddr_r(const void *addr, socklen_t len, int type,
     162               struct hostent *ret, char *buf, size_t buflen,
     163               struct hostent **result, int *h_errnop)
     164{
     165  #warning "implement a proper gethostbyaddr_r"
     166 
     167  *result = gethostbyaddr( addr, len, type );
     168  if ( *result )
     169    return 0;
     170  return -1;
    159171}
    160172
  • cpukit/libnetworking/libc/getservbyname.c

    re03da15 r1fbd0baf  
    4343extern int _serv_stayopen;
    4444
     45int getservbyname_r(
     46  const char *name,
     47  const char *proto,
     48  struct servent *result_buf,
     49  char *buf,
     50  size_t buflen,
     51  struct servent **result
     52)
     53{
     54  #warning "implement a proper getservbyport_r"
     55 
     56  *result = getservbyname(name, proto);
     57  if ( *result )
     58    return 0;
     59
     60  return -1;
     61}
     62
     63
    4564struct servent *
    4665getservbyname(name, proto)
  • cpukit/libnetworking/libc/getservbyport.c

    re03da15 r1fbd0baf  
    4343extern int _serv_stayopen;
    4444
     45int getservbyport_r(
     46  int port,
     47  const char *proto,
     48  struct servent *result_buf,
     49  char *buf,
     50  size_t buflen,
     51  struct servent **result
     52)
     53{
     54  #warning "implement a proper getservbyport_r"
     55 
     56  *result = getservbyport(port, proto);
     57  if ( *result )
     58    return 0;
     59
     60  return -1;
     61}
     62
    4563struct servent *
    4664getservbyport(port, proto)
Note: See TracChangeset for help on using the changeset viewer.