Print this page
remove support for non-ANSI compilation


   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*


  22  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  23  */
  24 
  25 /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
  26 /*        All Rights Reserved   */
  27 
  28 /*
  29  * University Copyright- Copyright (c) 1982, 1986, 1988
  30  * The Regents of the University of California
  31  * All Rights Reserved
  32  *
  33  * University Acknowledgment- Portions of this document are derived from
  34  * software developed by the University of California, Berkeley, and its
  35  * contributors.
  36  */
  37 
  38 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
  39 
  40 #ifndef _SYS_SOCKET_H
  41 #define _SYS_SOCKET_H


 505 #define connect __xnet_connect
 506 #define recvmsg __xnet_recvmsg
 507 #define sendmsg __xnet_sendmsg
 508 #define sendto  __xnet_sendto
 509 #define socket  __xnet_socket
 510 #define socketpair      __xnet_socketpair
 511 #define getsockopt      __xnet_getsockopt
 512 #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 513 
 514 #endif  /* _XPG4_2 */
 515 
 516 #if defined(_XPG4_2) && !defined(_XPG5)
 517 #ifdef  __PRAGMA_REDEFINE_EXTNAME
 518 #pragma redefine_extname listen __xnet_listen
 519 #else   /* __PRAGMA_REDEFINE_EXTNAME */
 520 #define listen  __xnet_listen
 521 #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 522 #endif /* (_XPG4_2) && !defined(_XPG5) */
 523 
 524 #if !defined(_KERNEL) || defined(_BOOT)
 525 #ifdef  __STDC__
 526 extern int accept(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t);
 527 extern int accept4(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t, int);
 528 extern int bind(int, const struct sockaddr *, socklen_t);
 529 extern int connect(int, const struct sockaddr *, socklen_t);
 530 extern int getpeername(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t);
 531 extern int getsockname(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t);
 532 extern int getsockopt(int, int, int, void *_RESTRICT_KYWD, Psocklen_t);
 533 extern int listen(int, int);    /* XXX - fixme???  where do I go */
 534 extern int socketpair(int, int, int, int *);
 535 extern ssize_t recv(int, void *, size_t, int);
 536 extern ssize_t recvfrom(int, void *_RESTRICT_KYWD, size_t, int,
 537         struct sockaddr *_RESTRICT_KYWD, Psocklen_t);
 538 extern ssize_t recvmsg(int, struct msghdr *, int);
 539 extern ssize_t send(int, const void *, size_t, int);
 540 extern ssize_t sendmsg(int, const struct msghdr *, int);
 541 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
 542         socklen_t);
 543 extern int setsockopt(int, int, int, const void *, socklen_t);
 544 extern int shutdown(int, int);
 545 extern int socket(int, int, int);
 546 
 547 #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
 548 extern int sockatmark(int);
 549 #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */
 550 #else   /* __STDC__ */
 551 extern int accept();
 552 extern int accept4();
 553 extern int bind();
 554 extern int connect();
 555 extern int getpeername();
 556 extern int getsockname();
 557 extern int getsockopt();
 558 extern int listen();
 559 extern int recv();
 560 extern int recvfrom();
 561 extern int send();
 562 extern int sendto();
 563 extern int setsockopt();
 564 extern int sockatmark();
 565 extern int socket();
 566 extern int recvmsg();
 567 extern int sendmsg();
 568 extern int shutdown();
 569 extern int socketpair();
 570 #endif  /* __STDC__ */
 571 #endif  /* !defined(_KERNEL) || defined(_BOOT) */
 572 
 573 #ifdef  __cplusplus
 574 }
 575 #endif
 576 
 577 #endif  /* _SYS_SOCKET_H */


   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  23  *
  24  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  25  */
  26 
  27 /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
  28 /*        All Rights Reserved   */
  29 
  30 /*
  31  * University Copyright- Copyright (c) 1982, 1986, 1988
  32  * The Regents of the University of California
  33  * All Rights Reserved
  34  *
  35  * University Acknowledgment- Portions of this document are derived from
  36  * software developed by the University of California, Berkeley, and its
  37  * contributors.
  38  */
  39 
  40 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
  41 
  42 #ifndef _SYS_SOCKET_H
  43 #define _SYS_SOCKET_H


 507 #define connect __xnet_connect
 508 #define recvmsg __xnet_recvmsg
 509 #define sendmsg __xnet_sendmsg
 510 #define sendto  __xnet_sendto
 511 #define socket  __xnet_socket
 512 #define socketpair      __xnet_socketpair
 513 #define getsockopt      __xnet_getsockopt
 514 #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 515 
 516 #endif  /* _XPG4_2 */
 517 
 518 #if defined(_XPG4_2) && !defined(_XPG5)
 519 #ifdef  __PRAGMA_REDEFINE_EXTNAME
 520 #pragma redefine_extname listen __xnet_listen
 521 #else   /* __PRAGMA_REDEFINE_EXTNAME */
 522 #define listen  __xnet_listen
 523 #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 524 #endif /* (_XPG4_2) && !defined(_XPG5) */
 525 
 526 #if !defined(_KERNEL) || defined(_BOOT)

 527 extern int accept(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t);
 528 extern int accept4(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t, int);
 529 extern int bind(int, const struct sockaddr *, socklen_t);
 530 extern int connect(int, const struct sockaddr *, socklen_t);
 531 extern int getpeername(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t);
 532 extern int getsockname(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t);
 533 extern int getsockopt(int, int, int, void *_RESTRICT_KYWD, Psocklen_t);
 534 extern int listen(int, int);    /* XXX - fixme???  where do I go */
 535 extern int socketpair(int, int, int, int *);
 536 extern ssize_t recv(int, void *, size_t, int);
 537 extern ssize_t recvfrom(int, void *_RESTRICT_KYWD, size_t, int,
 538         struct sockaddr *_RESTRICT_KYWD, Psocklen_t);
 539 extern ssize_t recvmsg(int, struct msghdr *, int);
 540 extern ssize_t send(int, const void *, size_t, int);
 541 extern ssize_t sendmsg(int, const struct msghdr *, int);
 542 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
 543         socklen_t);
 544 extern int setsockopt(int, int, int, const void *, socklen_t);
 545 extern int shutdown(int, int);
 546 extern int socket(int, int, int);
 547 
 548 #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
 549 extern int sockatmark(int);
 550 #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */





















 551 #endif  /* !defined(_KERNEL) || defined(_BOOT) */
 552 
 553 #ifdef  __cplusplus
 554 }
 555 #endif
 556 
 557 #endif  /* _SYS_SOCKET_H */