|
From: <wsh...@us...> - 2003-08-22 20:08:14
|
Update of /cvsroot/emc/rcslib/src/cms
In directory sc8-pr-cvs1:/tmp/cvs-serv4520/src/cms
Added Files:
Tag: wps_multiplat_dev_branch
filemem_no_config.h nml_srv_no_config.h physmem_no_config.h
recvline_no_config.h stcpopts_no_config.h ttyintf_no_config.h
udp_srv_no_config.h udpmem_no_config.h
Log Message:
.
--- NEW FILE: filemem_no_config.h ---
#ifndef FILEMEM_NO_CONFIG_H
#define FILEMEM_NO_CONFIG_H
#if defined(VXWORKS) || defined(DOS_WINDOWS) || defined(lynxosPC)
#ifdef USE_FCNTL_FILE_LOCKING
#undef USE_FCNTL_FILE_LOCKING
#endif
#endif
#if !defined(USE_FCNTL_FILE_LOCKING) && !defined(MSDOS)
#define FILEMEM_USE_SEMAPHORES
#endif
#include "rcs_defs.hh" // DOS_WINDOWS
#include <stdio.h> // FILE *, fpos_t
#ifdef FILEMEM_USE_SEMAPHORES
#include "sem.hh" // class RCS_SEMAPHORE
#if !defined(DOS_WINDOWS) && !defined(VXWORKS)
#include <sys/types.h> /* key_t */
#include <sys/ipc.h>
#include <sys/sem.h>
#endif
#include <stddef.h> /* size_t */
#ifndef KEY_T_DEFINED
#ifdef VXWORKS
typedef int key_t; /* key_t is not defined in VxWorks or Windows -- do
it here, and it should be visible
throughout all the shared mem code */
#endif
#ifdef WIN32
typedef long key_t;
#endif
#endif
#endif
#ifdef USE_FCNTL_FILE_LOCKING
#include <sys/fcntl.h>
#endif
#ifdef sunos4
// The sunos4 header files say that fgetpos and fsetpos take a pointer to a
// a long even though ANSI says they should take an fpos_t.
typedef long fpos_t;
#endif
#ifdef EXTERN_C_STD_HEADERS
extern "C"
{
#endif
#include <stdlib.h> // malloc()
#include <string.h> // strcpy(), strcmp()
#include <errno.h> // errno
#ifdef USE_FCNTL_FILE_LOCKING
#include <fcntl.h>
#endif
#if defined(USE_FCNTL_FILE_LOCKING) && defined(FILEMEM_USE_SEMAPHORES)
#error Can not compile with both defined(USE_FCNTL_FILE_LOCKING && FILEMEM_USE_SEMAPHORES)
#endif
#if defined(lynxosPC) || defined(sunos4)
// no prototypes for these in LynxOS-- how lame. Let's do them here
#include <stdio.h> /* ftell(), fpos_t */
#include <unistd.h> // SEEK_SET
static int fgetpos (FILE * stream, fpos_t * ptr);
static int fsetpos (FILE * stream, const fpos_t * ptr);
// FIXME-- test these!
int fgetpos (FILE * stream, fpos_t * ptr)
{
long retval;
retval = ftell (stream);
if (retval == -1L)
{
return -1;
}
else
{
*ptr = (fpos_t) retval;
return 0;
}
}
int fsetpos (FILE * stream, const fpos_t * ptr)
{
return fseek (stream, (long) *ptr, SEEK_SET);
}
#endif
#ifdef EXTERN_C_STD_HEADERS
}
#endif
#endif
// FILEMEM_NO_CONFIG_H
--- NEW FILE: nml_srv_no_config.h ---
#ifndef NML_SRV_NO_CONFIG_H
#define NML_SRV_NO_CONFIG_H
#include "rcs_defs.hh" /* EXTERN_C_STD_HEADERS */
#ifdef EXTERN_C_STD_HEADERS
extern "C"
{
#endif
#include <string.h> /* memcpy() */
#if defined(WIN32) && !defined(gnuwin32)
#if defined(WIN32) && !defined(USE_OLD_WINSOCK)
// Lame problem if windows.h is included before winsock2.h many redefined
// compiler errors result.
#include <winsock2.h>
#endif
#include <windows.h> /* GetCurrentProcessId(), GetCurrentThreadID() */
#else
#include <signal.h> /* kill() */
#include <sys/types.h>
#include <unistd.h> /* getpid() */
#include <sys/wait.h> /* waitpid() */
#include <stdlib.h> /* atexit() */
#ifdef VXWORKS
#include <taskLib.h> /* taskIdSelf() */
#endif
#endif
#ifdef EXTERN_C_STD_HEADERS
}
#endif
#endif
// NML_SRV_NO_CONFIG_H
--- NEW FILE: physmem_no_config.h ---
#ifndef PHYSMEM_NO_CONFIG_H
#define PHYSMEM_NO_CONFIG_H
#include "rcs_defs.hh" /* __MSDOS__, RCS_FAR, EXTERN_C_STD_HEADERS */
#ifdef WIN16
#include <windows.h> /* LPBYTE, WORD */
typedef LPBYTE LOCAL_ADDRESS_TYPE;
#else
typedef char *LOCAL_ADDRESS_TYPE;
#endif
#if defined(WIN32) && !defined(gnuwin32)
#if defined(WIN32) && !defined(USE_OLD_WINSOCK)
/* Lame problem if windows.h is included before winsock2.h many redefined
compiler errors result. */
#include <winsock2.h>
#endif
#include <windows.h> /* HANDLE */
#include "mapmem.h" /* PHYSICAL_MEMORY_INFO */
#include "gpioctl.h" /* GENPORT_WRITE_INPUT */
#endif
#if defined(USE_BIT3) && defined(WIN32)
#include "btapi.h"
#endif
/* ADDRESS TYPE MACROS --
* Under Windows Pass one of these as the _address_code for
* PHYSMEM_HANDLE */
#define NT_ISA_MEM_ADDRESS ((long) 1)
#define NT_ISA_IO_ADDRESS ((long) 2)
#include "dbg_mem.h" // DEBUG_MALLOC, DEBUG_FREE
#ifdef EXTERN_C_STD_HEADERS
extern "C"
{
#endif
#include <string.h> /* memcpy(), memset() */
#ifndef NO_STDIO
#include <stdio.h> // sprintf()
#endif
#include <stdlib.h> /* malloc() */
#ifdef lynxosPC
#include <smem.h>
#include <errno.h>
#endif
#ifdef LINUX_VME
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#endif
#ifdef VXWORKS
#include "vxWorks.h"
#include "sysLib.h" /* sysBusToLocalAdrs() */
#include "vme.h" /* VME_AM_STD_USR_DATA */
#endif
#ifdef EXTERN_C_STD_HEADERS
}
#endif
#ifdef USE_BIT3
#ifndef USING_BIT3
#define USING_BIT3
#endif
#endif
#ifdef USING_BIT3
#ifndef USE_BIT3
#define USE_BIT3
#endif
#endif
#endif
// PHYSMEM_NO_CONFIG_H
--- NEW FILE: recvline_no_config.h ---
#ifndef RECVLINE_NO_CONFIG_H
#define RECVLINE_NO_CONFIG_H
#include "rcs_defs.hh" /* _Windows */
#if (!defined(_Windows) && !defined(MSDOS)) || defined(gnuwin32)
#include <unistd.h> /* select() */
#include <sys/types.h> /* typedef fd_set, FD_ZERO, FD_SET */
#include <sys/socket.h> /* recv() */
#ifndef VXWORKS
#include <sys/time.h> /* struct timeval */
#else
#include <sys/times.h> /* struct timeval */
#endif
#else
#ifdef _Windows
#ifdef USE_OLD_WINSOCK
#include <winsock.h> /* select(), typedef fd_set, FD_ZERO, FD_SET, struct */
#else
#include <winsock2.h>
#endif
#else
#include <tklib.h> /* select(), recv(), typedef fd_set, FD_ZERO, FD_SET */
#include <tk_errno.h> /* tk_geterrno(), EWOULDBLOCK */
#endif
#endif
#include <stddef.h> /* size_t */
#include <errno.h> /* errno */
#include <stdlib.h> /* malloc(), free() */
#include <string.h> /* strerror() */
#include <math.h> /* modf(), fabs() */
#endif
// RECVLINE_NO_CONFIG_H
--- NEW FILE: stcpopts_no_config.h ---
#ifndef STCPOPTS_NO_CONFIG_H
#define STCPOPTS_NO_CONFIG_H
// This is neccessary to avoid muliple definitions of fd_set, etc when both
// RPC via PCNFS and Windows Sockets are to be available
#ifdef USE_PCNFS
#undef USE_PCNFS
#endif
#include "rcs_defs.hh" /* _Windows, EXTERN_C_STD_HEADERS */
#ifdef EXTERN_C_STD_HEADERS
extern "C"
{
#endif
#include <string.h> /* strerror() */
#ifdef CenterLine
char *strerror (int errnum);
#endif
#include <errno.h> /* errno */
#ifndef VXWORKS
#include <fcntl.h> /* fcntl(), O_NDELAY, F_SETFL */
#endif
#ifdef UNIX_LIKE_PLAT
#include <netinet/tcp.h> // TCP_NODELAY
#endif
#ifdef VXWORKS
#include <netinet/tcp.h> // TCP_NODELAY
#endif
#ifdef EXTERN_C_STD_HEADERS
}
#endif
#endif
// STCPOPTS_NO_CONFIG_H
--- NEW FILE: ttyintf_no_config.h ---
#ifndef TTYINTF_NO_CONFIG_H
#define TTYINTF_NO_CONFIG_H
#include <stdio.h>
#include <stdlib.h>
#ifdef UNIX_LIKE_PLAT
#ifndef UNIX
#define UNIX 1
#endif
#endif
#ifdef UNIX
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <termios.h>
#endif
#ifdef WIN32
#include <windows.h>
#endif
#endif
// TTYINTF_NO_CONFIG_H
--- NEW FILE: udp_srv_no_config.h ---
#ifndef UDP_SRV_NO_CONFIG_H
#define UDP_SRV_NO_CONFIG_H
#include "rcs_defs.hh" /* EXTERN_C_STD_HEADERS */
#ifdef EXTERN_C_STD_HEADERS
extern "C"
{
#endif
#include <errno.h> // errno
#ifdef UNIX_LIKE_PLAT
#include <unistd.h> // close(), getpid()
#endif
#include <string.h> // memset()
#include <stdlib.h> // exit()
#include <math.h> // ceil
#ifdef VXWORKS
#include <vxWorks.h>
#include <taskLib.h> // taskIdSelf()
#endif
#ifdef EXTERN_C_STD_HEADERS
}
#endif
#endif
// UDP_SRV_NO_CONFIG_H
--- NEW FILE: udpmem_no_config.h ---
#ifndef UDPMEM_NO_CONFIG_H
#define UDPMEM_NO_CONFIG_H
#ifdef USE_PCNFS
#undef USE_PCNFS
#endif
#include "rcs_defs.hh" /* EXTERN_C_STD_HEADERS */
#ifdef EXTERN_C_STD_HEADERS
extern "C"
{
#endif
#include <stdlib.h> /* strtod() */
#include <errno.h> /* errno */
#include <string.h> // strstr, memset,
#include <math.h> // ceil()
#include <ctype.h> // isdigit()
#ifdef EXTERN_C_STD_HEADERS
}
#endif
#endif
// UDPMEM_NO_CONFIG_H
|