diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-12-04 22:24:24 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-12-04 22:24:24 +0000 |
commit | 834e429a7169d4b5f239bc2980bda801e2bbdba0 (patch) | |
tree | 96e500028de2adcc6abb72a3e3d190d5b41270b6 | |
parent | eb5ea263bc6597de2b78ee5e5f8ca2a4137f0eca (diff) | |
download | gnutls-834e429a7169d4b5f239bc2980bda801e2bbdba0.tar.gz |
some cleanups
-rw-r--r-- | lib/gnutls.h.in | 10 | ||||
-rw-r--r-- | lib/gnutls_buffers.c | 4 | ||||
-rw-r--r-- | lib/gnutls_global.c | 4 | ||||
-rw-r--r-- | lib/gnutls_int.h | 6 | ||||
-rw-r--r-- | lib/gnutls_record.c | 10 |
5 files changed, 17 insertions, 17 deletions
diff --git a/lib/gnutls.h.in b/lib/gnutls.h.in index f055616e03..f93d0f8045 100644 --- a/lib/gnutls.h.in +++ b/lib/gnutls.h.in @@ -60,7 +60,7 @@ typedef enum GNUTLS_Version { GNUTLS_SSL3=1, GNUTLS_TLS1 } GNUTLS_Version; /* If you want to change this, then also change the * define in gnutls_int.h, and recompile. */ -#define SOCKET int +#define GNUTLS_SOCKET_PTR int #define GNUTLS_LIST ... @@ -94,7 +94,7 @@ int gnutls_rehandshake( GNUTLS_STATE state); AlertDescription gnutls_get_last_alert( GNUTLS_STATE state); -int gnutls_send_alert(SOCKET, GNUTLS_STATE, AlertLevel, AlertDescription); +int gnutls_send_alert(GNUTLS_SOCKET_PTR, GNUTLS_STATE, AlertLevel, AlertDescription); int gnutls_send_appropriate_alert( GNUTLS_STATE state, int err); /* get information on the current state */ @@ -229,9 +229,9 @@ void gnutls_global_deinit(); int gnutls_dh_replace_params( gnutls_datum prime, gnutls_datum generator, int bits); int gnutls_dh_generate_params( gnutls_datum* prime, gnutls_datum* generator, int bits); -typedef ssize_t (*PULL_FUNC)(SOCKET, void*, size_t); -typedef ssize_t (*PUSH_FUNC)(SOCKET, const void*, size_t); -void gnutls_set_transport_ptr(GNUTLS_STATE state, SOCKET ptr); +typedef ssize_t (*PULL_FUNC)(GNUTLS_SOCKET_PTR, void*, size_t); +typedef ssize_t (*PUSH_FUNC)(GNUTLS_SOCKET_PTR, const void*, size_t); +void gnutls_set_transport_ptr(GNUTLS_STATE state, GNUTLS_SOCKET_PTR ptr); typedef void (*LOG_FUNC)( const char*); diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c index 8ea7b8bf60..0f6ed94676 100644 --- a/lib/gnutls_buffers.c +++ b/lib/gnutls_buffers.c @@ -189,7 +189,7 @@ static ssize_t _gnutls_read( GNUTLS_STATE state, void *iptr, size_t sizeOfPtr, i #ifdef READ_DEBUG int j,x, sum=0; #endif - SOCKET fd = state->gnutls_internals.transport_ptr; + GNUTLS_SOCKET_PTR fd = state->gnutls_internals.transport_ptr; left = sizeOfPtr; while (left > 0) { @@ -517,7 +517,7 @@ ssize_t _gnutls_write_buffered( GNUTLS_STATE state, const void *iptr, size_t n) ssize_t retval, i; const opaque * ptr; int ret; - SOCKET fd = state->gnutls_internals.transport_ptr; + GNUTLS_SOCKET_PTR fd = state->gnutls_internals.transport_ptr; ptr = iptr; diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c index 4adb3081bb..5e62e94be7 100644 --- a/lib/gnutls_global.c +++ b/lib/gnutls_global.c @@ -145,7 +145,7 @@ void gnutls_global_deinit() { * probably be ok. * This function should be called once and after gnutls_global_init(). * PULL_FUNC is of the form, - * ssize_t (*PULL_FUNC)(SOCKET, const void*, size_t); + * ssize_t (*PULL_FUNC)(GNUTLS_SOCKET_PTR, const void*, size_t); **/ void gnutls_set_pull_function( GNUTLS_STATE state, PULL_FUNC pull_func) { state->gnutls_internals._gnutls_pull_func = pull_func; @@ -164,7 +164,7 @@ void gnutls_set_pull_function( GNUTLS_STATE state, PULL_FUNC pull_func) { * * This function should be called once and after gnutls_global_init(). * PUSH_FUNC is of the form, - * ssize_t (*PUSH_FUNC)(SOCKET, const void*, size_t); + * ssize_t (*PUSH_FUNC)(GNUTLS_SOCKET_PTR, const void*, size_t); **/ void gnutls_set_push_function( GNUTLS_STATE state, PUSH_FUNC push_func) { state->gnutls_internals._gnutls_push_func = push_func; diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index 60f2e559d7..35bade7b40 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -38,7 +38,7 @@ /* It might be a good idea to replace int with void* * here. */ -#define SOCKET int +#define GNUTLS_SOCKET_PTR int #define GNUTLS_LIST ... @@ -158,8 +158,8 @@ typedef enum ContentType { GNUTLS_CHANGE_CIPHER_SPEC=20, GNUTLS_ALERT, GNUTLS_HA /* Pull & Push functions defines: */ -typedef ssize_t (*PULL_FUNC)(SOCKET, void*, size_t); -typedef ssize_t (*PUSH_FUNC)(SOCKET, const void*, size_t); +typedef ssize_t (*PULL_FUNC)(GNUTLS_SOCKET_PTR, void*, size_t); +typedef ssize_t (*PUSH_FUNC)(GNUTLS_SOCKET_PTR, const void*, size_t); /* Store & Retrieve functions defines: */ typedef int (*DB_STORE_FUNC)(void*, gnutls_datum key, gnutls_datum data); diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index 595b408a97..381194c627 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -73,7 +73,7 @@ void gnutls_set_lowat(GNUTLS_STATE state, int num) { * handle. * **/ -void gnutls_set_transport_ptr(GNUTLS_STATE state, SOCKET ptr) { +void gnutls_set_transport_ptr(GNUTLS_STATE state, GNUTLS_SOCKET_PTR ptr) { state->gnutls_internals.transport_ptr = ptr; } @@ -455,11 +455,11 @@ int ret = GNUTLS_E_UNIMPLEMENTED_FEATURE; * have been initiated using gnutls_handshake(). * 'how' should be one of GNUTLS_SHUT_RDWR, GNUTLS_SHUT_WR. * - * in case of GNUTLS_SHUT_RDWR then the connection gets terminated and + * In case of GNUTLS_SHUT_RDWR then the TLS connection gets terminated and * further receives and sends will be disallowed. If the return * value is zero you may continue using the connection. * - * in case of GNUTLS_SHUT_WR then the connection gets terminated and + * In case of GNUTLS_SHUT_WR then the TLS connection gets terminated and * further sends will be disallowed. In order to reuse the connection * you should wait for an EOF from the peer. * @@ -1119,7 +1119,7 @@ AlertDescription gnutls_get_last_alert( GNUTLS_STATE state) { * @data: contains the data to send * @sizeofdata: is the length of the data * - * This function has the same semantics as write() has. The only + * This function has the similar semantics to write(). The only * difference is that is accepts a GNUTLS state, and uses different * error codes. * @@ -1142,7 +1142,7 @@ ssize_t gnutls_write( GNUTLS_STATE state, const void *data, size_t sizeofdata) { * @data: contains the data to send * @sizeofdata: is the length of the data * - * This function has the same semantics as write() has. The only + * This function has the similar semantics to read(). The only * difference is that is accepts a GNUTLS state. * Also returns the number of bytes received, zero on EOF, but * a negative error code in case of an error. |