Bladeren bron

Remove _PROTOCOL macros for gcc 3.2 compatibility

tags/v0.9.3
Marty Connor 18 jaren geleden
bovenliggende
commit
ee9ae8130a
9 gewijzigde bestanden met toevoegingen van 17 en 55 verwijderingen
  1. 4
    14
      src/include/gpxe/netdevice.h
  2. 4
    14
      src/include/gpxe/tcpip.h
  3. 1
    3
      src/net/aoe.c
  4. 1
    3
      src/net/arp.c
  5. 1
    3
      src/net/ethernet.c
  6. 2
    6
      src/net/ipv4.c
  7. 2
    6
      src/net/ipv6.c
  8. 1
    3
      src/net/tcp.c
  9. 1
    3
      src/net/udp.c

+ 4
- 14
src/include/gpxe/netdevice.h Bestand weergeven

@@ -176,21 +176,11 @@ struct net_device {
176 176
 	void *priv;
177 177
 };
178 178
 
179
-/**
180
- * Register a link-layer protocol
181
- *
182
- * @v protocol		Link-layer protocol
183
- */
184
-#define LL_PROTOCOL( protocol ) \
185
-	struct ll_protocol protocol __table ( ll_protocols, 01 )
179
+/** Declare a link-layer protocol */
180
+#define __ll_protocol  __table ( ll_protocols, 01 )
186 181
 
187
-/**
188
- * Register a network-layer protocol
189
- *
190
- * @v protocol		Network-layer protocol
191
- */
192
-#define NET_PROTOCOL( protocol ) \
193
-	struct net_protocol protocol __table ( net_protocols, 01 )
182
+/** Declare a network-layer protocol */
183
+#define __net_protocol __table ( net_protocols, 01 )
194 184
 
195 185
 /**
196 186
  * Get network device name

+ 4
- 14
src/include/gpxe/tcpip.h Bestand weergeven

@@ -94,21 +94,11 @@ struct tcpip_net_protocol {
94 94
 		       struct sockaddr_tcpip *st_dest );
95 95
 };
96 96
 
97
-/**
98
- * Register a TCP/IP transport-layer protocol
99
- *
100
- * @v protocol		Transport-layer protocol
101
- */
102
-#define TCPIP_PROTOCOL( protocol ) \
103
-	struct tcpip_protocol protocol __table ( tcpip_protocols, 01 )
97
+/** Declare a TCP/IP transport-layer protocol */
98
+#define	__tcpip_protocol __table ( tcpip_protocols, 01 )
104 99
 
105
-/**
106
- * Register a TCP/IP network-layer protocol
107
- *
108
- * @v protocol		Network-layer protocol
109
- */
110
-#define TCPIP_NET_PROTOCOL( protocol ) \
111
-	struct tcpip_net_protocol protocol __table ( tcpip_net_protocols, 01 )
100
+/** Declare a TCP/IP network-layer protocol */
101
+#define	__tcpip_net_protocol __table ( tcpip_net_protocols, 01 )
112 102
 
