提交 ebfec249 编写于 作者: T tbell

8005442: autogen.sh sets DATE_WHEN_GENERATED to empty string on Solaris version 11 or later

Reviewed-by: ohair
上级 bcc05a9f
...@@ -26,9 +26,11 @@ script_dir=`dirname $0` ...@@ -26,9 +26,11 @@ script_dir=`dirname $0`
# Create a timestamp as seconds since epoch # Create a timestamp as seconds since epoch
if test "x`uname -s`" = "xSunOS"; then if test "x`uname -s`" = "xSunOS"; then
# date +%s is not available on Solaris, use this workaround TIMESTAMP=`date +%s`
# from http://solarisjedi.blogspot.co.uk/2006/06/solaris-date-command-and-epoch-time.html if test "x$TIMESTAMP" = "x%s"; then
TIMESTAMP=`/usr/bin/truss /usr/bin/date 2>&1 | nawk -F= '/^time\(\)/ {gsub(/ /,"",$2);print $2}'` # date +%s not available on this Solaris, use workaround from nawk(1):
TIMESTAMP=`nawk 'BEGIN{print srand()}'`
fi
else else
TIMESTAMP=`date +%s` TIMESTAMP=`date +%s`
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册