Commit 8762418d authored by Damien George's avatar Damien George
Browse files

drivers, cc3000: Wrap exported functions in a macro for renaming.

parent 9d2bf9c4
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __COMMON_H__ #ifndef __CC3000_COMMON_H__
#define __COMMON_H__ #define __CC3000_COMMON_H__
#include "data_types.h" #include "data_types.h"
...@@ -43,6 +43,11 @@ ...@@ -43,6 +43,11 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
//*****************************************************************************
// Prefix exported names to avoid name clash
//*****************************************************************************
#define CC3000_EXPORT(name) cc3000_ ## name
//***************************************************************************** //*****************************************************************************
// //
// If building with a C++ compiler, make all of the definitions in this header // If building with a C++ compiler, make all of the definitions in this header
...@@ -53,7 +58,7 @@ ...@@ -53,7 +58,7 @@
extern "C" { extern "C" {
#endif #endif
extern int errno; extern int CC3000_EXPORT(errno);
//***************************************************************************** //*****************************************************************************
// ERROR CODES // ERROR CODES
...@@ -357,4 +362,4 @@ extern UINT32 STREAM_TO_UINT32_f(CHAR* p, UINT16 offset); ...@@ -357,4 +362,4 @@ extern UINT32 STREAM_TO_UINT32_f(CHAR* p, UINT16 offset);
} }
#endif // __cplusplus #endif // __cplusplus
#endif // __COMMON_H__ #endif // __CC3000_COMMON_H__
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
*****************************************************************************/ *****************************************************************************/
#ifndef __SPI_H__ #ifndef __CC3000_SPI_H__
#define __SPI_H__ #define __CC3000_SPI_H__
//***************************************************************************** //*****************************************************************************
// //
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __DATA_TYPES__ #ifndef __CC3000_DATA_TYPES__
#define __DATA_TYPES__ #define __CC3000_DATA_TYPES__
//***************************************************************************** //*****************************************************************************
// //
...@@ -104,4 +104,4 @@ typedef char CHAR; ...@@ -104,4 +104,4 @@ typedef char CHAR;
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __DATA_TYPE__ */ #endif /* __CC3000_DATA_TYPES__ */
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __EVENT_HANDLER_H__ #ifndef __CC3000_EVENT_HANDLER_H__
#define __EVENT_HANDLER_H__ #define __CC3000_EVENT_HANDLER_H__
#include "hci.h" #include "hci.h"
#include "socket.h" #include "socket.h"
...@@ -162,5 +162,5 @@ typedef struct _bsd_gethostbyname_return_t ...@@ -162,5 +162,5 @@ typedef struct _bsd_gethostbyname_return_t
} }
#endif // __cplusplus #endif // __cplusplus
#endif // __EVENT_HANDLER_H__ #endif // __CC3000_EVENT_HANDLER_H__
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __HCI_H__ #ifndef __CC3000_HCI_H__
#define __HCI_H__ #define __CC3000_HCI_H__
#include "cc3000_common.h" #include "cc3000_common.h"
...@@ -327,4 +327,4 @@ extern void hci_patch_send(UINT8 ucOpcode, UINT8 *pucBuff, CHAR *patch, UINT16 u ...@@ -327,4 +327,4 @@ extern void hci_patch_send(UINT8 ucOpcode, UINT8 *pucBuff, CHAR *patch, UINT16 u
} }
#endif // __cplusplus #endif // __cplusplus
#endif // __HCI_H__ #endif // __CC3000_HCI_H__
...@@ -32,24 +32,9 @@ ...@@ -32,24 +32,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __HOST_DRIVER_VERSION_H__ #ifndef __CC3000_HOST_DRIVER_VERSION_H__
#define __HOST_DRIVER_VERSION_H__ #define __CC3000_HOST_DRIVER_VERSION_H__
#define DRIVER_VERSION_NUMBER 15 #define DRIVER_VERSION_NUMBER 15
#endif // __CC3000_HOST_DRIVER_VERSION_H__
#endif // __VERSION_H__
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __NETAPP_H__ #ifndef __CC3000_NETAPP_H__
#define __NETAPP_H__ #define __CC3000_NETAPP_H__
#include "data_types.h" #include "data_types.h"
...@@ -339,5 +339,5 @@ INT32 netapp_set_debug_level(UINT32 ulLevel); ...@@ -339,5 +339,5 @@ INT32 netapp_set_debug_level(UINT32 ulLevel);
} }
#endif // __cplusplus #endif // __cplusplus
#endif // __NETAPP_H__ #endif // __CC3000_NETAPP_H__
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __NVRAM_H__ #ifndef __CC3000_NVRAM_H__
#define __NVRAM_H__ #define __CC3000_NVRAM_H__
#include "cc3000_common.h" #include "cc3000_common.h"
...@@ -245,4 +245,4 @@ extern INT32 nvmem_create_entry(UINT32 file_id, UINT32 newlen); ...@@ -245,4 +245,4 @@ extern INT32 nvmem_create_entry(UINT32 file_id, UINT32 newlen);
} }
#endif // __cplusplus #endif // __cplusplus
#endif // __NVRAM_H__ #endif // __CC3000_NVRAM_H__
#ifndef __PATCH_PROG_H__ #ifndef __CC3000_PATCH_PROG_H__
#define __PATCH_PROG_H__ #define __CC3000_PATCH_PROG_H__
extern unsigned short fw_length; extern unsigned short fw_length;
extern const unsigned char fw_patch[]; extern const unsigned char fw_patch[];
...@@ -8,4 +8,4 @@ extern const unsigned char wlan_drv_patch[]; ...@@ -8,4 +8,4 @@ extern const unsigned char wlan_drv_patch[];
extern const unsigned char cRMdefaultParams[128]; extern const unsigned char cRMdefaultParams[128];
void patch_prog_start(); void patch_prog_start();
#endif //__PATCH_PROG_H__ #endif //__CC3000_PATCH_PROG_H__
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __SECURITY__ #ifndef __CC3000_SECURITY__
#define __SECURITY__ #define __CC3000_SECURITY__
#include "nvmem.h" #include "nvmem.h"
......
...@@ -32,9 +32,10 @@ ...@@ -32,9 +32,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __SOCKET_H__ #ifndef __CC3000_SOCKET_H__
#define __SOCKET_H__ #define __CC3000_SOCKET_H__
#include "cc3000_common.h"
//***************************************************************************** //*****************************************************************************
// //
...@@ -215,7 +216,7 @@ typedef struct ...@@ -215,7 +216,7 @@ typedef struct
//! application layer to obtain a socket handle. //! application layer to obtain a socket handle.
// //
//***************************************************************************** //*****************************************************************************
extern INT16 socket(INT32 domain, INT32 type, INT32 protocol); extern INT16 CC3000_EXPORT(socket)(INT32 domain, INT32 type, INT32 protocol);
//***************************************************************************** //*****************************************************************************
// //
...@@ -228,7 +229,7 @@ extern INT16 socket(INT32 domain, INT32 type, INT32 protocol); ...@@ -228,7 +229,7 @@ extern INT16 socket(INT32 domain, INT32 type, INT32 protocol);
//! @brief The socket function closes a created socket. //! @brief The socket function closes a created socket.
// //
//***************************************************************************** //*****************************************************************************
extern INT32 closesocket(INT32 sd); extern INT32 CC3000_EXPORT(closesocket)(INT32 sd);
//***************************************************************************** //*****************************************************************************
// //
...@@ -274,7 +275,7 @@ extern INT32 closesocket(INT32 sd); ...@@ -274,7 +275,7 @@ extern INT32 closesocket(INT32 sd);
//! @sa socket ; bind ; listen //! @sa socket ; bind ; listen
// //
//***************************************************************************** //*****************************************************************************
extern INT32 accept(INT32 sd, sockaddr *addr, socklen_t *addrlen); extern INT32 CC3000_EXPORT(accept)(INT32 sd, sockaddr *addr, socklen_t *addrlen);
//***************************************************************************** //*****************************************************************************
// //
...@@ -298,7 +299,7 @@ extern INT32 accept(INT32 sd, sockaddr *addr, socklen_t *addrlen); ...@@ -298,7 +299,7 @@ extern INT32 accept(INT32 sd, sockaddr *addr, socklen_t *addrlen);
//! @sa socket ; accept ; listen //! @sa socket ; accept ; listen
// //
//***************************************************************************** //*****************************************************************************
extern INT32 bind(INT32 sd, const sockaddr *addr, INT32 addrlen); extern INT32 CC3000_EXPORT(bind)(INT32 sd, const sockaddr *addr, INT32 addrlen);
//***************************************************************************** //*****************************************************************************
// //
...@@ -322,7 +323,7 @@ extern INT32 bind(INT32 sd, const sockaddr *addr, INT32 addrlen); ...@@ -322,7 +323,7 @@ extern INT32 bind(INT32 sd, const sockaddr *addr, INT32 addrlen);
//! @note On this version, backlog is not supported //! @note On this version, backlog is not supported
// //
//***************************************************************************** //*****************************************************************************
extern INT32 listen(INT32 sd, INT32 backlog); extern INT32 CC3000_EXPORT(listen)(INT32 sd, INT32 backlog);
//***************************************************************************** //*****************************************************************************
// //
...@@ -343,7 +344,7 @@ extern INT32 listen(INT32 sd, INT32 backlog); ...@@ -343,7 +344,7 @@ extern INT32 listen(INT32 sd, INT32 backlog);
// //
//***************************************************************************** //*****************************************************************************
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
extern INT16 gethostbyname(CHAR * hostname, UINT16 usNameLen, UINT32* out_ip_addr); extern INT16 CC3000_EXPORT(gethostbyname)(CHAR * hostname, UINT16 usNameLen, UINT32* out_ip_addr);
#endif #endif
...@@ -375,7 +376,7 @@ extern INT16 gethostbyname(CHAR * hostname, UINT16 usNameLen, UINT32* out_ip_add ...@@ -375,7 +376,7 @@ extern INT16 gethostbyname(CHAR * hostname, UINT16 usNameLen, UINT32* out_ip_add
//! @sa socket //! @sa socket
// //
//***************************************************************************** //*****************************************************************************
extern INT32 connect(INT32 sd, const sockaddr *addr, INT32 addrlen); extern INT32 CC3000_EXPORT(connect)(INT32 sd, const sockaddr *addr, INT32 addrlen);
//***************************************************************************** //*****************************************************************************
// //
...@@ -414,7 +415,7 @@ extern INT32 connect(INT32 sd, const sockaddr *addr, INT32 addrlen); ...@@ -414,7 +415,7 @@ extern INT32 connect(INT32 sd, const sockaddr *addr, INT32 addrlen);
//! @sa socket //! @sa socket
// //
//***************************************************************************** //*****************************************************************************
extern INT16 select(INT32 nfds, fd_set *readsds, fd_set *writesds, extern INT16 CC3000_EXPORT(select)(INT32 nfds, fd_set *readsds, fd_set *writesds,
fd_set *exceptsds, struct timeval *timeout); fd_set *exceptsds, struct timeval *timeout);
//***************************************************************************** //*****************************************************************************
...@@ -464,7 +465,7 @@ extern INT16 select(INT32 nfds, fd_set *readsds, fd_set *writesds, ...@@ -464,7 +465,7 @@ extern INT16 select(INT32 nfds, fd_set *readsds, fd_set *writesds,
// //
//***************************************************************************** //*****************************************************************************
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
extern INT16 setsockopt(INT32 sd, INT32 level, INT32 optname, const void *optval, extern INT16 CC3000_EXPORT(setsockopt)(INT32 sd, INT32 level, INT32 optname, const void *optval,
socklen_t optlen); socklen_t optlen);
#endif #endif
//***************************************************************************** //*****************************************************************************
...@@ -513,7 +514,7 @@ extern INT16 setsockopt(INT32 sd, INT32 level, INT32 optname, const void *optval ...@@ -513,7 +514,7 @@ extern INT16 setsockopt(INT32 sd, INT32 level, INT32 optname, const void *optval
//! @sa setsockopt //! @sa setsockopt
// //
//***************************************************************************** //*****************************************************************************
extern INT16 getsockopt(INT32 sd, INT32 level, INT32 optname, void *optval, extern INT16 CC3000_EXPORT(getsockopt)(INT32 sd, INT32 level, INT32 optname, void *optval,
socklen_t *optlen); socklen_t *optlen);
//***************************************************************************** //*****************************************************************************
...@@ -537,7 +538,7 @@ extern INT16 getsockopt(INT32 sd, INT32 level, INT32 optname, void *optval, ...@@ -537,7 +538,7 @@ extern INT16 getsockopt(INT32 sd, INT32 level, INT32 optname, void *optval,
//! @Note On this version, only blocking mode is supported. //! @Note On this version, only blocking mode is supported.
// //
//***************************************************************************** //*****************************************************************************
extern INT16 recv(INT32 sd, void *buf, INT32 len, INT32 flags); extern INT16 CC3000_EXPORT(recv)(INT32 sd, void *buf, INT32 len, INT32 flags);
//***************************************************************************** //*****************************************************************************
// //
...@@ -567,7 +568,7 @@ extern INT16 recv(INT32 sd, void *buf, INT32 len, INT32 flags); ...@@ -567,7 +568,7 @@ extern INT16 recv(INT32 sd, void *buf, INT32 len, INT32 flags);
//! @Note On this version, only blocking mode is supported. //! @Note On this version, only blocking mode is supported.
// //
//***************************************************************************** //*****************************************************************************
extern INT16 recvfrom(INT32 sd, void *buf, INT32 len, INT32 flags, sockaddr *from, extern INT16 CC3000_EXPORT(recvfrom)(INT32 sd, void *buf, INT32 len, INT32 flags, sockaddr *from,
socklen_t *fromlen); socklen_t *fromlen);
//***************************************************************************** //*****************************************************************************
...@@ -592,7 +593,7 @@ extern INT16 recvfrom(INT32 sd, void *buf, INT32 len, INT32 flags, sockaddr *fro ...@@ -592,7 +593,7 @@ extern INT16 recvfrom(INT32 sd, void *buf, INT32 len, INT32 flags, sockaddr *fro
// //
//***************************************************************************** //*****************************************************************************
extern INT16 send(INT32 sd, const void *buf, INT32 len, INT32 flags); extern INT16 CC3000_EXPORT(send)(INT32 sd, const void *buf, INT32 len, INT32 flags);
//***************************************************************************** //*****************************************************************************
// //
...@@ -620,7 +621,7 @@ extern INT16 send(INT32 sd, const void *buf, INT32 len, INT32 flags); ...@@ -620,7 +621,7 @@ extern INT16 send(INT32 sd, const void *buf, INT32 len, INT32 flags);
// //
//***************************************************************************** //*****************************************************************************
extern INT16 sendto(INT32 sd, const void *buf, INT32 len, INT32 flags, extern INT16 CC3000_EXPORT(sendto)(INT32 sd, const void *buf, INT32 len, INT32 flags,
const sockaddr *to, socklen_t tolen); const sockaddr *to, socklen_t tolen);
//***************************************************************************** //*****************************************************************************
...@@ -639,7 +640,7 @@ extern INT16 sendto(INT32 sd, const void *buf, INT32 len, INT32 flags, ...@@ -639,7 +640,7 @@ extern INT16 sendto(INT32 sd, const void *buf, INT32 len, INT32 flags,
//! @brief Set CC3000 in mDNS advertiser mode in order to advertise itself. //! @brief Set CC3000 in mDNS advertiser mode in order to advertise itself.
// //
//***************************************************************************** //*****************************************************************************
extern INT16 mdnsAdvertiser(UINT16 mdnsEnabled, CHAR * deviceServiceName, UINT16 deviceServiceNameLength); extern INT16 CC3000_EXPORT(mdnsAdvertiser)(UINT16 mdnsEnabled, CHAR * deviceServiceName, UINT16 deviceServiceNameLength);
//***************************************************************************** //*****************************************************************************
...@@ -653,7 +654,7 @@ extern INT16 mdnsAdvertiser(UINT16 mdnsEnabled, CHAR * deviceServiceName, UINT16 ...@@ -653,7 +654,7 @@ extern INT16 mdnsAdvertiser(UINT16 mdnsEnabled, CHAR * deviceServiceName, UINT16
//! @brief Returns the MSS value of a TCP connection according to the socket descriptor //! @brief Returns the MSS value of a TCP connection according to the socket descriptor
// //
//***************************************************************************** //*****************************************************************************
extern UINT16 getmssvalue (INT32 sd); extern UINT16 CC3000_EXPORT(getmssvalue) (INT32 sd);
//***************************************************************************** //*****************************************************************************
// //
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __WLAN_H__ #ifndef __CC3000_WLAN_H__
#define __WLAN_H__ #define __CC3000_WLAN_H__
#include "cc3000_common.h" #include "cc3000_common.h"
...@@ -515,4 +515,4 @@ extern INT32 wlan_smart_config_process(void); ...@@ -515,4 +515,4 @@ extern INT32 wlan_smart_config_process(void);
} }
#endif // __cplusplus #endif // __cplusplus
#endif // __WLAN_H__ #endif // __CC3000_WLAN_H__
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define ENOSPC (28) #define ENOSPC (28)
#define EAFNOSUPPORT (106) #define EAFNOSUPPORT (106)
#define SET_ERRNO(err) (errno=-err) #define SET_ERRNO(err) (CC3000_EXPORT(errno)=-err)
/* /*
* Format an IPv4 address, more or less like inet_ntoa(). * Format an IPv4 address, more or less like inet_ntoa().
......
...@@ -31,7 +31,7 @@ static int inet_pton6(const char *src, unsigned char *dst); ...@@ -31,7 +31,7 @@ static int inet_pton6(const char *src, unsigned char *dst);
#endif #endif
#define EAFNOSUPPORT (106) #define EAFNOSUPPORT (106)
#define SET_ERRNO(err) (errno=-err) #define SET_ERRNO(err) (CC3000_EXPORT(errno)=-err)
/* int /* int
* inet_pton(af, src, dst) * inet_pton(af, src, dst)
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
//! regarding the buffers available. //! regarding the buffers available.
// //
//***************************************************************************** //*****************************************************************************
INT16 HostFlowControlConsumeBuff(INT16 sd) static INT16 HostFlowControlConsumeBuff(INT16 sd)
{ {
#ifndef SEND_NON_BLOCKING #ifndef SEND_NON_BLOCKING
/* wait in busy loop */ /* wait in busy loop */
...@@ -119,9 +119,9 @@ INT16 HostFlowControlConsumeBuff(INT16 sd) ...@@ -119,9 +119,9 @@ INT16 HostFlowControlConsumeBuff(INT16 sd)
// Note that the buffer will not be allocated in this case // Note that the buffer will not be allocated in this case
if (tSLInformation.slTransmitDataError != 0) if (tSLInformation.slTransmitDataError != 0)
{ {
errno = tSLInformation.slTransmitDataError; CC3000_EXPORT(errno) = tSLInformation.slTransmitDataError;
tSLInformation.slTransmitDataError = 0; tSLInformation.slTransmitDataError = 0;
return errno; return CC3000_EXPORT(errno);
} }
if(SOCKET_STATUS_ACTIVE != get_socket_active_status(sd)) if(SOCKET_STATUS_ACTIVE != get_socket_active_status(sd))
...@@ -138,9 +138,9 @@ INT16 HostFlowControlConsumeBuff(INT16 sd) ...@@ -138,9 +138,9 @@ INT16 HostFlowControlConsumeBuff(INT16 sd)
// Note that the buffer will not be allocated in this case // Note that the buffer will not be allocated in this case
if (tSLInformation.slTransmitDataError != 0) if (tSLInformation.slTransmitDataError != 0)
{ {
errno = tSLInformation.slTransmitDataError; CC3000_EXPORT(errno) = tSLInformation.slTransmitDataError;
tSLInformation.slTransmitDataError = 0; tSLInformation.slTransmitDataError = 0;
return errno; return CC3000_EXPORT(errno);
} }
if(SOCKET_STATUS_ACTIVE != get_socket_active_status(sd)) if(SOCKET_STATUS_ACTIVE != get_socket_active_status(sd))
return -1; return -1;
...@@ -182,7 +182,7 @@ INT16 HostFlowControlConsumeBuff(INT16 sd) ...@@ -182,7 +182,7 @@ INT16 HostFlowControlConsumeBuff(INT16 sd)
// //
//***************************************************************************** //*****************************************************************************
INT16 socket(INT32 domain, INT32 type, INT32 protocol) INT16 CC3000_EXPORT(socket)(INT32 domain, INT32 type, INT32 protocol)
{ {
INT32 ret; INT32 ret;
UINT8 *ptr, *args; UINT8 *ptr, *args;
...@@ -203,7 +203,7 @@ INT16 socket(INT32 domain, INT32 type, INT32 protocol) ...@@ -203,7 +203,7 @@ INT16 socket(INT32 domain, INT32 type, INT32 protocol)
SimpleLinkWaitEvent(HCI_CMND_SOCKET, &ret); SimpleLinkWaitEvent(HCI_CMND_SOCKET, &ret);
// Process the event // Process the event
errno = ret; CC3000_EXPORT(errno) = ret;
set_socket_active_status(ret, SOCKET_STATUS_ACTIVE); set_socket_active_status(ret, SOCKET_STATUS_ACTIVE);
...@@ -222,7 +222,7 @@ INT16 socket(INT32 domain, INT32 type, INT32 protocol) ...@@ -222,7 +222,7 @@ INT16 socket(INT32 domain, INT32 type, INT32 protocol)
// //
//***************************************************************************** //*****************************************************************************
INT32 closesocket(INT32 sd) INT32 CC3000_EXPORT(closesocket)(INT32 sd)
{ {
INT32 ret; INT32 ret;
UINT8 *ptr, *args; UINT8 *ptr, *args;
...@@ -240,7 +240,7 @@ INT32 closesocket(INT32 sd) ...@@ -240,7 +240,7 @@ INT32 closesocket(INT32 sd)