Merge branch '7.0' into rtems5
This commit is contained in:
143
.appveyor.yml
Normal file
143
.appveyor.yml
Normal file
@ -0,0 +1,143 @@
|
||||
# Appveyor configuration file for EPICS Base 7 builds
|
||||
# (see also https://github.com/epics-base/ci-scripts)
|
||||
|
||||
# Version format
|
||||
version: base-{branch}-{build}
|
||||
|
||||
#---------------------------------#
|
||||
# build cache #
|
||||
#---------------------------------#
|
||||
# The AppVeyor cache allowance is way too small (1GB per account across all projects, branches and jobs)
|
||||
# to be used for the dependency builds.
|
||||
|
||||
cache:
|
||||
- C:\Users\appveyor\.tools
|
||||
|
||||
#---------------------------------#
|
||||
# repository cloning #
|
||||
#---------------------------------#
|
||||
|
||||
# Called at very beginning, before repo cloning
|
||||
init:
|
||||
# Set autocrlf to make batch files work
|
||||
- git config --global core.autocrlf true
|
||||
|
||||
# Set clone depth (do not fetch complete history)
|
||||
clone_depth: 5
|
||||
|
||||
# Skipping commits affecting only specific files
|
||||
skip_commits:
|
||||
files:
|
||||
- 'documentation/*'
|
||||
- 'startup/*'
|
||||
- '.github/*'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
|
||||
#---------------------------------#
|
||||
# build matrix configuration #
|
||||
#---------------------------------#
|
||||
|
||||
image: Visual Studio 2015
|
||||
|
||||
# Build Configurations: dll/static, regular/debug
|
||||
configuration:
|
||||
- dynamic
|
||||
- static
|
||||
- dynamic-debug
|
||||
- static-debug
|
||||
|
||||
# Environment variables: compiler toolchain, base version, setup file, ...
|
||||
environment:
|
||||
# common / default variables for all jobs
|
||||
SETUP_PATH: .ci-local:.ci
|
||||
BASE: SELF
|
||||
EPICS_TEST_IMPRECISE_TIMING: YES
|
||||
|
||||
matrix:
|
||||
- CMP: vs2019
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
- CMP: vs2017
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- CMP: vs2015
|
||||
- CMP: vs2013
|
||||
- CMP: vs2012
|
||||
- CMP: vs2010
|
||||
- CMP: gcc
|
||||
|
||||
# Platform: processor architecture
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
|
||||
# Matrix configuration: exclude sets of jobs
|
||||
matrix:
|
||||
exclude:
|
||||
# VS2012 and older installs don't have the 64 bit compiler
|
||||
- platform: x64
|
||||
CMP: vs2012
|
||||
- platform: x64
|
||||
CMP: vs2010
|
||||
# Exclude more jobs to reduce build time
|
||||
# Skip 32-bit for "middle-aged" compilers
|
||||
- platform: x86
|
||||
CMP: vs2017
|
||||
- platform: x86
|
||||
CMP: vs2015
|
||||
# MinGW debug builds use the same libraries, unlike VS
|
||||
- configuration: dynamic-debug
|
||||
CMP: gcc
|
||||
- configuration: static-debug
|
||||
CMP: gcc
|
||||
|
||||
#---------------------------------#
|
||||
# building & testing #
|
||||
#---------------------------------#
|
||||
|
||||
install:
|
||||
- cmd: git submodule update --init --recursive
|
||||
- cmd: pip install git+https://github.com/mdavidsaver/ci-core-dumper#egg=ci-core-dumper
|
||||
- cmd: python .ci/cue.py prepare
|
||||
|
||||
build_script:
|
||||
- cmd: python .ci/cue.py build
|
||||
|
||||
test_script:
|
||||
- cmd: python -m ci_core_dumper install
|
||||
- cmd: python .ci/cue.py test
|
||||
|
||||
on_finish:
|
||||
- ps: Get-ChildItem *.tap -Recurse -Force | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||
- cmd: python .ci/cue.py build test-results -s
|
||||
|
||||
on_failure:
|
||||
- cmd: python -m ci_core_dumper report
|
||||
|
||||
#---------------------------------#
|
||||
# debugging #
|
||||
#---------------------------------#
|
||||
|
||||
## if you want to connect by remote desktop to a failed build, uncomment these lines
|
||||
## note that you will need to connect within the usual build timeout limit (60 minutes)
|
||||
## so you may want to adjust the build matrix above to just build the one of interest
|
||||
|
||||
# print the connection info
|
||||
#init:
|
||||
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
# block a failed build (until the watchdog barks)
|
||||
#on_failure:
|
||||
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
#---------------------------------#
|
||||
# notifications #
|
||||
#---------------------------------#
|
||||
|
||||
notifications:
|
||||
|
||||
- provider: Email
|
||||
to:
|
||||
- core-talk@aps.anl.gov
|
||||
on_build_success: false
|
||||
|
||||
- provider: GitHubPullRequest
|
@ -80,12 +80,12 @@ IOCS_APPL_TOP = $(shell $(FULLPATHNAME) $(INSTALL_LOCATION))
|
||||
#-------------------------------------------------------
|
||||
# Silencing the build - suppress messages during 'make -s'
|
||||
NOP = :
|
||||
ECHO = @$(if $(findstring s,$(MFLAGS)),$(NOP),echo)
|
||||
QUIET_FLAG := $(if $(findstring s,$(MFLAGS)),-q,)
|
||||
ECHO = @$(if $(filter -s,$(MFLAGS)),$(NOP),echo)
|
||||
QUIET_FLAG := $(if $(filter -s,$(MFLAGS)),-q,)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Convert 'make -q' flag into '-i' for genVersionHeader.pl
|
||||
QUESTION_FLAG := $(if $(findstring q,$(MFLAGS)),-i,)
|
||||
QUESTION_FLAG := $(if $(filter -q,$(MFLAGS)),-i,)
|
||||
|
||||
#-------------------------------------------------------
|
||||
ifdef T_A
|
||||
|
@ -32,12 +32,12 @@ vpath %.l $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
include $(CONFIG)/CONFIG_ADDONS
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Set PROD, TESTPROD, OBJS, and LIBRARY
|
||||
|
||||
SCRIPTS_HOST += $(PERL_SCRIPTS)
|
||||
# PERL_SCRIPTS are installed into existing $(INSTALL_BIN) for Host systems
|
||||
|
||||
ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
|
||||
# Host targets can compile and run programs
|
||||
ifneq (,$(findstring Host,$(VALID_BUILDS)))
|
||||
LIBRARY += $(LIBRARY_HOST)
|
||||
LOADABLE_LIBRARY += $(LOADABLE_LIBRARY_HOST)
|
||||
OBJS += $(OBJS_HOST)
|
||||
@ -49,7 +49,21 @@ TESTSCRIPTS += $(TESTSCRIPTS_HOST)
|
||||
TESTPROD += $(TESTPROD_HOST)
|
||||
endif
|
||||
|
||||
ifeq ($(findstring Ioc,$(VALID_BUILDS)),Ioc)
|
||||
# Command targets have a command line and support main()
|
||||
ifneq (,$(findstring Command,$(VALID_BUILDS)))
|
||||
LIBRARY += $(LIBRARY_CMD)
|
||||
LOADABLE_LIBRARY += $(LOADABLE_LIBRARY_CMD)
|
||||
OBJS += $(OBJS_CMD)
|
||||
PROD += $(PROD_CMD)
|
||||
SCRIPTS += $(SCRIPTS_CMD)
|
||||
TARGETS += $(TARGETS_CMD)
|
||||
TESTLIBRARY += $(TESTLIBRARY_CMD)
|
||||
TESTSCRIPTS += $(TESTSCRIPTS_CMD)
|
||||
TESTPROD += $(TESTPROD_CMD)
|
||||
endif
|
||||
|
||||
# Ioc targets can run IOCs
|
||||
ifneq (,$(findstring Ioc,$(VALID_BUILDS)))
|
||||
LIBRARY += $(LIBRARY_IOC)
|
||||
LOADABLE_LIBRARY += $(LOADABLE_LIBRARY_IOC)
|
||||
OBJS += $(OBJS_IOC)
|
||||
|
@ -86,8 +86,10 @@ expand_clean:
|
||||
ASSEMBLE_TOOL ?= $(PERL) $(TOOLS)/assembleSnippets.pl
|
||||
|
||||
define COMMON_ASSEMBLY_template
|
||||
ifneq '$$($1_PATTERN)' ''
|
||||
$1_SNIPPETS += $$(foreach dir, .. $$(SRC_DIRS), \
|
||||
$$(wildcard $$(dir)/$$($1_PATTERN)))
|
||||
endif
|
||||
$(COMMON_DIR)/$1: $$($1_SNIPPETS)
|
||||
$(ECHO) "Assembling common file $$@ from snippets"
|
||||
@$(RM) $1
|
||||
@ -98,8 +100,10 @@ $(foreach asy, $(COMMON_ASSEMBLIES), \
|
||||
$(eval $(call COMMON_ASSEMBLY_template,$(strip $(asy)))))
|
||||
|
||||
define ASSEMBLY_template
|
||||
ifneq '$$($1_PATTERN)' ''
|
||||
$1_SNIPPETS += $$(foreach dir, .. $$(SRC_DIRS), \
|
||||
$$(wildcard $$(dir)/$$($1_PATTERN)))
|
||||
endif
|
||||
$1: $$($1_SNIPPETS)
|
||||
$(ECHO) "Assembling file $$@ from snippets"
|
||||
@$(RM) $$@
|
||||
|
@ -77,7 +77,7 @@ CPPFLAGS += $($(BUILD_CLASS)_CPPFLAGS) $(POSIX_CPPFLAGS) $(OPT_CPPFLAGS)\
|
||||
$(USR_CPPFLAGS) $(CMD_CPPFLAGS) $(ARCH_DEP_CPPFLAGS) $(OP_SYS_CPPFLAGS)\
|
||||
$(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS)
|
||||
|
||||
ECHO = @$(if $(findstring s,$(MFLAGS)),$(NOP),echo)
|
||||
ECHO = @$(if $(filter -s,$(MFLAGS)),$(NOP),echo)
|
||||
|
||||
#--------------------------------------------------
|
||||
# Although RTEMS uses gcc, it wants to use gcc its own way
|
||||
|
@ -8,7 +8,7 @@
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Unix valid build types
|
||||
VALID_BUILDS = Host Ioc
|
||||
VALID_BUILDS = Host Ioc Command
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Unix prefix and suffix definitions
|
||||
|
@ -12,7 +12,7 @@ include $(CONFIG)/os/CONFIG.Common.linux-x86
|
||||
ARCH_DEP_CFLAGS = -march=i386
|
||||
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
VALID_BUILDS = Ioc
|
||||
VALID_BUILDS = Ioc Command
|
||||
endif
|
||||
|
||||
# If your crosscompiler name has a GNU target prefix like <gnutarget>-gcc,
|
||||
|
@ -10,7 +10,7 @@ include $(CONFIG)/os/CONFIG.Common.linux-x86
|
||||
ARCH_DEP_CFLAGS = -march=i486
|
||||
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
VALID_BUILDS = Ioc
|
||||
VALID_BUILDS = Ioc Command
|
||||
endif
|
||||
|
||||
# If your crosscompiler name has a GNU target prefix like <gnutarget>-gcc,
|
||||
|
@ -11,7 +11,7 @@ include $(CONFIG)/os/CONFIG.Common.linux-x86
|
||||
ARCH_DEP_CFLAGS = -march=i586
|
||||
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
VALID_BUILDS = Ioc
|
||||
VALID_BUILDS = Ioc Command
|
||||
endif
|
||||
|
||||
# If your crosscompiler name has a GNU target prefix like <gnutarget>-gcc,
|
||||
|
@ -11,7 +11,7 @@ include $(CONFIG)/os/CONFIG.Common.linux-x86
|
||||
ARCH_DEP_CFLAGS = -march=i686
|
||||
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
VALID_BUILDS = Ioc
|
||||
VALID_BUILDS = Ioc Command
|
||||
endif
|
||||
|
||||
# If your crosscompiler name has a GNU target prefix like <gnutarget>-gcc,
|
||||
|
@ -10,7 +10,7 @@ include $(CONFIG)/os/CONFIG.Common.linux-x86
|
||||
ARCH_DEP_CFLAGS += -march=athlon-mp -mfpmath=sse
|
||||
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
VALID_BUILDS = Ioc
|
||||
VALID_BUILDS = Ioc Command
|
||||
endif
|
||||
|
||||
# If your crosscompiler name has a GNU target prefix like <gnutarget>-gcc,
|
||||
|
@ -15,7 +15,7 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
ARCH_CLASS = microblaze
|
||||
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
VALID_BUILDS = Ioc
|
||||
VALID_BUILDS = Ioc Command
|
||||
GNU_TARGET = microblazeel-unknown-linux-gnu
|
||||
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
|
||||
endif
|
||||
|
@ -13,7 +13,7 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
ARCH_CLASS = xscale
|
||||
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
VALID_BUILDS = Ioc
|
||||
VALID_BUILDS = Ioc Command
|
||||
GNU_TARGET = xscale_be
|
||||
CMPLR_PREFIX = $(GNU_TARGET:%=%-)
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Override these settings in CONFIG_SITE.linux-x86.linux-arm
|
||||
#-------------------------------------------------------
|
||||
|
||||
VALID_BUILDS = Ioc
|
||||
VALID_BUILDS = Ioc Command
|
||||
GNU_TARGET = arm-linux
|
||||
|
||||
# prefix of compiler tools
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Sites may override these in CONFIG_SITE.linux-x86_64.linux-aarch64
|
||||
#-------------------------------------------------------
|
||||
|
||||
VALID_BUILDS = Ioc
|
||||
VALID_BUILDS = Ioc Command
|
||||
GNU_TARGET = aarch64-linux
|
||||
|
||||
# prefix of compiler tools
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
# Win32 valid build types and include directory suffixes
|
||||
|
||||
VALID_BUILDS = Host Ioc
|
||||
VALID_BUILDS = Host Ioc Command
|
||||
|
||||
CMPLR_CLASS = msvc
|
||||
|
||||
|
@ -17,6 +17,26 @@ should also be read to understand what has changed since earlier releases.
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
|
||||
|
||||
### Build System: New `VALID_BUILDS` type "Command"
|
||||
|
||||
Target architectures that support command-line programs that run the `main()`
|
||||
routine can now be marked as such in their `VALID_BUILDS` definition. This
|
||||
enables a new set of Makefile target variables `PROD_CMD` (similar to
|
||||
`PROD_HOST`), `LIBRARY_CMD` (like `LIBRARY_HOST`, etc.), `LOADABLE_LIBRARY_CMD`,
|
||||
`OBJS_CMD`, `SCRIPTS_CMD`, `TARGETS_CMD`, `TESTLIBRARY_CMD`, `TESTSCRIPTS_CMD`
|
||||
and `TESTPROD_CMD`. The CA client tools and programs such as `caRepeater` are now built for all such targets (previously they were built for all targets except where the OS was VxWorks, RTEMS and iOS).
|
||||
|
||||
If you have created your own site-specific target architectures you may need to
|
||||
update the `VALID_BUILDS` variable if it gets set in your locally added
|
||||
`configure/os/CONFIG.Common.<arch>` files. This is usually only needed for
|
||||
cross-compiled targets though since `CONFIG.Common.UnixCommon` sets it.
|
||||
|
||||
The other `VALID_BUILDS` types are "Host" for target architectures that can
|
||||
compile and run their own programs (`PROD_HOST` etc.), and "Ioc" for targets
|
||||
that can run IOCs (`PROD_IOC` etc.).
|
||||
|
||||
### Support for JSON5
|
||||
|
||||
The YAJL parser and generator routines in libcom and in the IOC's dbStatic
|
||||
|
@ -95,10 +95,7 @@ PROD_LIBS = ca Com
|
||||
# needed when its an object library build
|
||||
PROD_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
|
||||
|
||||
PROD_DEFAULT += caRepeater catime acctst caConnTest casw caEventRate
|
||||
PROD_vxWorks = -nil-
|
||||
PROD_RTEMS = -nil-
|
||||
PROD_iOS = -nil-
|
||||
PROD_CMD += caRepeater catime acctst caConnTest casw caEventRate
|
||||
|
||||
OBJS_vxWorks = catime acctst caConnTest casw caEventRate acctstRegister
|
||||
|
||||
|
@ -13,10 +13,7 @@ TOP = ../../../..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
PROD_DEFAULT += caget camonitor cainfo caput
|
||||
PROD_vxWorks = -nil-
|
||||
PROD_RTEMS = -nil-
|
||||
PROD_iOS = -nil-
|
||||
PROD_CMD = caget camonitor cainfo caput
|
||||
|
||||
PROD_SRCS = tool_lib.c
|
||||
|
||||
|
@ -21,7 +21,6 @@ INC += epicsString.h
|
||||
INC += epicsTypes.h
|
||||
INC += shareLib.h
|
||||
INC += epicsExport.h
|
||||
INC += unixFileName.h
|
||||
INC += locationException.h
|
||||
INC += ipAddrToAsciiAsynchronous.h
|
||||
INC += compilerDependencies.h
|
||||
|
@ -1,42 +0,0 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* unixFileName.h
|
||||
* Author: Jeff Hill
|
||||
*/
|
||||
#ifndef unixFileNameH
|
||||
#define unixFileNameH
|
||||
|
||||
#include <libComAPI.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OSI_PATH_LIST_SEPARATOR ":"
|
||||
#define OSI_PATH_SEPARATOR "/"
|
||||
|
||||
/** Return the absolute path of the current executable.
|
||||
\return NULL or the path. Caller must free()
|
||||
*/
|
||||
LIBCOM_API
|
||||
char *epicsGetExecName(void);
|
||||
|
||||
/** Return the absolute path of the directory containing the current executable.
|
||||
\return NULL or the path. Caller must free()
|
||||
*/
|
||||
LIBCOM_API
|
||||
char *epicsGetExecDir(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* unixFileNameH */
|
@ -17,7 +17,7 @@
|
||||
#ifndef epicsAtomicDefault_h
|
||||
#define epicsAtomicDefault_h
|
||||
|
||||
#ifdef __cpluplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -239,7 +239,7 @@ EPICS_ATOMIC_INLINE EpicsAtomicPtrT epicsAtomicCmpAndSwapPtrT (
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cpluplus
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Saskatchewan
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* Author: Eric Norum
|
||||
*/
|
||||
|
||||
#ifndef osiFileNameH
|
||||
#define osiFileNameH
|
||||
|
||||
#include "unixFileName.h"
|
||||
|
||||
#endif /* osiFileNameH */
|
@ -1,19 +0,0 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* osiFileName.h
|
||||
* Author: Jeff Hill
|
||||
*/
|
||||
#ifndef osiFileNameH
|
||||
#define osiFileNameH
|
||||
|
||||
#include "unixFileName.h"
|
||||
|
||||
#endif /* osiFileNameH */
|
@ -1,18 +0,0 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Saskatchewan
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* RTEMS osiFileName.h
|
||||
* Author: W. Eric Norum
|
||||
* eric@cls.usask.ca
|
||||
* (306) 966-6055
|
||||
*/
|
||||
#ifndef osiFileNameH
|
||||
#define osiFileNameH
|
||||
|
||||
#include "unixFileName.h"
|
||||
|
||||
#endif /* osiFileNameH */
|
@ -1,43 +0,0 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* osiFileName.h
|
||||
* Author: Jeff Hill
|
||||
*
|
||||
*/
|
||||
#ifndef osiFileNameH
|
||||
#define osiFileNameH
|
||||
|
||||
#include <libComAPI.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OSI_PATH_LIST_SEPARATOR ";"
|
||||
#define OSI_PATH_SEPARATOR "\\"
|
||||
|
||||
/** Return the absolute path of the current executable.
|
||||
* \return NULL or the path. Caller must free()
|
||||
*/
|
||||
LIBCOM_API
|
||||
char *epicsGetExecName(void);
|
||||
|
||||
/** Return the absolute path of the directory containing the current executable.
|
||||
* \return NULL or the path. Caller must free()
|
||||
*/
|
||||
LIBCOM_API
|
||||
char *epicsGetExecDir(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* osiFileNameH */
|
@ -1,19 +0,0 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2006 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* osiFileName.h
|
||||
* Author: Jeff Hill
|
||||
*/
|
||||
#ifndef osiFileNameH
|
||||
#define osiFileNameH
|
||||
|
||||
#include "unixFileName.h"
|
||||
|
||||
#endif /* osiFileNameH */
|
@ -1,17 +0,0 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Saskatchewan
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* Author: Eric Norum
|
||||
*/
|
||||
|
||||
#ifndef osiFileNameH
|
||||
#define osiFileNameH
|
||||
|
||||
#include "unixFileName.h"
|
||||
|
||||
#endif /* osiFileNameH */
|
@ -28,6 +28,14 @@
|
||||
#include "epicsAssert.h"
|
||||
#include "errlog.h"
|
||||
|
||||
/* Linux and *BSD (at least) specific way to atomically set O_CLOEXEC */
|
||||
#ifdef SOCK_CLOEXEC
|
||||
/* with glibc, SOCK_CLOEXEC does not expand to a simple constant */
|
||||
# define HAVE_SOCK_CLOEXEC
|
||||
#else
|
||||
# define SOCK_CLOEXEC (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Protect some routines which are not thread-safe
|
||||
*/
|
||||
@ -71,7 +79,7 @@ void osiSockRelease()
|
||||
LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
|
||||
int domain, int type, int protocol )
|
||||
{
|
||||
SOCKET sock = socket ( domain, type, protocol );
|
||||
SOCKET sock = socket ( domain, type | SOCK_CLOEXEC, protocol );
|
||||
if ( sock < 0 ) {
|
||||
sock = INVALID_SOCKET;
|
||||
}
|
||||
@ -94,7 +102,11 @@ LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
|
||||
LIBCOM_API int epicsStdCall epicsSocketAccept (
|
||||
int sock, struct sockaddr * pAddr, osiSocklen_t * addrlen )
|
||||
{
|
||||
#ifndef HAVE_SOCK_CLOEXEC
|
||||
int newSock = accept ( sock, pAddr, addrlen );
|
||||
#else
|
||||
int newSock = accept4 ( sock, pAddr, addrlen, SOCK_CLOEXEC );
|
||||
#endif
|
||||
if ( newSock < 0 ) {
|
||||
newSock = INVALID_SOCKET;
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* osiFileName.h
|
||||
* Author: Jeff Hill
|
||||
*
|
||||
*
|
||||
*/
|
||||
#ifndef osiFileNameH
|
||||
#define osiFileNameH
|
||||
|
||||
#include "unixFileName.h"
|
||||
|
||||
#endif /* osiFileNameH */
|
@ -1,19 +0,0 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* osiFileName.h
|
||||
* Author: Jeff Hill
|
||||
*/
|
||||
#ifndef osiFileNameH
|
||||
#define osiFileNameH
|
||||
|
||||
#include "unixFileName.h"
|
||||
|
||||
#endif /* osiFileNameH */
|
@ -20,8 +20,13 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OSI_PATH_LIST_SEPARATOR ";"
|
||||
#define OSI_PATH_SEPARATOR "\\"
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
# define OSI_PATH_LIST_SEPARATOR ";"
|
||||
# define OSI_PATH_SEPARATOR "\\"
|
||||
#else
|
||||
# define OSI_PATH_LIST_SEPARATOR ":"
|
||||
# define OSI_PATH_SEPARATOR "/"
|
||||
#endif
|
||||
|
||||
/** Return the absolute path of the current executable.
|
||||
\return NULL or the path. Caller must free()
|
@ -54,7 +54,7 @@ rem Strawberry Perl will be added to PATH.
|
||||
set _strawberry_perl_home=C:\Strawberry
|
||||
|
||||
rem The location of Microsoft Visual Studio (pathname).
|
||||
set _visual_studio_home=C:\Program Files (x86)\Microsoft Visual Studio 14.0
|
||||
set _visual_studio_home=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
|
||||
|
||||
rem The EPICS host architecture specification for EPICS_HOST_ARCH
|
||||
rem (<os>-<arch>[-<toolset>] as defined in configure/CONFIG_SITE).
|
||||
@ -83,7 +83,7 @@ set "PATH=%PATH%;%_strawberry_perl_home%\perl\bin"
|
||||
:after_add_strawberry_perl
|
||||
|
||||
rem Set the environment for Microsoft Visual Studio
|
||||
call "%_visual_studio_home%\VC\vcvarsall.bat" x86
|
||||
call "%_visual_studio_home%\VC\Auxiliary\Build\vcvarsall.bat" x86
|
||||
|
||||
rem Set the EPICS host architecture specification
|
||||
set "EPICS_HOST_ARCH=%_epics_host_arch%"
|
||||
|
@ -54,7 +54,7 @@ rem Strawberry Perl will be added to PATH.
|
||||
set _strawberry_perl_home=C:\Strawberry
|
||||
|
||||
rem The location of Microsoft Visual Studio (pathname).
|
||||
set _visual_studio_home=C:\Program Files (x86)\Microsoft Visual Studio 14.0
|
||||
set _visual_studio_home=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
|
||||
|
||||
rem The EPICS host architecture specification for EPICS_HOST_ARCH
|
||||
rem (<os>-<arch>[-<toolset>] as defined in configure/CONFIG_SITE).
|
||||
@ -83,7 +83,7 @@ set "PATH=%PATH%;%_strawberry_perl_home%\perl\bin"
|
||||
:after_add_strawberry_perl
|
||||
|
||||
rem Set the environment for Microsoft Visual Studio
|
||||
call "%_visual_studio_home%\VC\vcvarsall.bat" x64
|
||||
call "%_visual_studio_home%\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
|
||||
rem Set the EPICS host architecture specification
|
||||
set "EPICS_HOST_ARCH=%_epics_host_arch%"
|
||||
|
Reference in New Issue
Block a user