Initial checkin of RTEMS operating-system-specific routines.
This commit is contained in:
69
src/libCom/osi/os/RTEMS/osdSock.h
Normal file
69
src/libCom/osi/os/RTEMS/osdSock.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* RTEMS osiSock.h
|
||||
* $Id$
|
||||
* Author: W. Eric Norum
|
||||
* eric@cls.usask.ca
|
||||
* (306) 966-6055
|
||||
*/
|
||||
#ifndef osiSockH
|
||||
#define osiSockH
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef int SOCKET;
|
||||
#define INVALID_SOCKET (-1)
|
||||
#define SOCKERRNO errno
|
||||
#define socket_close(S) close(S)
|
||||
#define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
typedef int osiSockIoctl_t;
|
||||
|
||||
#define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
|
||||
|
||||
#define SOCKERRSTR(ERRNO_IN) (strerror(ERRNO_IN))
|
||||
|
||||
#define SOCK_EWOULDBLOCK EWOULDBLOCK
|
||||
#define SOCK_ENOBUFS ENOBUFS
|
||||
#define SOCK_ECONNRESET ECONNRESET
|
||||
#define SOCK_ETIMEDOUT ETIMEDOUT
|
||||
#define SOCK_EADDRINUSE EADDRINUSE
|
||||
#define SOCK_ECONNREFUSED ECONNREFUSED
|
||||
#define SOCK_ECONNABORTED ECONNABORTED
|
||||
#define SOCK_EINPROGRESS EINPROGRESS
|
||||
#define SOCK_EISCONN EISCONN
|
||||
#define SOCK_EALREADY EALREADY
|
||||
#define SOCK_EINVAL EINVAL
|
||||
#define SOCK_EINTR EINTR
|
||||
#define SOCK_EPIPE EPIPE
|
||||
#define SOCK_EMFILE EMFILE
|
||||
|
||||
#define bzero(p,n) memset(p,0,n)
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
|
||||
|
||||
#ifndef INADDR_LOOPBACK
|
||||
#define INADDR_LOOPBACK (u_long)0x7F000001
|
||||
#endif
|
||||
|
||||
#endif /*osiSockH*/
|
||||
13
src/libCom/osi/os/RTEMS/osiFileName.h
Normal file
13
src/libCom/osi/os/RTEMS/osiFileName.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* RTEMS osiFileName.h
|
||||
* $Id$
|
||||
* Author: W. Eric Norum
|
||||
* eric@cls.usask.ca
|
||||
* (306) 966-6055
|
||||
*/
|
||||
#ifndef osiFileNameH
|
||||
#define osiFileNameH
|
||||
|
||||
#include "unixFileName.h"
|
||||
|
||||
#endif /* osiFileNameH */
|
||||
Reference in New Issue
Block a user