diff --git a/LICENSE b/LICENSE index ff9597ccf..4806c058e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,11 +1,14 @@ -Copyright (c) 1991-2007 UChicago Argonne LLC and The Regents of the -University of California. All rights reserved. +Copyright (c) 1991-2011 UChicago Argonne LLC. +Copyright (c) 1991-2006 The Regents of the University of California. +Copyright (c) 2006-2011. Los Alamos National Security, LLC. Some of this +material was produced under U.S. Government contract DE-AC52-06NA25396 +for Los Alamos National Laboratory (LANL), which is operated by Los Alamos +National Security, LLC for the U.S. Department of Energy. EPICS BASE is distributed subject to the following license conditions: SOFTWARE LICENSE AGREEMENT Software: EPICS BASE - Versions: 3.13.7 and higher 1. The "Software", below, refers to EPICS BASE (in either source code, or binary form and accompanying documentation). Each licensee is diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON index 72d9d4e9f..a1ba1861e 100644 --- a/configure/CONFIG_COMMON +++ b/configure/CONFIG_COMMON @@ -83,7 +83,7 @@ COMMON_DIR = ../O.Common #------------------------------------------------------- # Make echo output - suppress echoing if make's '-s' flag is set COMMENT = \# -ECHO = $(if $(findstring s,$(MAKEFLAGS)),$(COMMENT),@echo) +ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(COMMENT),echo) #------------------------------------------------------- ifdef T_A diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index b861e00e6..ac699fdd3 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -209,11 +209,6 @@ $(OBJLIBNAME):%$(OBJ): @$(RM) $@ $(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp) -%$(OBJ): %.C - @$(HDEPENDS_CMD) - @$(RM) $@ - $(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp) - # WIN95/NT resource compiler %$(RES): %.rc @$(RM) $@ diff --git a/configure/RULES_TOP b/configure/RULES_TOP index 51188ea97..7bcfc74a6 100644 --- a/configure/RULES_TOP +++ b/configure/RULES_TOP @@ -1,10 +1,9 @@ #************************************************************************* -# Copyright (c) 2002 The University of Chicago, as Operator of Argonne +# Copyright (c) 2011 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 Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found +# EPICS BASE is distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* # @@ -13,73 +12,73 @@ include $(CONFIG)/RULES_DIRS +distclean: realclean cvsclean realuninstall + +CVSCLEAN=$(firstword $(wildcard $(TOOLS)/cvsclean.pl $(TOP)/src/tools/cvsclean.pl)) +cvsclean: + $(PERL) $(CVSCLEAN) + +realuninstall: uninstallDirs + $(RMDIR) $(INSTALL_LOCATION_BIN) + $(RMDIR) $(INSTALL_LOCATION_LIB) + UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC)\ $(INSTALL_HTML) $(INSTALL_JAVA) $(INSTALL_TEMPLATES) \ $(INSTALL_DB) UNINSTALL_DIRS += $(DIRECTORY_TARGETS) +uninstallDirs: + $(RMDIR) $(UNINSTALL_DIRS) + +uninstall: archuninstall uninstallDirs + +archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS)) + @$(MAKE) -f Makefile cleandirs -uninstallArchTargets = $(foreach arch,$(BUILD_ARCHS), uninstall$(DIVIDER)$(arch)) archPart = $(word 2, $(subst $(DIVIDER), ,$@)) - -$(uninstallArchTargets): uninstallDirs - @$(RMDIR) $(INSTALL_LOCATION_BIN)/$(archPart) $(INSTALL_LOCATION_LIB)/$(archPart) +uninstall$(DIVIDER)%: + $(RMDIR) $(INSTALL_LOCATION_BIN)/$(archPart) + $(RMDIR) $(INSTALL_LOCATION_LIB)/$(archPart) cleandirs: ifeq ($(wildcard $(INSTALL_LOCATION_BIN)/*),) - @$(RMDIR) $(INSTALL_LOCATION_BIN) + $(RMDIR) $(INSTALL_LOCATION_BIN) endif ifeq ($(wildcard $(INSTALL_LOCATION_LIB)/*),) - @$(RMDIR) $(INSTALL_LOCATION_LIB) + $(RMDIR) $(INSTALL_LOCATION_LIB) endif @echo # The echo above stops a "nothing to be done for cleandirs" message -distclean: realclean realuninstall - -CVSCLEAN=$(firstword $(wildcard $(TOOLS)/cvsclean.pl $(TOP)/src/tools/cvsclean.pl)) - -cvsclean: - @$(PERL) $(CVSCLEAN) - -realuninstall: - @$(RMDIR) $(INSTALL_LOCATION_BIN) $(INSTALL_LOCATION_LIB) - @$(RMDIR) $(UNINSTALL_DIRS) - -uninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS)) - @$(MAKE) -f Makefile cleandirs - -uninstallDirs: - @$(RMDIR) $(UNINSTALL_DIRS) - help: @echo "Usage: gnumake [options] [target] ..." @echo "Targets supported by all Makefiles:" - @echo " install - Builds and installs all targets (default rule)" - @echo " all - Same as install" - @echo " buildInstall - Same as install" + @echo " all - Same as install (default rule)" + @echo " inc - Installs header files" + @echo " build - Builds and installs all targets" + @echo " install - Builds and installs all targets" + @echo " buildInstall - Same as install (deprecated)" @echo " clean - Removes the O. dirs created by running make" @echo " In O. dir, clean removes build created files" @echo " realclean - Removes ALL O. dirs" @echo " Cannot be used within an O. dir" @echo " rebuild - Same as clean install" - @echo " inc - Installs header files" - @echo " build - Builds all targets" @echo " archclean - Removes O. dirs but not O.Common dir" @echo "\"Partial\" build targets supported by Makefiles:" @echo " inc. - Installs only header files." + @echo " build. - Builds and installs only." @echo " install. - Builds and installs only." @echo " clean. - Cleans binaries in O. dirs only." - @echo " build. - Builds only." + @echo " uninstall. - Remove bin & lib directories for only." @echo "Targets supported by top level Makefile:" - @echo " uninstall - Cleans directories created by the install." + @echo " archuninstall - Remove bin & lib directories created by this hostarch." + @echo " uninstall - Remove install directories created by this hostarch." @echo " realuninstall - Removes ALL install dirs" - @echo " distclean - Same as realclean realuninstall." + @echo " distclean - Same as realclean cvsclean realuninstall." @echo " cvsclean - Removes cvs .#* files in all dirs of directory tree" @echo " help - Prints this list of valid make targets " @echo "Indiv. object targets are supported by O. level Makefile .e.g" @echo " xxxRecord.o" -.PHONY : $(uninstallArchTargets) -.PHONY : uninstall help cleandirs distclean uninstallDirs realuninstall -.PHONY : cvsclean +.PHONY: cleandirs distclean cvsclean realuninstall archuninstall uninstallDirs +.PHONY: uninstall help diff --git a/configure/os/CONFIG.Common.vxWorksCommon b/configure/os/CONFIG.Common.vxWorksCommon index 6f7af69c4..832a44d55 100644 --- a/configure/os/CONFIG.Common.vxWorksCommon +++ b/configure/os/CONFIG.Common.vxWorksCommon @@ -160,7 +160,7 @@ export TOOL_FAMILY = GNU #-------------------------------------------------- # Operating system flags -OP_SYS_CPPFLAGS += -DvxWorks +OP_SYS_CPPFLAGS += -DvxWorks=vxWorks OP_SYS_CFLAGS += -fno-builtin # Fix for vxWorks 5 headers that use macros defined in vxWorks.h but diff --git a/configure/os/CONFIG.win32-x86-borland.Common b/configure/os/CONFIG.win32-x86-borland.Common index 0ad43a3b1..c0a0eada9 100644 --- a/configure/os/CONFIG.win32-x86-borland.Common +++ b/configure/os/CONFIG.win32-x86-borland.Common @@ -8,11 +8,11 @@ #------------------------------------------------------- CP = $(PERL) -MExtUtils::Command -e cp -MV = $(PERL) -MExtUtils::Command -e mv +MV = $(PERL) -MExtUtils::Command -e mv RM = $(PERL) -MExtUtils::Command -e rm_f MKDIR = $(PERL) -MExtUtils::Command -e mkpath RMDIR = $(PERL) -MExtUtils::Command -e rm_rf -COMMENT = REM +COMMENT = $(PERL) -e '' WIND_HOST_TYPE = x86-win32 OSITHREAD_USE_DEFAULT_STACK = NO diff --git a/configure/os/CONFIG.win32-x86-mingw.Common b/configure/os/CONFIG.win32-x86-mingw.Common index dedfc1b8e..ce74be68f 100644 --- a/configure/os/CONFIG.win32-x86-mingw.Common +++ b/configure/os/CONFIG.win32-x86-mingw.Common @@ -11,11 +11,11 @@ include $(CONFIG)/os/CONFIG.UnixCommon.Common CP = $(PERL) -MExtUtils::Command -e cp -MV = $(PERL) -MExtUtils::Command -e mv +MV = $(PERL) -MExtUtils::Command -e mv RM = $(PERL) -MExtUtils::Command -e rm_f MKDIR = $(PERL) -MExtUtils::Command -e mkpath RMDIR = $(PERL) -MExtUtils::Command -e rm_rf -COMMENT = REM +COMMENT = $(PERL) -e '' WIND_HOST_TYPE = x86-win32 OSITHREAD_USE_DEFAULT_STACK = NO diff --git a/configure/os/CONFIG.win32-x86.Common b/configure/os/CONFIG.win32-x86.Common index ce6f439b1..3575ad8ab 100644 --- a/configure/os/CONFIG.win32-x86.Common +++ b/configure/os/CONFIG.win32-x86.Common @@ -8,11 +8,11 @@ #------------------------------------------------------- CP = $(PERL) -MExtUtils::Command -e cp -MV = $(PERL) -MExtUtils::Command -e mv +MV = $(PERL) -MExtUtils::Command -e mv RM = $(PERL) -MExtUtils::Command -e rm_f MKDIR = $(PERL) -MExtUtils::Command -e mkpath RMDIR = $(PERL) -MExtUtils::Command -e rm_rf -COMMENT = REM +COMMENT = $(PERL) -e '' WIND_HOST_TYPE = x86-win32 OSITHREAD_USE_DEFAULT_STACK = NO diff --git a/configure/os/CONFIG.win32-x86.win32-x86 b/configure/os/CONFIG.win32-x86.win32-x86 index 29b27cf42..da07db685 100644 --- a/configure/os/CONFIG.win32-x86.win32-x86 +++ b/configure/os/CONFIG.win32-x86.win32-x86 @@ -33,7 +33,9 @@ BAFCMD = bscmake /nologo /o $@ # Configure OS vendor C compiler CC = cl +# Override CONFIG.gnuCommon for cross builds. GNU = NO +HDEPENDS_METHOD = CMD # # /W use warning level N diff --git a/configure/os/CONFIG_SITE.Common.darwin-x86 b/configure/os/CONFIG_SITE.Common.darwin-x86 index cefe9bdde..7aad1537e 100644 --- a/configure/os/CONFIG_SITE.Common.darwin-x86 +++ b/configure/os/CONFIG_SITE.Common.darwin-x86 @@ -20,3 +20,4 @@ ARCH_CLASS = i386 #CC = clang #CCC = clang++ #GNU_LDLIBS_YES = + diff --git a/src/ca/CAref.html b/src/ca/CAref.html index 961d9fe36..743f44bdd 100644 --- a/src/ca/CAref.html +++ b/src/ca/CAref.html @@ -246,7 +246,7 @@ $Date$

