Added target support for Apple's iOS devices.
Tom Pelaia II and Mark Engbretson contributed the build configuration and OS-dependent files, I modified the build config to bring it up to R3.14.12 standards and added the Release Notes.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#ifndef epicsMathh
|
||||
#define epicsMathh
|
||||
|
||||
#include <math.h>
|
||||
#include <shareLib.h>
|
||||
|
||||
#define finite(x) isfinite(x)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareExtern float epicsNAN;
|
||||
epicsShareExtern float epicsINF;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* epicsMathh */
|
||||
@@ -0,0 +1,78 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Saskatchewan
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/* osdEnv.c */
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Author: Eric Norum
|
||||
* Date: May 7, 2001
|
||||
*
|
||||
* Routines to modify/display environment variables and EPICS parameters
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include <epicsStdioRedirect.h>
|
||||
#include <errlog.h>
|
||||
#include <cantProceed.h>
|
||||
#include <envDefs.h>
|
||||
#include <osiUnistd.h>
|
||||
#include "epicsFindSymbol.h"
|
||||
|
||||
|
||||
/*
|
||||
* Set the value of an environment variable
|
||||
* Leaks memory, but the assumption is that this routine won't be
|
||||
* called often enough for the leak to be a problem.
|
||||
*/
|
||||
epicsShareFunc void epicsShareAPI epicsEnvSet (const char *name, const char *value)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
cp = mallocMustSucceed (strlen (name) + strlen (value) + 2, "epicsEnvSet");
|
||||
strcpy (cp, name);
|
||||
strcat (cp, "=");
|
||||
strcat (cp, value);
|
||||
if (putenv (cp) < 0) {
|
||||
errPrintf(
|
||||
-1L,
|
||||
__FILE__,
|
||||
__LINE__,
|
||||
"Failed to set environment parameter \"%s\" to \"%s\": %s\n",
|
||||
name,
|
||||
value,
|
||||
strerror (errno));
|
||||
free (cp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Show the value of the specified, or all, environment variables
|
||||
*/
|
||||
epicsShareFunc void epicsShareAPI epicsEnvShow (const char *name)
|
||||
{
|
||||
if (name == NULL) {
|
||||
extern char **environ;
|
||||
char **sp;
|
||||
|
||||
for (sp = environ ; (sp != NULL) && (*sp != NULL) ; sp++)
|
||||
printf ("%s\n", *sp);
|
||||
}
|
||||
else {
|
||||
const char *cp = getenv (name);
|
||||
if (cp == NULL)
|
||||
printf ("%s is not an environment variable.\n", name);
|
||||
else
|
||||
printf ("%s=%s\n", name, cp);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Saskatchewan
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Author: Eric Norum
|
||||
*/
|
||||
|
||||
#ifndef osdSockH
|
||||
#define osdSockH
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h> /* for MAXHOSTNAMELEN */
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
/*#include <sys/filio.h>
|
||||
#include <sys/sockio.h>*/
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h> /* close() and others */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef int SOCKET;
|
||||
#define INVALID_SOCKET (-1)
|
||||
#define SOCKERRNO errno
|
||||
#define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
typedef int osiSockIoctl_t;
|
||||
typedef socklen_t osiSocklen_t;
|
||||
|
||||
#define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
|
||||
|
||||
#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 SOCK_SHUTDOWN ESHUTDOWN
|
||||
#define SOCK_ENOTSOCK ENOTSOCK
|
||||
#define SOCK_EBADF EBADF
|
||||
|
||||
#ifndef SHUT_RD
|
||||
#define SHUT_RD 0
|
||||
#endif
|
||||
|
||||
#ifndef SHUT_WR
|
||||
#define SHUT_WR 1
|
||||
#endif
|
||||
|
||||
#ifndef SHUT_RDWR
|
||||
#define SHUT_RDWR 2
|
||||
#endif
|
||||
|
||||
#define ifreq_size(pifreq) ((pifreq)->ifr_addr.sa_len + sizeof((pifreq)->ifr_name))
|
||||
|
||||
#endif /*osdSockH*/
|
||||
@@ -0,0 +1,48 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
* Author: Jeff Hill
|
||||
*/
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "osiSock.h"
|
||||
#include "errlog.h"
|
||||
|
||||
epicsShareFunc void epicsShareAPI
|
||||
epicsSocketEnableAddressReuseDuringTimeWaitState ( SOCKET s )
|
||||
{
|
||||
int yes = true;
|
||||
int status;
|
||||
status = setsockopt ( s, SOL_SOCKET, SO_REUSEADDR,
|
||||
(char *) & yes, sizeof ( yes ) );
|
||||
if ( status < 0 ) {
|
||||
errlogPrintf (
|
||||
"epicsSocketEnablePortUseForDatagramFanout: "
|
||||
"unable to set SO_REUSEADDR?\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* SO_REUSEPORT is not in POSIX
|
||||
*/
|
||||
epicsShareFunc void epicsShareAPI
|
||||
epicsSocketEnableAddressUseForDatagramFanout ( SOCKET s )
|
||||
{
|
||||
int yes = true;
|
||||
int status;
|
||||
status = setsockopt ( s, SOL_SOCKET, SO_REUSEPORT,
|
||||
(char *) & yes, sizeof ( yes ) );
|
||||
if ( status < 0 ) {
|
||||
errlogPrintf (
|
||||
"epicsSocketEnablePortUseForDatagramFanout: "
|
||||
"unable to set SO_REUSEPORT?\n");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Saskatchewan
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Author: Eric Norum
|
||||
*/
|
||||
|
||||
#ifndef osdTimeh
|
||||
#define osdTimeh
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
epicsShareFunc void convertDoubleToWakeTime(double timeout,
|
||||
struct timespec *wakeTime);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* ifndef osdTimeh */
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Saskatchewan
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Author: Eric Norum
|
||||
*/
|
||||
|
||||
#ifndef osiFileNameH
|
||||
#define osiFileNameH
|
||||
|
||||
#include "unixFileName.h"
|
||||
|
||||
#endif /* osiFileNameH */
|
||||
Reference in New Issue
Block a user