Edinburgh Speech Tools  2.4-release
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
EST_socket_win32.h
1 
2 
3  /************************************************************************/
4  /* */
5  /* Centre for Speech Technology Research */
6  /* University of Edinburgh, UK */
7  /* Copyright (c) 1996,1997 */
8  /* All Rights Reserved. */
9  /* */
10  /* Permission is hereby granted, free of charge, to use and distribute */
11  /* this software and its documentation without restriction, including */
12  /* without limitation the rights to use, copy, modify, merge, publish, */
13  /* distribute, sublicense, and/or sell copies of this work, and to */
14  /* permit persons to whom this work is furnished to do so, subject to */
15  /* the following conditions: */
16  /* 1. The code must retain the above copyright notice, this list of */
17  /* conditions and the following disclaimer. */
18  /* 2. Any modifications must be clearly marked as such. */
19  /* 3. Original authors' names are not deleted. */
20  /* 4. The authors' names are not used to endorse or promote products */
21  /* derived from this software without specific prior written */
22  /* permission. */
23  /* */
24  /* THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK */
25  /* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
26  /* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
27  /* SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE */
28  /* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
29  /* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
30  /* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
31  /* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
32  /* THIS SOFTWARE. */
33  /* */
34  /*************************************************************************/
35  /* */
36  /* Author: Richard Caley (rjc@cstr.ed.ac.uk) */
37  /* Date: Tue Sep4th 1997 */
38  /* -------------------------------------------------------------------- */
39  /* Defines to make Winsock more like unix sockets. */
40  /* */
41  /*************************************************************************/
42 
43 #if !defined(__EST_SOCKET_WIN32_H__)
44 #define __EST_SOCKET_WIN32_H__ 1
45 
46 #define SOCKLEN_CAST (int *)
47 
48 typedef int ssize_t;
49 typedef int socklen_t;
50 #define NOT_A_SOCKET(FD) ((FD) == INVALID_SOCKET)
51 #define socket_error() WSAGetLastError()
52 
53 #if defined(__cplusplus)
54 extern "C" {
55 #endif
56 
57  int socket_initialise(void);
58 
59 #if defined(__cplusplus)
60 }
61 #endif
62 
63 #endif