Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: native_client_sdk/src/libraries/third_party/newlib-extras/arpa/inet.h

Issue 22625004: Adds htonl, htons, ntohl, and ntohs to newlib (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gethostbyname
Patch Set: Fixed Merge Conflict with Master Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 1983, 1993 2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved. 3 * The Regents of the University of California. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #undef _BSD_SOCKLEN_T_ 100 #undef _BSD_SOCKLEN_T_
101 #endif 101 #endif
102 102
103 #ifndef _STRUCT_IN_ADDR_DECLARED 103 #ifndef _STRUCT_IN_ADDR_DECLARED
104 struct in_addr { 104 struct in_addr {
105 in_addr_t s_addr; 105 in_addr_t s_addr;
106 }; 106 };
107 #define _STRUCT_IN_ADDR_DECLARED 107 #define _STRUCT_IN_ADDR_DECLARED
108 #endif 108 #endif
109 109
110 #define inet_addr __inet_addr
111 #define inet_aton __inet_aton
112 #define inet_lnaof __inet_lnaof
113 #define inet_makeaddr __inet_makeaddr
114 #define inet_neta __inet_neta
115 #define inet_netof __inet_netof
116 #define inet_network __inet_network
117 #define inet_net_ntop __inet_net_ntop
118 #define inet_net_pton __inet_net_pton
119 #define inet_ntoa __inet_ntoa
120 #define inet_pton __inet_pton
121 #define inet_ntop __inet_ntop
122 #define inet_nsap_addr __inet_nsap_addr
123 #define inet_nsap_ntoa __inet_nsap_ntoa
124
125 __BEGIN_DECLS 110 __BEGIN_DECLS
126 in_addr_t inet_addr(const char *); 111 in_addr_t inet_addr(const char *);
127 char *inet_ntoa(struct in_addr); 112 char *inet_ntoa(struct in_addr);
128 const char *inet_ntop(int, const void *, char *, socklen_t); 113 const char *inet_ntop(int, const void *, char *, socklen_t);
129 int inet_pton(int, const char *, void *); 114 int inet_pton(int, const char *, void *);
130 115
131 int ascii2addr(int, const char *, void *); 116 int ascii2addr(int, const char *, void *);
132 char *addr2ascii(int, const void *, int, char *); 117 char *addr2ascii(int, const void *, int, char *);
133 int inet_aton(const char *, struct in_addr *); 118 int inet_aton(const char *, struct in_addr *);
134 in_addr_t inet_lnaof(struct in_addr); 119 in_addr_t inet_lnaof(struct in_addr);
135 struct in_addr inet_makeaddr(in_addr_t, in_addr_t); 120 struct in_addr inet_makeaddr(in_addr_t, in_addr_t);
136 char * inet_neta(in_addr_t, char *, size_t); 121 char * inet_neta(in_addr_t, char *, size_t);
137 in_addr_t inet_netof(struct in_addr); 122 in_addr_t inet_netof(struct in_addr);
138 in_addr_t inet_network(const char *); 123 in_addr_t inet_network(const char *);
139 char *inet_net_ntop(int, const void *, int, char *, size_t); 124 char *inet_net_ntop(int, const void *, int, char *, size_t);
140 int inet_net_pton(int, const char *, void *, size_t); 125 int inet_net_pton(int, const char *, void *, size_t);
141 unsigned inet_nsap_addr(const char *, unsigned char *, int); 126 unsigned inet_nsap_addr(const char *, unsigned char *, int);
142 char *inet_nsap_ntoa(int, const unsigned char *, char *); 127 char *inet_nsap_ntoa(int, const unsigned char *, char *);
143 __END_DECLS 128 __END_DECLS
144 129
145 #endif /* !_ARPA_INET_H_ */ 130 #endif /* !_ARPA_INET_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698