Skip to content

Commit 7a8b2ca

Browse files
committed
htons & friends in arpa/inet.h
1 parent 34ae5da commit 7a8b2ca

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

gc/network.h

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef __NETWORK_H__
22
#define __NETWORK_H__
33

4-
#include <gctypes.h>
4+
55
#include <sys/time.h>
66
#include <sys/types.h>
77

@@ -11,6 +11,8 @@
1111
#include <arpa/inet.h>
1212
#include <netdb.h>
1313

14+
#include "gctypes.h"
15+
1416
#define INVALID_SOCKET (~0)
1517
#define SOCKET_ERROR (-1)
1618

@@ -119,19 +121,6 @@
119121
#define socklen_t u32
120122
#endif
121123

122-
#ifndef htons
123-
#define htons(x) (x)
124-
#endif
125-
#ifndef ntohs
126-
#define ntohs(x) (x)
127-
#endif
128-
#ifndef htonl
129-
#define htonl(x) (x)
130-
#endif
131-
#ifndef ntohl
132-
#define ntohl(x) (x)
133-
#endif
134-
135124
#ifndef h_addr
136125
#define h_addr h_addr_list[0]
137126
#endif

0 commit comments

Comments
 (0)