113 103
 extern int tcpip_rx ( struct pk_buff *pkb, uint8_t tcpip_proto,
114 104
 		      struct sockaddr_tcpip *st_src,

+ 1
- 3
src/net/aoe.c Bestand weergeven

@@ -253,14 +253,12 @@ static int aoe_rx ( struct pk_buff *pkb, struct net_device *netdev __unused,
253 253
 }
254 254
 
255 255
 /** AoE protocol */
256
-struct net_protocol aoe_protocol = {
256
+struct net_protocol aoe_protocol __net_protocol = {
257 257
 	.name = "AoE",
258 258
 	.net_proto = htons ( ETH_P_AOE ),
259 259
 	.rx = aoe_rx,
260 260
 };
261 261
 
262
-NET_PROTOCOL ( aoe_protocol );
263
-
264 262
 /**
265 263
  * Open AoE session
266 264
  *

+ 1
- 3
src/net/arp.c Bestand weergeven

@@ -287,11 +287,9 @@ arp_ntoa ( const void *net_addr __attribute__ (( unused )) ) {
287 287
 }
288 288
 
289 289
 /** ARP protocol */
290
-struct net_protocol arp_protocol = {
290
+struct net_protocol arp_protocol __net_protocol = {
291 291
 	.name = "ARP",
292 292
 	.net_proto = htons ( ETH_P_ARP ),
293 293
 	.rx = arp_rx,
294 294
 	.ntoa = arp_ntoa,
295 295
 };
296
-
297
-NET_PROTOCOL ( arp_protocol );

+ 1
- 3
src/net/ethernet.c Bestand weergeven

@@ -104,7 +104,7 @@ static const char * eth_ntoa ( const void *ll_addr ) {
104 104
 }
105 105
 
106 106
 /** Ethernet protocol */
107
-struct ll_protocol ethernet_protocol = {
107
+struct ll_protocol ethernet_protocol __ll_protocol = {
108 108
 	.name		= "Ethernet",
109 109
 	.ll_proto	= htons ( ARPHRD_ETHER ),
110 110
 	.ll_addr_len	= ETH_ALEN,
@@ -113,5 +113,3 @@ struct ll_protocol ethernet_protocol = {
113 113
 	.rx		= eth_rx,
114 114
 	.ntoa		= eth_ntoa,
115 115
 };
116
-
117
-LL_PROTOCOL ( ethernet_protocol );

+ 2
- 6
src/net/ipv4.c Bestand weergeven

@@ -499,7 +499,7 @@ static const char * ipv4_ntoa ( const void *net_addr ) {
499 499
 }
500 500
 
501 501
 /** IPv4 protocol */
502
-struct net_protocol ipv4_protocol = {
502
+struct net_protocol ipv4_protocol __net_protocol = {
503 503
 	.name = "IP",
504 504
 	.net_proto = htons ( ETH_P_IP ),
505 505
 	.net_addr_len = sizeof ( struct in_addr ),
@@ -507,17 +507,13 @@ struct net_protocol ipv4_protocol = {
507 507
 	.ntoa = ipv4_ntoa,
508 508
 };
509 509
 
510
-NET_PROTOCOL ( ipv4_protocol );
511
-
512 510
 /** IPv4 TCPIP net protocol */
513
-struct tcpip_net_protocol ipv4_tcpip_protocol = {
511
+struct tcpip_net_protocol ipv4_tcpip_protocol __tcpip_net_protocol = {
514 512
 	.name = "IPv4",
515 513
 	.sa_family = AF_INET,
516 514
 	.tx = ipv4_tx,
517 515
 };
518 516
 
519
-TCPIP_NET_PROTOCOL ( ipv4_tcpip_protocol );
520
-
521 517
 /** IPv4 ARP protocol */
522 518
 struct arp_net_protocol ipv4_arp_protocol __arp_net_protocol = {
523 519
 	.net_protocol = &ipv4_protocol,

+ 2
- 6
src/net/ipv6.c Bestand weergeven

@@ -35,7 +35,7 @@ static const char * ipv6_ntoa ( const void *net_addr ) {
35 35
 }
36 36
 
37 37
 /** IPv6 protocol */
38
-struct net_protocol ipv6_protocol = {
38
+struct net_protocol ipv6_protocol __net_protocol = {
39 39
 	.name = "IP6",
40 40
 	.net_proto = htons ( ETH_P_IPV6 ),
41 41
 	.net_addr_len = sizeof ( struct in6_addr ),
@@ -43,13 +43,9 @@ struct net_protocol ipv6_protocol = {
43 43
 	.ntoa = ipv6_ntoa,
44 44
 };
45 45
 
46
-NET_PROTOCOL ( ipv6_protocol );
47
-
48 46
 /** IPv6 TCPIP net protocol */
49
-struct tcpip_net_protocol ipv6_tcpip_protocol = {
47
+struct tcpip_net_protocol ipv6_tcpip_protocol __tcpip_net_protocol = {
50 48
 	.name = "IPv6",
51 49
 	.sa_family = AF_INET6,
52 50
 	.tx = ipv6_tx,
53 51
 };
54
-
55
-TCPIP_NET_PROTOCOL ( ipv6_tcpip_protocol );

+ 1
- 3
src/net/tcp.c Bestand weergeven

@@ -922,13 +922,11 @@ static int tcp_rx ( struct pk_buff *pkb,
922 922
 }
923 923
 
924 924
 /** TCP protocol */
925
-struct tcpip_protocol tcp_protocol = {
925
+struct tcpip_protocol tcp_protocol __tcpip_protocol = {
926 926
 	.name = "TCP",
927 927
 	.rx = tcp_rx,
928 928
 	.tcpip_proto = IP_TCP,
929 929
 	.csum_offset = 16,
930 930
 };
931 931
 
932
-TCPIP_PROTOCOL ( tcp_protocol );
933
-
934 932
 #endif /* USE_UIP */

+ 1
- 3
src/net/udp.c Bestand weergeven

@@ -267,11 +267,9 @@ static int udp_rx ( struct pk_buff *pkb, struct sockaddr_tcpip *st_src,
267 267
 	return rc;
268 268
 }
269 269
 
270
-struct tcpip_protocol udp_protocol  = {
270
+struct tcpip_protocol udp_protocol __tcpip_protocol = {
271 271
 	.name = "UDP",
272 272
 	.rx = udp_rx,
273 273
 	.tcpip_proto = IP_UDP,
274 274
 	.csum_offset = 6,
275 275
 };
276
-
277
-TCPIP_PROTOCOL ( udp_protocol );

Laden…
Annuleren
Opslaan