cygwin porting
git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@136 3f5042e3-fb1d-0410-be18-d6ca2573e517
This commit is contained in:
parent
2547abcf21
commit
fe6e2752b3
@ -2,6 +2,9 @@ Maui 3.3.1
|
||||
- Fixed issue where hostlist was being overwritten resulting in broken $PBS_NODEFILE. (Alexis Cousein)
|
||||
- Fixed issue where users could set system priority on their own jobs. (Bas van der Vlies)
|
||||
- Made showgrid's, and other's, arguments case-insensitive. (David Chin)
|
||||
- Added build system changes to support Cygwin (Yauheni Charniauski, UIIP Minsk)
|
||||
- Added the --with-cygrunsrv configure option for start maui as Windows service (doesn't use a background daemon).
|
||||
Cygwin utility cygrunsrv.exe goes it into background independently (Igor Ilyenko, UIIP Minsk)
|
||||
|
||||
Maui 3.3
|
||||
- Fixed configure script. Was putting RMCFG[name] TYPE=PBS@RMNMHOST@.
|
||||
|
@ -6,6 +6,7 @@
|
||||
BUILDROOT=
|
||||
export MSCHED_HOME=${BUILDROOT}@SPOOLDIR@
|
||||
export INST_DIR=${BUILDROOT}@prefix@
|
||||
export DAEMONDEF=@DAEMONDEF@
|
||||
export OPSYS=@OPSYS@
|
||||
export OS=@OS@
|
||||
export CC=@CC@
|
||||
|
17
configure
vendored
17
configure
vendored
@ -311,7 +311,7 @@ ac_includes_default="\
|
||||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S SPOOLDIR MACHINE SEED OPSYS OS HOSTNAME USER BUILDDATE BUILDDIR RMTYPE LLDIR LLDEF PBSTARGETDIR SGEBUILDDIR SGEOSDIR LSFDIR LSFLIBS LSFDEFS PBSCFLAGS PBSLDFLAGS RMPORT RMHOST RMSOCKETPROTOCOL RMWIREPROTOCOL RMVERSION RMNMPORT RMNMHOST AMTYPE AMHOST AMPORT AMSOCKETPROTOCOL AMWIREPROTOCOL AMOTHER PCREDIR CPP EGREP LIBOBJS POW_LIB LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S SPOOLDIR MACHINE SEED DAEMONDEF OPSYS OS HOSTNAME USER BUILDDATE BUILDDIR RMTYPE LLDIR LLDEF PBSTARGETDIR SGEBUILDDIR SGEOSDIR LSFDIR LSFLIBS LSFDEFS PBSCFLAGS PBSLDFLAGS RMPORT RMHOST RMSOCKETPROTOCOL RMWIREPROTOCOL RMVERSION RMNMPORT RMNMHOST AMTYPE AMHOST AMPORT AMSOCKETPROTOCOL AMWIREPROTOCOL AMOTHER PCREDIR CPP EGREP LIBOBJS POW_LIB LTLIBOBJS'
|
||||
ac_subst_files='rm_config ll_definitions sdr_definitions pbs_definitions sge_definitions lsf_definitions mx_definitions pcre_definitions'
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@ -862,6 +862,7 @@ Optional Packages:
|
||||
--with-sss-am[=PORT] use SSS Allocation Manager (default port [8865])
|
||||
--with-mx use MX
|
||||
--with-pcre[=DIR] use PCRE (pcre dir (location of PCRE include and lib directories) [/path/to/pcre]
|
||||
--with-cygrunsrv run as Windows service for Cygwin (do not use a background daemon)
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
@ -2234,6 +2235,8 @@ echo "$as_me: WARNING: Unexpected OS release 'AIX4$RELEASE', attempting build wi
|
||||
{ echo "$as_me:$LINENO: WARNING: Unexpected AIX level: $OSLEVEL, attempting build with OPSYS=$OPSYS" >&5
|
||||
echo "$as_me: WARNING: Unexpected AIX level: $OSLEVEL, attempting build with OPSYS=$OPSYS" >&2;}
|
||||
fi
|
||||
elif echo "$OS" | grep -q "CYGWIN"; then
|
||||
OPSYS="__CYGWIN"
|
||||
elif test "$OS" = "Linux"; then
|
||||
OPSYS="__LINUX"
|
||||
elif test "$OS" = "HP-UX"; then
|
||||
@ -2743,6 +2746,17 @@ if test "$PCREDIR" != 'FALSE'; then
|
||||
pcre_definitions=include/Makefile.inc.pcre
|
||||
fi
|
||||
|
||||
# CYGRUNSRV
|
||||
|
||||
# Check whether --with-cygrunsrv or --without-cygrunsrv was given.
|
||||
if test "${with_cygrunsrv+set}" = set; then
|
||||
withval="$with_cygrunsrv"
|
||||
DAEMONDEF="-D__CYGRUNSRV"
|
||||
else
|
||||
DAEMONDEF=""
|
||||
fi;
|
||||
|
||||
|
||||
# Make sure one RM was specified
|
||||
if test "$RMTYPE" = ''; then
|
||||
{ { echo "$as_me:$LINENO: error: At least one Resource Manager must be specified" >&5
|
||||
@ -7201,6 +7215,7 @@ s,@LN_S@,$LN_S,;t t
|
||||
s,@SPOOLDIR@,$SPOOLDIR,;t t
|
||||
s,@MACHINE@,$MACHINE,;t t
|
||||
s,@SEED@,$SEED,;t t
|
||||
s,@DAEMONDEF@,$DAEMONDEF,;t t
|
||||
s,@OPSYS@,$OPSYS,;t t
|
||||
s,@OS@,$OS,;t t
|
||||
s,@HOSTNAME@,$HOSTNAME,;t t
|
||||
|
11
configure.ac
11
configure.ac
@ -53,6 +53,8 @@ if test "$OS" = "AIX"; then
|
||||
OSLEVEL=`oslevel`
|
||||
AC_MSG_WARN([Unexpected AIX level: $OSLEVEL, attempting build with OPSYS=$OPSYS])
|
||||
fi
|
||||
elif echo "$OS" | grep -q "CYGWIN"; then
|
||||
OPSYS="__CYGWIN"
|
||||
elif test "$OS" = "Linux"; then
|
||||
OPSYS="__LINUX"
|
||||
elif test "$OS" = "HP-UX"; then
|
||||
@ -466,6 +468,15 @@ if test "$PCREDIR" != 'FALSE'; then
|
||||
pcre_definitions=include/Makefile.inc.pcre
|
||||
fi
|
||||
|
||||
|
||||
# CYGRUNSRV
|
||||
AC_ARG_WITH(cygrunsrv,
|
||||
[ --with-cygrunsrv run as Windows service for Cygwin (do not use a background daemon)],
|
||||
[DAEMONDEF="-D__CYGRUNSRV"],
|
||||
[DAEMONDEF=""])
|
||||
AC_SUBST(DAEMONDEF)
|
||||
|
||||
|
||||
# Make sure one RM was specified
|
||||
if test "$RMTYPE" = ''; then
|
||||
AC_MSG_ERROR([At least one Resource Manager must be specified])
|
||||
|
@ -13,7 +13,7 @@ SHELL =/bin/sh
|
||||
LP =-L$(LIB) $(SCHEDLP) $(MXLP) $(REGEXLP)
|
||||
IP =$(SCHEDIP) $(REGEXIP) $(MXIP)
|
||||
INCS =$(INC)moab.h $(INC)moab-proto.h
|
||||
DEFS =-D$(OPSYS) $(OSDEF) $(MXDEF) $(REGEXDEF) $(SECDEF)
|
||||
DEFS =-D$(OPSYS) $(OSDEF) $(MXDEF) $(REGEXDEF) $(SECDEF) $(DAEMONDEF)
|
||||
|
||||
LIBMCOM =libmcom.a
|
||||
LOBJECTS =MSU.o MSec.o MS3I.o MXML.o MConst.o MTComm.o MComm.o
|
||||
|
@ -1184,7 +1184,7 @@ int MFULock(
|
||||
char *LockFile) /* I */
|
||||
|
||||
{
|
||||
#if !defined(__LINUX) && !defined(__HPUX) && !defined(__NT)
|
||||
#if !defined(__LINUX) && !defined(__CYGWIN) && !defined(__HPUX) && !defined(__NT)
|
||||
int fd;
|
||||
struct flock lock;
|
||||
char Name[MAX_MLINE];
|
||||
@ -1197,7 +1197,7 @@ int MFULock(
|
||||
Directory,
|
||||
LockFile);
|
||||
|
||||
#if !defined(__LINUX) && !defined(__HPUX) && !defined(__NT)
|
||||
#if !defined(__LINUX) && !defined(__CYGWIN) && !defined(__HPUX) && !defined(__NT)
|
||||
|
||||
if (!strstr(LockFile,Directory))
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ int MLogInitialize(
|
||||
|
||||
if (SigSet == 0)
|
||||
{
|
||||
# if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__IRIX) || defined(__LINUX) || defined(__HPUX) || defined(__SOLARIS)
|
||||
# if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__IRIX) || defined(__LINUX) || defined(__CYGWIN) || defined(__HPUX) || defined(__SOLARIS)
|
||||
signal(SIGUSR1,(void(*)(int))MLogLevelAdjust);
|
||||
signal(SIGUSR2,(void(*)(int))MLogLevelAdjust);
|
||||
# else
|
||||
@ -414,7 +414,7 @@ void MLogLevelAdjust(
|
||||
mlog.Threshold);
|
||||
}
|
||||
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__IRIX) || defined(__LINUX) || defined(__HPUX) || defined(__SOLARIS)
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__IRIX) || defined(__LINUX) || defined(__CYGWIN) || defined(__HPUX) || defined(__SOLARIS)
|
||||
|
||||
signal(SIGUSR1,(void(*)(int))MLogLevelAdjust);
|
||||
|
||||
@ -441,7 +441,7 @@ void MLogLevelAdjust(
|
||||
mlog.Threshold);
|
||||
}
|
||||
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__IRIX) || defined(__LINUX) || defined(__HPUX) || defined(__SOLARIS) || defined(__OSF)
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__IRIX) || defined(__LINUX) || defined(__CYGWIN) || defined(__HPUX) || defined(__SOLARIS) || defined(__OSF)
|
||||
|
||||
signal(SIGUSR2,(void(*)(int))MLogLevelAdjust);
|
||||
|
||||
|
@ -2657,7 +2657,7 @@ int MPBSQueryMOM(
|
||||
"arch", /* the architecture of the machine */
|
||||
"physmem", /* the amount of physical memory */
|
||||
"loadave", /* the current load average */
|
||||
#if defined(__AIX43) || defined(__AIX51) || defined(__LINUX) || defined(__IRIX)
|
||||
#if defined(__AIX43) || defined(__AIX51) || defined(__LINUX) || defined(__CYGWIN) || defined(__IRIX)
|
||||
"availmem",
|
||||
"totmem",
|
||||
#endif /* AIX43 || LINUX || IRIX */
|
||||
|
@ -18,7 +18,7 @@ SHELL =/bin/sh
|
||||
IP =$(SCHEDIP) $(LLIP) $(REGEXIP) $(MXIP) $(PBSCFLAGS)
|
||||
INCS =$(INC)moab.h $(INC)msched.h
|
||||
DEFS =-D$(OPSYS) $(LLDEF) $(SDRDEF) $(PBSDEF) $(OSDEF) $(MXDEF) $(REGEXDEF) \
|
||||
$(SECDEF) $(RMSDEF) $(THREADDEF)
|
||||
$(SECDEF) $(RMSDEF) $(THREADDEF) $(DAEMONDEF)
|
||||
|
||||
MOAB =libmoab.a
|
||||
LOBJECTS =MFile.o MConfig.o MQOS.o MLog.o MCred.o MSched.o MAM.o MSR.o MRes.o \
|
||||
|
@ -18,7 +18,7 @@ SHELL =/bin/sh
|
||||
IP =$(SCHEDIP) $(LLIP) $(SGEIP) $(REGEXIP) $(MXIP) $(PBSCFLAGS)
|
||||
INCS =$(INC)moab.h $(INC)msched-proto.h $(INC)msched-common.h
|
||||
DEFS =-D$(OPSYS) $(LLDEF) $(SDRDEF) $(PBSDEF) $(OSDEF) $(MXDEF) \
|
||||
$(REGEXDEF) $(RMSDEF) $(SECDEF) $(THREADDEF)
|
||||
$(REGEXDEF) $(RMSDEF) $(SECDEF) $(THREADDEF) $(DAEMONDEF)
|
||||
|
||||
SERVER =maui
|
||||
SCHEDLIB =moab
|
||||
|
@ -5,7 +5,7 @@ int ServerSetSignalHandlers()
|
||||
{
|
||||
/* trap TERM(15) QUIT(3) INT(2) HUP(1) */
|
||||
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__AIX51) || defined(__IRIX) || defined(__LINUX) || defined(__HPUX) || defined(__SOLARIS) || defined(__OSF) || defined(__FREEBSD)
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__AIX51) || defined(__IRIX) || defined(__LINUX) || defined(__CYGWIN) || defined(__HPUX) || defined(__SOLARIS) || defined(__OSF) || defined(__FREEBSD)
|
||||
|
||||
signal(SIGINT, SIG_IGN);
|
||||
signal(SIGTERM, (void(*)(int))MSysShutdown);
|
||||
@ -120,7 +120,7 @@ int ServerSetSignalHandlers()
|
||||
}
|
||||
} /* END BLOCK */
|
||||
|
||||
#elif defined(__LINUX) || defined(__IRIX) || defined(__HPUX) || defined(__SOLARIS) || defined(__OSF)
|
||||
#elif defined(__LINUX) || defined(__CYGWIN) || defined(__IRIX) || defined(__HPUX) || defined(__SOLARIS) || defined(__OSF)
|
||||
|
||||
ServerLoadSignalConfig();
|
||||
|
||||
@ -143,8 +143,9 @@ int ServerSetSignalHandlers()
|
||||
|
||||
|
||||
int ServerDemonize()
|
||||
{
|
||||
#ifndef __CYGRUNSRV
|
||||
|
||||
{
|
||||
#ifndef __NT
|
||||
int pid;
|
||||
#endif /* __NT */
|
||||
@ -235,6 +236,7 @@ int ServerDemonize()
|
||||
}
|
||||
} /* END if (MSched.Mode != msmSim) */
|
||||
|
||||
#endif /* __CYGRUNSRV */
|
||||
return(SUCCESS);
|
||||
} /* END ServerDemonize() */
|
||||
|
||||
@ -305,7 +307,7 @@ int CrashMode(
|
||||
|
||||
if (signo == SIGSEGV)
|
||||
{
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__AIX51) || defined(__LINUX) || defined(__HPUX) || defined(__IRIX) || defined(__SOLARIS) || defined(__OSF) || defined(__FREEBSD)
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__AIX51) || defined(__LINUX) || defined(__CYGWIN) || defined(__CYGWIN) || defined(__HPUX) || defined(__IRIX) || defined(__SOLARIS) || defined(__OSF) || defined(__FREEBSD)
|
||||
|
||||
signal(SIGSEGV,(void(*)(int))CrashMode);
|
||||
|
||||
@ -317,7 +319,7 @@ int CrashMode(
|
||||
}
|
||||
else if (signo == SIGILL)
|
||||
{
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__AIX51) || defined(__LINUX) || defined(__HPUX) || defined(__IRIX) || defined(__SOLARIS) || defined(__OSF) || defined(__FREEBSD)
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__AIX51) || defined(__LINUX) || defined(__CYGWIN) || defined(__HPUX) || defined(__IRIX) || defined(__SOLARIS) || defined(__OSF) || defined(__FREEBSD)
|
||||
|
||||
signal(SIGILL,(void(*)(int))CrashMode);
|
||||
|
||||
@ -378,7 +380,7 @@ int ReloadConfig(
|
||||
|
||||
MSched.Reload = TRUE;
|
||||
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__AIX51) || defined(__LINUX) || defined(__HPUX) || defined(__IRIX) || defined(__SOLARIS) || defined(__OSF) || defined(__FREEBSD)
|
||||
#if defined(__AIX41) || defined(__AIX42) || defined(__AIX43) || defined(__AIX51) || defined(__LINUX) || defined(__CYGWIN) || defined(__HPUX) || defined(__IRIX) || defined(__SOLARIS) || defined(__OSF) || defined(__FREEBSD)
|
||||
|
||||
signal(SIGHUP,(void(*)(int))ReloadConfig);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user