geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

76 lines
2.4 KiB

  1. /*
  2. * Copyright (C) 2015 Patrick Monnerat, D+H <patrick.monnerat@dh.com>
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms,
  6. * with or without modification, are permitted provided
  7. * that the following conditions are met:
  8. *
  9. * Redistributions of source code must retain the above
  10. * copyright notice, this list of conditions and the
  11. * following disclaimer.
  12. *
  13. * Redistributions in binary form must reproduce the above
  14. * copyright notice, this list of conditions and the following
  15. * disclaimer in the documentation and/or other materials
  16. * provided with the distribution.
  17. *
  18. * Neither the name of the copyright holder nor the names
  19. * of any other contributors may be used to endorse or
  20. * promote products derived from this software without
  21. * specific prior written permission.
  22. *
  23. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  24. * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  25. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  26. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  27. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  28. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  30. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  31. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  32. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  33. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  34. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  35. * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  36. * OF SUCH DAMAGE.
  37. */
  38. #ifndef LIBSSH2_SYS_SOCKET_H
  39. #define LIBSSH2_SYS_SOCKET_H
  40. /*
  41. * <sys/socket.h> wrapper.
  42. * Redefines connect().
  43. */
  44. #include <qadrt.h>
  45. #ifndef _QADRT_LT
  46. # define _QADRT_LT <
  47. #endif
  48. #ifndef _QADRT_GT
  49. # define _QADRT_GT >
  50. #endif
  51. #ifdef QADRT_SYSINC
  52. # include _QADRT_LT QADRT_SYSINC/sys/socket.h _QADRT_GT
  53. #elif __ILEC400_TGTVRM__ >= 710
  54. # include_next <sys/socket.h>
  55. #elif !defined(__SRCSTMF__)
  56. # include <QSYSINC/sys/socket>
  57. #else
  58. # include </QIBM/include/sys/socket.h>
  59. #endif
  60. extern int _libssh2_os400_connect(int sd,
  61. struct sockaddr * destaddr, int addrlen);
  62. #ifndef LIBSSH2_DISABLE_QADRT_EXT
  63. #define connect(sd, addr, len) _libssh2_os400_connect((sd), (addr), (len))
  64. #endif
  65. #endif
  66. /* vim: set expandtab ts=4 sw=4: */