- struct sigevent ev;
- timer_t timer;
- ev.sigev_notify = SIGEV_SIGNAL;
- ev.sigev_signo = SIGVTALRM;
- if (timer_create(CLOCK_PROCESS_CPUTIME_ID, &ev, &timer) != 0) {
- exit(1);
- }
-#else
- exit(1)
-#endif
- exit(0);
-}
# Extra autoconf macros for the Glasgow fptools
#
# To be a good autoconf citizen, names of local macros have prefixed with FP_ to
if test -f VERSION_DATE; then
PACKAGE_VERSION=${PACKAGE_VERSION}.`cat VERSION_DATE`
AC_MSG_RESULT(given $PACKAGE_VERSION)
+ elif test -d .git; then
+ changequote(, )dnl
+ ver_date=`git log -n 1 --date=short --pretty=format:%ci | sed "s/^.*\([0-9][0-9][0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\).*$/\1\2\3/"`
+ if echo $ver_date | grep '^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$' 2>&1 >/dev/null; then true; else
+ changequote([, ])dnl
+ AC_MSG_ERROR([failed to detect version date: check that git is in your path])
+ fi
+ PACKAGE_VERSION=${PACKAGE_VERSION}.$ver_date
+ AC_MSG_RESULT(inferred $PACKAGE_VERSION)
elif test -d _darcs; then
+ # TODO: Remove this branch after conversion to Git
changequote(, )dnl
ver_date=`darcs changes --quiet --no-summary --xml | head -500 | grep 'date=' | sed "s/^.*date='\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*$/\1/g" | sort -n | tail -1`
if echo $ver_date | grep '^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$' 2>&1 >/dev/null; then true; else
PACKAGE_VERSION=`cat VERSION`
AC_MSG_RESULT(given $PACKAGE_VERSION)
else
- AC_MSG_WARN([cannot determine snapshot version: no _darcs directory and no VERSION file])
+ AC_MSG_WARN([cannot determine snapshot version: no .git or _darcs directory and no VERSION file])
fi
fi
tock = 0;
- usleep(300);
+ usleep(3000);
if (!tock) {
fprintf(stderr,"no CLOCK_REALTIME signal\n");