ssl_os_port.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (c) 2007, Cameron Rich
  3. *
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions are met:
  8. *
  9. * * Redistributions of source code must retain the above copyright notice,
  10. * this list of conditions and the following disclaimer.
  11. * * Redistributions in binary form must reproduce the above copyright notice,
  12. * this list of conditions and the following disclaimer in the documentation
  13. * and/or other materials provided with the distribution.
  14. * * Neither the name of the axTLS project nor the names of its contributors
  15. * may be used to endorse or promote products derived from this software
  16. * without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  22. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  23. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  24. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  25. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  26. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  27. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  28. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. */
  30. /**
  31. * @file os_port.h
  32. *
  33. * Some stuff to minimise the differences between windows and linux/unix
  34. */
  35. #ifndef HEADER_OS_PORT_H
  36. #define HEADER_OS_PORT_H
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40. //#include "../crypto/os_int.h"
  41. #include "c_types.h"
  42. #include "osapi.h"
  43. #include <stdio.h>
  44. #if 0
  45. #define ssl_printf(fmt, args...) os_printf(fmt,## args)
  46. #else
  47. #define ssl_printf(fmt, args...)
  48. #endif
  49. #define STDCALL
  50. #define EXP_FUNC
  51. struct timeval {
  52. long tv_sec; /* seconds */
  53. long tv_usec; /* and microseconds */
  54. };
  55. /* Mutexing definitions */
  56. #define SSL_CTX_MUTEX_INIT(A)
  57. #define SSL_CTX_MUTEX_DESTROY(A)
  58. #define SSL_CTX_LOCK(A)
  59. #define SSL_CTX_UNLOCK(A)
  60. #ifdef __cplusplus
  61. }
  62. #endif
  63. #endif