Why Reconfigure Channel Access

-

Typically reasons to reconfigure EPICS Channel Access:

+

Typical reasons to reconfigure EPICS Channel Access:

  • Two independent control systems must share a network without fear of interaction
  • @@ -4359,7 +4359,7 @@ that use ca_context_destroy).

    ca_context_destroy()

    ca_dump_dbr()

    -
    void ca_dump_dbr (chtype TYPE, unsigned COUNT, const void * PDBR);
    +
    void ca_dump_dbr (chtype TYPE, unsigned COUNT, const void * PDBR);

    Description

    diff --git a/src/ca/udpiiu.cpp b/src/ca/udpiiu.cpp index 755875aa7..625bead9f 100644 --- a/src/ca/udpiiu.cpp +++ b/src/ca/udpiiu.cpp @@ -81,8 +81,9 @@ udpiiu::udpiiu ( cac::lowestPriorityLevelAbove ( cac::lowestPriorityLevelAbove ( cac.getInitializingThreadsPriority () ) ) ), + m_repeaterTimerNotify ( *this ), repeaterSubscribeTmr ( - *this, timerQueue, cbMutexIn, ctxNotifyIn ), + m_repeaterTimerNotify, timerQueue, cbMutexIn, ctxNotifyIn ), govTmr ( *this, timerQueue, cacMutexIn ), maxPeriod ( maxSearchPeriodDefault ), rtteMean ( minRoundTripEstimate ), @@ -397,14 +398,14 @@ void udpRecvThread::run () } /* - * udpiiu::repeaterRegistrationMessage () + * udpiiu::M_repeaterTimerNotify::repeaterRegistrationMessage () * * register with the repeater */ -void udpiiu::repeaterRegistrationMessage ( unsigned attemptNumber ) +void udpiiu :: M_repeaterTimerNotify :: repeaterRegistrationMessage ( unsigned attemptNumber ) { - epicsGuard < epicsMutex > cbGuard ( this->cacMutex ); - caRepeaterRegistrationMessage ( this->sock, this->repeaterPort, attemptNumber ); + epicsGuard < epicsMutex > cbGuard ( m_udpiiu.cacMutex ); + caRepeaterRegistrationMessage ( m_udpiiu.sock, m_udpiiu.repeaterPort, attemptNumber ); } /* @@ -1233,16 +1234,16 @@ void udpiiu::govExpireNotify ( this->ppSearchTmr[0]->installChannel ( guard, chan ); } -int udpiiu :: printFormated ( - epicsGuard < epicsMutex > & cbGuard, - const char * pformat, ... ) +int udpiiu :: M_repeaterTimerNotify :: printFormated ( + epicsGuard < epicsMutex > & cbGuard, + const char * pformat, ... ) { va_list theArgs; int status; va_start ( theArgs, pformat ); - status = this->cacRef.varArgsPrintFormated ( cbGuard, pformat, theArgs ); + status = m_udpiiu.cacRef.varArgsPrintFormated ( cbGuard, pformat, theArgs ); va_end ( theArgs ); diff --git a/src/ca/udpiiu.h b/src/ca/udpiiu.h index 3c9327547..5a0f869e1 100644 --- a/src/ca/udpiiu.h +++ b/src/ca/udpiiu.h @@ -88,8 +88,7 @@ static const double beaconAnomalySearchPeriod = 5.0; // seconds class udpiiu : private netiiu, private searchTimerNotify, - private disconnectGovernorNotify, - private repeaterTimerNotify { + private disconnectGovernorNotify { public: udpiiu ( epicsGuard < epicsMutex > & cacGuard, @@ -139,9 +138,24 @@ private: private: udpiiu & _udpiiu; }; + class M_repeaterTimerNotify : + public repeaterTimerNotify { + public: + M_repeaterTimerNotify ( udpiiu & iiu ) : + m_udpiiu ( iiu ) {} + // repeaterTimerNotify + void repeaterRegistrationMessage ( + unsigned attemptNumber ); + int printFormated ( + epicsGuard < epicsMutex > & callbackControl, + const char * pformat, ... ); + private: + udpiiu & m_udpiiu; + }; char xmitBuf [MAX_UDP_SEND]; char recvBuf [MAX_UDP_RECV]; udpRecvThread recvThread; + M_repeaterTimerNotify m_repeaterTimerNotify; repeaterSubscribeTimer repeaterSubscribeTmr; disconnectGovernorTimer govTmr; tsDLList < SearchDest > _searchDestList; @@ -278,14 +292,6 @@ private: void govExpireNotify ( epicsGuard < epicsMutex > &, nciu & ); - // repeaterTimerNotify - void repeaterRegistrationMessage ( - unsigned attemptNumber ); - - int printFormated ( - epicsGuard < epicsMutex > & callbackControl, - const char * pformat, ... ); - udpiiu ( const udpiiu & ); udpiiu & operator = ( const udpiiu & ); diff --git a/src/libCom/cxxTemplates/epicsSingleton.h b/src/libCom/cxxTemplates/epicsSingleton.h index 056285465..b97c82b8c 100644 --- a/src/libCom/cxxTemplates/epicsSingleton.h +++ b/src/libCom/cxxTemplates/epicsSingleton.h @@ -34,7 +34,7 @@ public: void * pInstance () const; private: void * _pInstance; - size_t _refCount; + std :: size_t _refCount; SingletonUntyped ( const SingletonUntyped & ); SingletonUntyped & operator = ( const SingletonUntyped & ); }; diff --git a/src/libCom/error/errlog.c b/src/libCom/error/errlog.c index 1cf1575bf..c5834057b 100644 --- a/src/libCom/error/errlog.c +++ b/src/libCom/error/errlog.c @@ -41,7 +41,6 @@ /*Declare storage for errVerbose */ epicsShareDef int errVerbose = 0; -static void errlogCleanup(void); static void exitHandler(void *); static void errlogThread(void); @@ -391,8 +390,15 @@ static void exitHandler(void *pvt) pvtData.atExit = 1; epicsEventSignal(pvtData.waitForWork); epicsEventMustWait(pvtData.waitForExit); + + free(pvtData.pbuffer); + epicsMutexDestroy(pvtData.flushLock); + epicsEventDestroy(pvtData.flush); + epicsEventDestroy(pvtData.waitForFlush); + epicsMutexDestroy(pvtData.listenerLock); + epicsMutexDestroy(pvtData.msgQueueLock); + epicsEventDestroy(pvtData.waitForWork); epicsEventDestroy(pvtData.waitForExit); - return; } struct initArgs { @@ -432,18 +438,6 @@ static void errlogInitPvt(void *arg) pvtData.errlogInitFailed = FALSE; } } - -static void errlogCleanup(void) -{ - free(pvtData.pbuffer); - epicsMutexDestroy(pvtData.flushLock); - epicsEventDestroy(pvtData.flush); - epicsEventDestroy(pvtData.waitForFlush); - epicsMutexDestroy(pvtData.listenerLock); - epicsMutexDestroy(pvtData.msgQueueLock); - epicsEventDestroy(pvtData.waitForWork); - /*Note that exitHandler must destroy waitForExit*/ -} epicsShareFunc int epicsShareAPI errlogInit2(int bufsize, int maxMsgSize) { @@ -514,7 +508,6 @@ static void errlogThread(void) epicsThreadSleep(.2); /*just wait an extra .2 seconds*/ epicsEventSignal(pvtData.waitForFlush); } - errlogCleanup(); epicsEventSignal(pvtData.waitForExit); } diff --git a/src/libCom/osi/compiler/gcc/compilerSpecific.h b/src/libCom/osi/compiler/gcc/compilerSpecific.h index f30b696b5..3dc505c29 100644 --- a/src/libCom/osi/compiler/gcc/compilerSpecific.h +++ b/src/libCom/osi/compiler/gcc/compilerSpecific.h @@ -53,7 +53,10 @@ /* * Deprecation marker if possible */ - -#define EPICS_DEPRECATED __attribute__((deprecated)) +#if (__GNUC__ > 2) +# define EPICS_DEPRECATED __attribute__((deprecated)) +#else +# define EPICS_DEPRECATED +#endif #endif /* ifndef compilerSpecific_h */ diff --git a/src/libCom/osi/os/vxWorks/devLibVMEOSD.c b/src/libCom/osi/os/vxWorks/devLibVMEOSD.c index 086e0f7d5..22cd177ea 100644 --- a/src/libCom/osi/os/vxWorks/devLibVMEOSD.c +++ b/src/libCom/osi/os/vxWorks/devLibVMEOSD.c @@ -50,9 +50,9 @@ static myISR *isrFetch(unsigned vectorNumber); /* * this routine needs to be in the symbol table - * for this code to work correctly + * (i.e. not static) for this code to work correctly */ -static void unsolicitedHandlerEPICS(int vectorNumber); +void unsolicitedHandlerEPICS(int vectorNumber); /* * this is in veclist.c @@ -412,8 +412,10 @@ static int vxDevInterruptInUseVME (unsigned vectorNumber) * interrupt and an interrupt arrives on the * disconnected vector * + * This routine needs to be in the symbol table + * (i.e. not static) for this code to work correctly */ -static void unsolicitedHandlerEPICS(int vectorNumber) +void unsolicitedHandlerEPICS(int vectorNumber) { /* * call logMsg() and not errMessage() diff --git a/src/misc/iocInit.c b/src/misc/iocInit.c index 3100ffd4b..2a398b713 100644 --- a/src/misc/iocInit.c +++ b/src/misc/iocInit.c @@ -506,6 +506,7 @@ static void doCloseLinks(dbRecordType *pdbRecordType, dbCommon *precord, devSup *pdevSup; struct dsxt *pdsxt; int j; + int locked = 0; for (j = 0; j < pdbRecordType->no_links; j++) { dbFldDes *pdbFldDes = @@ -513,7 +514,12 @@ static void doCloseLinks(dbRecordType *pdbRecordType, dbCommon *precord, DBLINK *plink = (DBLINK *)((char *)precord + pdbFldDes->offset); if (plink->type == CA_LINK) { + if (!locked) { + dbScanLock(precord); + locked = 1; + } dbCaRemoveLink(plink); + plink->type = CONSTANT; } } @@ -521,8 +527,16 @@ static void doCloseLinks(dbRecordType *pdbRecordType, dbCommon *precord, (pdevSup = dbDSETtoDevSup(pdbRecordType, precord->dset)) && (pdsxt = pdevSup->pdsxt) && pdsxt->del_record) { + if (!locked) { + dbScanLock(precord); + locked = 1; + } pdsxt->del_record(precord); } + if (locked) { + precord->pact = TRUE; + dbScanUnlock(precord); + } } static void exitDatabase(void *dummy) diff --git a/src/rec/compressRecord.c b/src/rec/compressRecord.c index f001fd4b8..2879852d8 100644 --- a/src/rec/compressRecord.c +++ b/src/rec/compressRecord.c @@ -92,12 +92,14 @@ static void reset(compressRecord *prec) static void monitor(compressRecord *prec) { - unsigned short monitor_mask; + unsigned short alarm_mask = recGblResetAlarms(prec); + unsigned short monitor_mask = alarm_mask | DBE_LOG | DBE_VALUE; - monitor_mask = recGblResetAlarms(prec); - monitor_mask |= (DBE_LOG|DBE_VALUE); - if(monitor_mask) db_post_events(prec,prec->bptr,monitor_mask); - return; + if (alarm_mask || prec->nuse != prec->ouse) { + db_post_events(prec, &prec->nuse, monitor_mask); + prec->ouse = prec->nuse; + } + db_post_events(prec, prec->bptr, monitor_mask); } static void put_value(compressRecord *prec,double *psource, epicsInt32 n) diff --git a/src/rec/compressRecord.dbd b/src/rec/compressRecord.dbd index e3bcd438e..45f5a2957 100644 --- a/src/rec/compressRecord.dbd +++ b/src/rec/compressRecord.dbd @@ -95,6 +95,10 @@ recordtype(compress) { prompt("Number Used") special(SPC_NOMOD) } + field(OUSE,DBF_ULONG) { + prompt("Old Number Used") + special(SPC_NOMOD) + } field(BPTR,DBF_NOACCESS) { prompt("Buffer Pointer") special(SPC_NOMOD) diff --git a/src/tools/convertRelease.pl b/src/tools/convertRelease.pl index fbdcf0606..f6eb50e73 100644 --- a/src/tools/convertRelease.pl +++ b/src/tools/convertRelease.pl @@ -19,7 +19,7 @@ use strict; use FindBin qw($Bin); use lib ("$Bin/../../lib/perl", $Bin); -use Cwd qw(cwd abs_path); +use Cwd qw(cwd); use Getopt::Std; use EPICS::Path; use EPICS::Release; @@ -215,7 +215,7 @@ sub checkRelease { while (my ($parent, $ppath) = each %check) { if (exists $macros{$parent} && - abs_path($macros{$parent}) ne abs_path($ppath)) { + AbsPath($macros{$parent}) ne AbsPath($ppath)) { print "\n" unless ($status); print "Definition of $parent conflicts with $app support.\n"; print "In this application a RELEASE file defines\n"; diff --git a/src/tools/fullPathName.pl b/src/tools/fullPathName.pl index da921f6dc..27fc57a21 100644 --- a/src/tools/fullPathName.pl +++ b/src/tools/fullPathName.pl @@ -29,7 +29,7 @@ $Getopt::Std::OUTPUT_HELP_VERSION = 1; my $path = AbsPath(shift); # Escape shell special characters unless on Windows, which doesn't allow them. -$path =~ s/([!"\$&'\(\)*,:;<=>?\[\\\]^`{|}])/\\\1/g unless $^O eq 'MSWin32'; +$path =~ s/([!"\$&'\(\)*,:;<=>?\[\\\]^`{|}])/\\$1/g unless $^O eq 'MSWin32'; print "$path\n"; diff --git a/src/tools/makeDbDepends.pl b/src/tools/makeDbDepends.pl index 729814326..16834de10 100644 --- a/src/tools/makeDbDepends.pl +++ b/src/tools/makeDbDepends.pl @@ -3,31 +3,22 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- # Called from within RULES.Db in the Db directories. # Searches .substitutions and .template files (from the command line) for -# "file xxx {" entries to create a DEPENDS file -# and -# 'include "xxx"' entries to create a DEPENDS file +# file ["']xxx["'] { +# and +# include "xxx" +# entries to include in the DEPENDS file +use strict; -$target = $ARGV[0]; -shift @ARGV; +my $target = shift @ARGV; +my %depends; - -foreach $file (@ARGV) { - open(IN, "<$file") or die "Cannot open $file: $!"; - @infile = ; - close IN or die "Cannot close $file: $!"; - - @depends = grep { s/^\s*file\s*(.*)\s*\{.*$/\1/ } @infile; - chomp @depends; - - if (@depends) { - print "$target: @depends\n"; - } - - @depends2 = grep { s/^\s*include\s*\"\s*(.*)\s*\".*$/\1/ } @infile; - chomp @depends2; - - if (@depends2) { - print "$target: @depends2\n"; - } +while (my $line = <>) { + $depends{$2}++ if $line =~ m/^\s*file\s*(["']?)(.*)\1/; + $depends{$1}++ if $line =~ m/^\s*include\s+"(.*)"/; +} + +if (%depends) { + my @depends = keys %depends; + print "$target: @depends\n"; } diff --git a/startup/EpicsHostArch b/startup/EpicsHostArch index ae25ea7cd..6b102b9b9 100755 --- a/startup/EpicsHostArch +++ b/startup/EpicsHostArch @@ -1,11 +1,10 @@ #!/bin/sh #************************************************************************* -# Copyright (c) 2002 The University of Chicago, as Operator of Argonne +# Copyright (c) 2011 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 Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found +# EPICS BASE is distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* # @@ -37,9 +36,9 @@ case $sysname in Darwin ) os=darwin cpu=`uname -m` - case "$cpu" in + case $cpu in "Power Macintosh") cpu=ppc ;; - "i386") cpu=x86 ;; + i386 | x86_64 ) cpu=x86 ;; esac echo ${os}-${cpu}${suffix} ;; diff --git a/startup/EpicsHostArch.pl b/startup/EpicsHostArch.pl index 169f9e32e..7fb5747c8 100755 --- a/startup/EpicsHostArch.pl +++ b/startup/EpicsHostArch.pl @@ -1,7 +1,7 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- if $running_under_some_shell; # EpicsHostArch.pl #************************************************************************* -# Copyright (c) 2002 The University of Chicago, as Operator of Argonne +# Copyright (c) 2011 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. @@ -34,6 +34,7 @@ sub GetEpicsHostArch { # no args my($kernel, $hostname, $release, $version, $cpu) = POSIX::uname(); if ($cpu =~ m/Power Macintosh/) { return "darwin-ppc"; } elsif ($cpu =~ m/i386/) { return "darwin-x86"; } + elsif ($cpu =~ m/x86_64/) { return "darwin-x86"; } else { return "unsupported"; } } else { return "unsupported"; } }