Rough and ready port of axTLS
ssl/os_port.h@0:5a29fd060ac8, 2013-05-13 (annotated)
- Committer:
- ashleymills
- Date:
- Mon May 13 18:15:18 2013 +0000
- Revision:
- 0:5a29fd060ac8
initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ashleymills | 0:5a29fd060ac8 | 1 | #ifndef HEADER_OS_PORT_H |
ashleymills | 0:5a29fd060ac8 | 2 | #define HEADER_OS_PORT_H |
ashleymills | 0:5a29fd060ac8 | 3 | #ifdef __cplusplus |
ashleymills | 0:5a29fd060ac8 | 4 | extern "C" { |
ashleymills | 0:5a29fd060ac8 | 5 | #endif |
ashleymills | 0:5a29fd060ac8 | 6 | |
ashleymills | 0:5a29fd060ac8 | 7 | #include "config.h" |
ashleymills | 0:5a29fd060ac8 | 8 | |
ashleymills | 0:5a29fd060ac8 | 9 | //#include <Thread.h> |
ashleymills | 0:5a29fd060ac8 | 10 | #define SSL_CTX_MUTEX_TYPE //Mutex |
ashleymills | 0:5a29fd060ac8 | 11 | #define SSL_CTX_MUTEX_INIT(A) //pthread_mutex_init(&A, NULL) |
ashleymills | 0:5a29fd060ac8 | 12 | #define SSL_CTX_MUTEX_DESTROY(A) //pthread_mutex_destroy(&A) |
ashleymills | 0:5a29fd060ac8 | 13 | #define SSL_CTX_LOCK(A) //pthread_mutex_lock(&A) |
ashleymills | 0:5a29fd060ac8 | 14 | #define SSL_CTX_UNLOCK(A) //pthread_mutex_unlock(&A) |
ashleymills | 0:5a29fd060ac8 | 15 | |
ashleymills | 0:5a29fd060ac8 | 16 | #define malloc(A) ax_malloc(A) |
ashleymills | 0:5a29fd060ac8 | 17 | #ifndef realloc |
ashleymills | 0:5a29fd060ac8 | 18 | #define realloc(A,B) ax_realloc(A,B) |
ashleymills | 0:5a29fd060ac8 | 19 | #endif |
ashleymills | 0:5a29fd060ac8 | 20 | #define calloc(A,B) ax_calloc(A,B) |
ashleymills | 0:5a29fd060ac8 | 21 | |
ashleymills | 0:5a29fd060ac8 | 22 | #define STDCALL |
ashleymills | 0:5a29fd060ac8 | 23 | #define EXP_FUNC |
ashleymills | 0:5a29fd060ac8 | 24 | EXP_FUNC void * STDCALL ax_malloc(size_t s); |
ashleymills | 0:5a29fd060ac8 | 25 | EXP_FUNC void * STDCALL ax_realloc(void *y, size_t s); |
ashleymills | 0:5a29fd060ac8 | 26 | EXP_FUNC void * STDCALL ax_calloc(size_t n, size_t s); |
ashleymills | 0:5a29fd060ac8 | 27 | //EXP_FUNC int STDCALL ax_open(const char *pathname, int flags); |
ashleymills | 0:5a29fd060ac8 | 28 | |
ashleymills | 0:5a29fd060ac8 | 29 | #define SOCKET_READ(A,B,C) lwip_recv(A,B,C,0) |
ashleymills | 0:5a29fd060ac8 | 30 | #define SOCKET_WRITE(A,B,C) lwip_send(A,B,C,0) |
ashleymills | 0:5a29fd060ac8 | 31 | #define SOCKET_CLOSE(A) closesocket(A) |
ashleymills | 0:5a29fd060ac8 | 32 | #define TTY_FLUSH() |
ashleymills | 0:5a29fd060ac8 | 33 | #ifdef __cplusplus |
ashleymills | 0:5a29fd060ac8 | 34 | } |
ashleymills | 0:5a29fd060ac8 | 35 | #endif |
ashleymills | 0:5a29fd060ac8 | 36 | #endif |