Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/netdb.h
          +++ new/usr/src/head/netdb.h
   1    1  /*
        2 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
        3 + *
   2    4   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
   3    5   * Use is subject to license terms.
   4    6   */
   5    7  
   6    8  /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
   7    9  /*        All Rights Reserved   */
   8   10  
   9   11  /*
  10   12   * BIND 4.9.3:
  11   13   *
↓ open down ↓ 210 lines elided ↑ open up ↑
 222  224          int     p_proto;        /* protocol # */
 223  225  };
 224  226  
 225  227  struct  servent {
 226  228          char    *s_name;        /* official service name */
 227  229          char    **s_aliases;    /* alias list */
 228  230          int     s_port;         /* port # */
 229  231          char    *s_proto;       /* protocol to use */
 230  232  };
 231  233  
 232      -#ifdef  __STDC__
 233  234  #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 234  235  struct hostent  *gethostbyname_r
 235  236          (const char *, struct hostent *, char *, int, int *h_errnop);
 236  237  struct hostent  *gethostbyaddr_r
 237  238          (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
 238  239  struct hostent  *getipnodebyname(const char *, int, int, int *);
 239  240  struct hostent  *getipnodebyaddr(const void *, size_t, int, int *);
 240  241  void            freehostent(struct hostent *);
 241  242  struct hostent  *gethostent_r(struct hostent *, char *, int, int *h_errnop);
 242  243  
↓ open down ↓ 103 lines elided ↑ open up ↑
 346  347  
 347  348  /* IPsec algorithm prototype definitions */
 348  349  struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
 349  350  struct ipsecalgent *getipsecalgbynum(int, int, int *);
 350  351  int getipsecprotobyname(const char *doi_name);
 351  352  char *getipsecprotobynum(int doi_domain);
 352  353  void freeipsecalgent(struct ipsecalgent *ptr);
 353  354  /* END IPsec algorithm prototype definitions */
 354  355  
 355  356  #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 356      -#else   /* __STDC__ */
 357      -struct hostent  *gethostbyname_r();
 358      -struct hostent  *gethostbyaddr_r();
 359      -struct hostent  *getipnodebyname();
 360      -struct hostent  *getipnodebyaddr();
 361      -void             freehostent();
 362      -struct hostent  *gethostent_r();
 363      -struct servent  *getservbyname_r();
 364      -struct servent  *getservbyport_r();
 365      -struct servent  *getservent_r();
 366      -struct netent   *getnetbyname_r();
 367      -struct netent   *getnetbyaddr_r();
 368      -struct netent   *getnetent_r();
 369      -struct protoent *getprotobyname_r();
 370      -struct protoent *getprotobynumber_r();
 371      -struct protoent *getprotoent_r();
 372      -int              getnetgrent_r();
 373      -int              innetgr();
 374  357  
 375      -/* Old interfaces that return a pointer to a static area;  MT-unsafe */
 376      -struct hostent  *gethostbyname();
 377      -struct hostent  *gethostbyaddr();
 378      -struct hostent  *gethostent();
 379      -struct netent   *getnetbyname();
 380      -struct netent   *getnetbyaddr();
 381      -struct netent   *getnetent();
 382      -struct servent  *getservbyname();
 383      -struct servent  *getservbyport();
 384      -struct servent  *getservent();
 385      -struct protoent *getprotobyname();
 386      -struct protoent *getprotobynumber();
 387      -struct protoent *getprotoent();
 388      -int              getnetgrent();
 389      -
 390      -int sethostent();
 391      -int endhostent();
 392      -int setnetent();
 393      -int endnetent();
 394      -int setservent();
 395      -int endservent();
 396      -int setprotoent();
 397      -int endprotoent();
 398      -int setnetgrent();
 399      -int endnetgrent();
 400      -int rcmd();
 401      -int rcmd_af();
 402      -int rexec();
 403      -int rexec_af();
 404      -int rresvport();
 405      -int rresvport_af();
 406      -int rresvport_addr();
 407      -int ruserok();
 408      -/* BIND */
 409      -struct hostent  *gethostbyname2();
 410      -void            herror();
 411      -char            *hstrerror();
 412      -/* IPv6 prototype definitons */
 413      -int             getaddrinfo();
 414      -void            freeaddrinfo();
 415      -const char      *gai_strerror();
 416      -int             getnameinfo();
 417      -/* END IPv6 prototype definitions */
 418      -/* End BIND */
 419      -
 420      -#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 421      -/* IPsec algorithm prototype definitions */
 422      -struct ipsecalgent *getalgbyname();
 423      -struct ipsecalgent *getalgbydoi();
 424      -int getdoidomainbyname();
 425      -const char *getdoidomainbynum();
 426      -void freealgent();
 427      -/* END IPsec algorithm prototype definitions */
 428      -#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 429      -
 430      -#endif  /* __STDC__ */
 431      -
 432  358  /*
 433  359   * Error return codes from gethostbyname() and gethostbyaddr()
 434  360   * (when using the resolver)
 435  361   */
 436  362  
 437  363  extern  int h_errno;
 438  364  
 439  365  #ifdef  _REENTRANT
 440      -#ifdef  __STDC__
 441  366  extern int      *__h_errno(void);
 442      -#else
 443      -extern int      *__h_errno();
 444      -#endif  /* __STDC__ */
 445  367  
 446  368  /* Only #define h_errno if there is no conflict with other use */
 447  369  #ifdef  H_ERRNO_IS_FUNCTION
 448  370  #define h_errno (*__h_errno())
 449  371  #endif  /* NO_H_ERRNO_DEFINE */
 450  372  #endif  /* _REENTRANT */
 451  373  
 452  374  /*
 453  375   * Error return codes from gethostbyname() and gethostbyaddr()
 454  376   * (left in extern int h_errno).
↓ open down ↓ 25 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX