Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Mar 2020 17:51:45 +0000 (UTC)
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r359252 - head/sys/conf
Message-ID:  <202003231751.02NHpjg6024010@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arichardson
Date: Mon Mar 23 17:51:44 2020
New Revision: 359252
URL: https://svnweb.freebsd.org/changeset/base/359252

Log:
  Fix newvers.sh on macOS 10.15
  
  It appears that the macOS /bin/sh echo now defaults to -e and therefore the
  `#define VERSTR` included newline characters instead of \n. This caused compiler
  errors due to unterminated strings. Fix by using printf instead of echo.
  A less fragile solution might be to bootstrap the in-tree /bin/sh but that
  requires more changes.
  
  Reviewed By:	brooks
  Differential Revision: https://reviews.freebsd.org/D24136

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==============================================================================
--- head/sys/conf/newvers.sh	Mon Mar 23 17:51:39 2020	(r359251)
+++ head/sys/conf/newvers.sh	Mon Mar 23 17:51:44 2020	(r359252)
@@ -343,7 +343,7 @@ EOF
 )
 vers_content_old=$(cat vers.c 2>/dev/null || true)
 if [ "$vers_content_new" != "$vers_content_old" ]; then
-	echo "$vers_content_new" > vers.c
+	printf "%s" "$vers_content_new" > vers.c
 fi
 
 echo $((v + 1)) > version



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003231751.02NHpjg6024010>