Update README.md
[deliverable/titan.core.git] / common / platform.h
1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Balasko, Jeno
10 * Raduly, Csaba
11 * Szabados, Kristof
12 *
13 ******************************************************************************/
14 #ifndef PLATFORM_H_
15 #define PLATFORM_H_
16
17 #include <sys/socket.h>
18
19 /* Create a unified alias for socklen_t */
20
21 #if defined(SOLARIS)
22 /* Has no socklen_t at all, man page claims to use size_t. However, size_t
23 * 1. is slightly broken, see
24 * http://portabilityblog.com/blog/archives/7-socklen_t-confusion.html
25 * 2. is used _only_ if _XPG4_2 is defined.
26 * Since TITAN does not define _XPG4_2, the correct socklen_type is int. */
27 typedef int socklen_type;
28 #elif defined(WIN32)
29 /* Cygwin has socklen_t which is a typedef to int */
30 typedef socklen_t socklen_type;
31 #else
32 /* Modern socklen_t is typedef unsigned int32 */
33 typedef socklen_t socklen_type;
34 #endif /* defined... */
35
36 #endif /* PLATFORM_H_ */
This page took 0.031336 seconds and 5 git commands to generate.