From 1bb56fb39d8db0c9a419818f82fa7e517cad55bc Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 16 Jun 2009 23:23:31 +0000 Subject: Reserved word 'private' in C header files is a problem for C++ git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1890 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/net/connect.c | 10 +++++----- nuttx/net/net_close.c | 8 ++++---- nuttx/net/net_poll.c | 18 +++++++++--------- nuttx/net/recvfrom.c | 28 ++++++++++++++-------------- nuttx/net/send.c | 10 +++++----- nuttx/net/sendto.c | 12 ++++++------ nuttx/net/uip/uip_callback.c | 4 ++-- nuttx/net/uip/uip_icmpping.c | 10 +++++----- 8 files changed, 50 insertions(+), 50 deletions(-) (limited to 'nuttx/net') diff --git a/nuttx/net/connect.c b/nuttx/net/connect.c index 9f9818d33..b530fd4d8 100644 --- a/nuttx/net/connect.c +++ b/nuttx/net/connect.c @@ -76,7 +76,7 @@ static inline int tcp_setup_callbacks(FAR struct socket *psock, FAR struct tcp_connect_s *pstate); static inline void tcp_teardown_callbacks(struct tcp_connect_s *pstate, int status); static uint16 tcp_connect_interrupt(struct uip_driver_s *dev, void *pvconn, - void *pvprivate, uint16 flags); + void *pvpriv, uint16 flags); #ifdef CONFIG_NET_IPv6 static inline int tcp_connect(FAR struct socket *psock, const struct sockaddr_in6 *inaddr); #else @@ -161,7 +161,7 @@ static inline int tcp_setup_callbacks(FAR struct socket *psock, if (pstate->tc_cb) { pstate->tc_cb->flags = UIP_NEWDATA|UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT|UIP_CONNECTED; - pstate->tc_cb->private = (void*)pstate; + pstate->tc_cb->priv = (void*)pstate; pstate->tc_cb->event = tcp_connect_interrupt; /* Set up to receive callbacks on connection-related events */ @@ -223,13 +223,13 @@ static inline void tcp_teardown_callbacks(struct tcp_connect_s *pstate, int stat #ifdef CONFIG_NET_TCP static uint16 tcp_connect_interrupt(struct uip_driver_s *dev, void *pvconn, - void *pvprivate, uint16 flags) + void *pvpriv, uint16 flags) { - struct tcp_connect_s *pstate = (struct tcp_connect_s *)pvprivate; + struct tcp_connect_s *pstate = (struct tcp_connect_s *)pvpriv; nvdbg("flags: %04x\n", flags); - /* 'private' might be null in some race conditions (?) */ + /* 'priv' might be null in some race conditions (?) */ if (pstate) { diff --git a/nuttx/net/net_close.c b/nuttx/net/net_close.c index f8de0614a..4a486d972 100644 --- a/nuttx/net/net_close.c +++ b/nuttx/net/net_close.c @@ -88,9 +88,9 @@ struct tcp_close_s #ifdef CONFIG_NET_TCP static uint16 netclose_interrupt(struct uip_driver_s *dev, void *pvconn, - void *pvprivate, uint16 flags) + void *pvpriv, uint16 flags) { - struct tcp_close_s *pstate = (struct tcp_close_s *)pvprivate; + struct tcp_close_s *pstate = (struct tcp_close_s *)pvpriv; nvdbg("flags: %04x\n", flags); @@ -105,7 +105,7 @@ static uint16 netclose_interrupt(struct uip_driver_s *dev, void *pvconn, /* The disconnection is complete */ pstate->cl_cb->flags = 0; - pstate->cl_cb->private = NULL; + pstate->cl_cb->priv = NULL; pstate->cl_cb->event = NULL; sem_post(&pstate->cl_sem); nvdbg("Resuming\n"); @@ -167,7 +167,7 @@ static inline void netclose_disconnect(FAR struct socket *psock) sem_init(&state.cl_sem, 0, 0); state.cl_cb->flags = UIP_NEWDATA|UIP_POLL|UIP_CLOSE|UIP_ABORT; - state.cl_cb->private = (void*)&state; + state.cl_cb->priv = (void*)&state; state.cl_cb->event = netclose_interrupt; /* Notify the device driver of the availaibilty of TX data */ diff --git a/nuttx/net/net_poll.c b/nuttx/net/net_poll.c index 5e7a18133..adbd9c101 100644 --- a/nuttx/net/net_poll.c +++ b/nuttx/net/net_poll.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/net_poll.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -102,13 +102,13 @@ #ifdef HAVE_NETPOLL static uint16 poll_interrupt(struct uip_driver_s *dev, FAR void *conn, - FAR void *pvprivate, uint16 flags) + FAR void *pvpriv, uint16 flags) { - FAR struct pollfd *fds = (FAR struct pollfd *)pvprivate; + FAR struct pollfd *fds = (FAR struct pollfd *)pvpriv; nvdbg("flags: %04x\n", flags); - /* 'private' might be null in some race conditions (?) */ + /* 'priv' might be null in some race conditions (?) */ if (fds) { @@ -194,12 +194,12 @@ static inline int net_pollsetup(FAR struct socket *psock, struct pollfd *fds) /* Initialize the callbcack structure */ cb->flags = UIP_NEWDATA|UIP_BACKLOG|UIP_POLL|UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT; - cb->private = (FAR void *)fds; + cb->priv = (FAR void *)fds; cb->event = poll_interrupt; /* Save the nps reference in the poll structure for use at teardown as well */ - fds->private = (FAR void *)cb; + fds->priv = (FAR void *)cb; /* Check for read data availability now */ @@ -246,7 +246,7 @@ static inline int net_pollteardown(FAR struct socket *psock, struct pollfd *fds) /* Sanity check */ #ifdef CONFIG_DEBUG - if (!conn || !fds->private) + if (!conn || !fds->priv) { return -EINVAL; } @@ -254,7 +254,7 @@ static inline int net_pollteardown(FAR struct socket *psock, struct pollfd *fds) /* Recover the socket descriptor poll state info from the poll structure */ - cb = (FAR struct uip_callback_s *)fds->private; + cb = (FAR struct uip_callback_s *)fds->priv; if (cb) { /* Release the callback */ @@ -265,7 +265,7 @@ static inline int net_pollteardown(FAR struct socket *psock, struct pollfd *fds) /* Release the poll/select data slot */ - fds->private = NULL; + fds->priv = NULL; } return OK; diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index 0b1c9a07a..6ff8e5724 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -359,13 +359,13 @@ static inline void recvfrom_tcpsender(struct uip_driver_s *dev, struct recvfrom_ #ifdef CONFIG_NET_TCP static uint16 recvfrom_tcpinterrupt(struct uip_driver_s *dev, void *conn, - void *pvprivate, uint16 flags) + void *pvpriv, uint16 flags) { - struct recvfrom_s *pstate = (struct recvfrom_s *)pvprivate; + struct recvfrom_s *pstate = (struct recvfrom_s *)pvpriv; nvdbg("flags: %04x\n", flags); - /* 'private' might be null in some race conditions (?) */ + /* 'priv' might be null in some race conditions (?) */ if (pstate) { @@ -400,7 +400,7 @@ static uint16 recvfrom_tcpinterrupt(struct uip_driver_s *dev, void *conn, */ pstate->rf_cb->flags = 0; - pstate->rf_cb->private = NULL; + pstate->rf_cb->priv = NULL; pstate->rf_cb->event = NULL; /* Wake up the waiting thread, returning the number of bytes @@ -428,7 +428,7 @@ static uint16 recvfrom_tcpinterrupt(struct uip_driver_s *dev, void *conn, /* Stop further callbacks */ pstate->rf_cb->flags = 0; - pstate->rf_cb->private = NULL; + pstate->rf_cb->priv = NULL; pstate->rf_cb->event = NULL; /* Report not connected */ @@ -454,7 +454,7 @@ static uint16 recvfrom_tcpinterrupt(struct uip_driver_s *dev, void *conn, nvdbg("TCP timeout\n"); pstate->rf_cb->flags = 0; - pstate->rf_cb->private = NULL; + pstate->rf_cb->priv = NULL; pstate->rf_cb->event = NULL; /* Report an error only if no data has been received */ @@ -542,13 +542,13 @@ static inline void recvfrom_udpsender(struct uip_driver_s *dev, struct recvfrom_ #ifdef CONFIG_NET_UDP static uint16 recvfrom_udpinterrupt(struct uip_driver_s *dev, void *pvconn, - void *pvprivate, uint16 flags) + void *pvpriv, uint16 flags) { - struct recvfrom_s *pstate = (struct recvfrom_s *)pvprivate; + struct recvfrom_s *pstate = (struct recvfrom_s *)pvpriv; nvdbg("flags: %04x\n", flags); - /* 'private' might be null in some race conditions (?) */ + /* 'priv' might be null in some race conditions (?) */ if (pstate) { @@ -567,7 +567,7 @@ static uint16 recvfrom_udpinterrupt(struct uip_driver_s *dev, void *pvconn, /* Don't allow any further UDP call backs. */ pstate->rf_cb->flags = 0; - pstate->rf_cb->private = NULL; + pstate->rf_cb->priv = NULL; pstate->rf_cb->event = NULL; /* Save the sender's address in the caller's 'from' location */ @@ -594,7 +594,7 @@ static uint16 recvfrom_udpinterrupt(struct uip_driver_s *dev, void *pvconn, /* Stop further callbacks */ pstate->rf_cb->flags = 0; - pstate->rf_cb->private = NULL; + pstate->rf_cb->priv = NULL; pstate->rf_cb->event = NULL; /* Report not connected */ @@ -622,7 +622,7 @@ static uint16 recvfrom_udpinterrupt(struct uip_driver_s *dev, void *pvconn, /* Stop further callbacks */ pstate->rf_cb->flags = 0; - pstate->rf_cb->private = NULL; + pstate->rf_cb->priv = NULL; pstate->rf_cb->event = NULL; /* Report a timeout error */ @@ -795,7 +795,7 @@ static ssize_t udp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Set up the callback in the connection */ state.rf_cb->flags = UIP_NEWDATA|UIP_POLL|UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT; - state.rf_cb->private = (void*)&state; + state.rf_cb->priv = (void*)&state; state.rf_cb->event = recvfrom_udpinterrupt; /* Enable the UDP socket */ @@ -898,7 +898,7 @@ static ssize_t tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, if (state.rf_cb) { state.rf_cb->flags = UIP_NEWDATA|UIP_POLL|UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT; - state.rf_cb->private = (void*)&state; + state.rf_cb->priv = (void*)&state; state.rf_cb->event = recvfrom_tcpinterrupt; /* Wait for either the receive to complete or for an error/timeout to occur. diff --git a/nuttx/net/send.c b/nuttx/net/send.c index 5ec9e47ee..f3d04c1a5 100644 --- a/nuttx/net/send.c +++ b/nuttx/net/send.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/send.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -196,10 +196,10 @@ static inline int send_timeout(struct send_s *pstate) ****************************************************************************/ static uint16 send_interrupt(struct uip_driver_s *dev, void *pvconn, - void *pvprivate, uint16 flags) + void *pvpriv, uint16 flags) { struct uip_conn *conn = (struct uip_conn*)pvconn; - struct send_s *pstate = (struct send_s *)pvprivate; + struct send_s *pstate = (struct send_s *)pvpriv; nvdbg("flags: %04x acked: %d sent: %d\n", flags, pstate->snd_acked, pstate->snd_sent); @@ -328,7 +328,7 @@ end_wait: /* Do not allow any further callbacks */ pstate->snd_cb->flags = 0; - pstate->snd_cb->private = NULL; + pstate->snd_cb->priv = NULL; pstate->snd_cb->event = NULL; /* Wake up the waiting thread */ @@ -468,7 +468,7 @@ ssize_t send(int sockfd, const void *buf, size_t len, int flags) /* Set up the callback in the connection */ state.snd_cb->flags = UIP_ACKDATA|UIP_REXMIT|UIP_POLL|UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT; - state.snd_cb->private = (void*)&state; + state.snd_cb->priv = (void*)&state; state.snd_cb->event = send_interrupt; /* Notify the device driver of the availaibilty of TX data */ diff --git a/nuttx/net/sendto.c b/nuttx/net/sendto.c index 102b49797..d74275ae7 100644 --- a/nuttx/net/sendto.c +++ b/nuttx/net/sendto.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/sendto.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -82,7 +82,7 @@ struct sendto_s * Parameters: * dev The sructure of the network driver that caused the interrupt * conn An instance of the UDP connection structure cast to void * - * pvprivate An instance of struct sendto_s cast to void* + * pvpriv An instance of struct sendto_s cast to void* * flags Set of events describing why the callback was invoked * * Returned Value: @@ -94,9 +94,9 @@ struct sendto_s ****************************************************************************/ #ifdef CONFIG_NET_UDP -static uint16 sendto_interrupt(struct uip_driver_s *dev, void *conn, void *pvprivate, uint16 flags) +static uint16 sendto_interrupt(struct uip_driver_s *dev, void *conn, void *pvpriv, uint16 flags) { - struct sendto_s *pstate = (struct sendto_s *)pvprivate; + struct sendto_s *pstate = (struct sendto_s *)pvpriv; nvdbg("flags: %04x\n", flags); if (pstate) @@ -138,7 +138,7 @@ static uint16 sendto_interrupt(struct uip_driver_s *dev, void *conn, void *pvpri /* Don't allow any further call backs. */ pstate->st_cb->flags = 0; - pstate->st_cb->private = NULL; + pstate->st_cb->priv = NULL; pstate->st_cb->event = NULL; /* Wake up the waiting thread */ @@ -315,7 +315,7 @@ ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, if (state.st_cb) { state.st_cb->flags = UIP_POLL|UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT; - state.st_cb->private = (void*)&state; + state.st_cb->priv = (void*)&state; state.st_cb->event = sendto_interrupt; /* Enable the UDP socket */ diff --git a/nuttx/net/uip/uip_callback.c b/nuttx/net/uip/uip_callback.c index 60ead736f..690ef47be 100644 --- a/nuttx/net/uip/uip_callback.c +++ b/nuttx/net/uip/uip_callback.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/uip/uip_callback.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -236,7 +236,7 @@ uint16 uip_callbackexecute(FAR struct uip_driver_s *dev, void *pvconn, uint16 fl */ nvdbg("Call event=%p with flags=%04x\n", list->event, flags); - flags = list->event(dev, pvconn, list->private, flags); + flags = list->event(dev, pvconn, list->priv, flags); } /* Set up for the next time through the loop */ diff --git a/nuttx/net/uip/uip_icmpping.c b/nuttx/net/uip/uip_icmpping.c index 6c2c57c91..9a68ca543 100644 --- a/nuttx/net/uip/uip_icmpping.c +++ b/nuttx/net/uip/uip_icmpping.c @@ -134,7 +134,7 @@ static inline int ping_timeout(struct icmp_ping_s *pstate) * Parameters: * dev The structure of the network driver that caused the interrupt * conn The received packet, cast to void * - * pvprivate An instance of struct icmp_ping_s cast to void* + * pvpriv An instance of struct icmp_ping_s cast to void* * flags Set of events describing why the callback was invoked * * Returned Value: @@ -146,9 +146,9 @@ static inline int ping_timeout(struct icmp_ping_s *pstate) ****************************************************************************/ static uint16 ping_interrupt(struct uip_driver_s *dev, void *conn, - void *pvprivate, uint16 flags) + void *pvpriv, uint16 flags) { - struct icmp_ping_s *pstate = (struct icmp_ping_s *)pvprivate; + struct icmp_ping_s *pstate = (struct icmp_ping_s *)pvpriv; ubyte *ptr; int failcode = -ETIMEDOUT; int i; @@ -269,7 +269,7 @@ end_wait: /* Do not allow any further callbacks */ pstate->png_cb->flags = 0; - pstate->png_cb->private = NULL; + pstate->png_cb->priv = NULL; pstate->png_cb->event = NULL; /* Wake up the waiting thread */ @@ -334,7 +334,7 @@ int uip_ping(uip_ipaddr_t addr, uint16 id, uint16 seqno, uint16 datalen, int dse if (state.png_cb) { state.png_cb->flags = UIP_POLL|UIP_ECHOREPLY; - state.png_cb->private = (void*)&state; + state.png_cb->priv = (void*)&state; state.png_cb->event = ping_interrupt; state.png_result = -EINTR; /* Assume sem-wait interrupted by signal */ -- cgit v1.2.3