mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Added Visual Studio 2010 support and fixed some VS compilation issues.
Removed code to force blocking mode. git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@196 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
@ -82,8 +82,6 @@ extern "C" {
|
||||
#define SOCKET_READ(A,B,C) recv(A,B,C,0)
|
||||
#define SOCKET_WRITE(A,B,C) send(A,B,C,0)
|
||||
#define SOCKET_CLOSE(A) closesocket(A)
|
||||
#define SOCKET_BLOCK(A) u_long argp = 0; \
|
||||
ioctlsocket(A, FIONBIO, &argp)
|
||||
#define srandom(A) srand(A)
|
||||
#define random() rand()
|
||||
#define getpid() _getpid()
|
||||
@ -143,6 +141,7 @@ EXP_FUNC int STDCALL getdomainname(char *buf, int buf_size);
|
||||
#include <netdb.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
@ -153,8 +152,6 @@ EXP_FUNC int STDCALL getdomainname(char *buf, int buf_size);
|
||||
#define SOCKET_READ(A,B,C) read(A,B,C)
|
||||
#define SOCKET_WRITE(A,B,C) write(A,B,C)
|
||||
#define SOCKET_CLOSE(A) if (A >= 0) close(A)
|
||||
#define SOCKET_BLOCK(A) int fd = fcntl(A, F_GETFL, NULL); \
|
||||
fcntl(A, F_SETFL, fd & ~O_NONBLOCK)
|
||||
#define TTY_FLUSH()
|
||||
|
||||
#endif /* Not Win32 */
|
||||
|
Reference in New Issue
Block a user