diff --git a/autogen.sh b/autogen.sh index f8cdf3c0c1eb69..f11a471a08efa5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,17 +1,22 @@ #!/bin/sh +# Clear PWD to force commands to recompute working directory PWD= + +# Figure out the source directory for this script +# configure.ac should be in the same place case "$0" in -*/*) srcdir=`dirname $0`;; -*) srcdir="";; + */* ) srcdir=`dirname "$0"` ;; # Called with path + * ) srcdir="";; # Otherwise esac -symlink='--install --symlink' +# If install-only is explicitly requested, disbale symlink flags case " $* " in - *" -i "*|*" --install "*) - # reset to copy missing standard auxiliary files, instead of symlinks - symlink= - ;; + *" -i "* | *" --install"* ) symlink_flags="" ;; + * ) symlink_flags="--install --symlink" ;; esac -exec ${AUTORECONF:-autoreconf} ${symlink} "$@" ${srcdir:+"$srcdir"} +exec ${AUTORECONF:-autoreconf} \ + $symlink_flags \ + "$@" \ + $srcdir diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c index 20f75d827d49ab..edd270c3adafcd 100644 --- a/ext/socket/ipsocket.c +++ b/ext/socket/ipsocket.c @@ -54,7 +54,7 @@ inetsock_cleanup(VALUE v) } static VALUE -current_clocktime() +current_clocktime(void) { VALUE clock_monotnic_const = rb_const_get(rb_mProcess, rb_intern("CLOCK_MONOTONIC")); return rb_funcall(rb_mProcess, rb_intern("clock_gettime"), 1, clock_monotnic_const);