[Midnightbsd-cvs] src [7097] trunk/bin/expr: fix build
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Jul 16 07:54:03 EDT 2015
Revision: 7097
http://svnweb.midnightbsd.org/src/?rev=7097
Author: laffer1
Date: 2015-07-16 07:54:03 -0400 (Thu, 16 Jul 2015)
Log Message:
-----------
fix build
Modified Paths:
--------------
trunk/bin/expr/Makefile
trunk/bin/expr/expr.1
trunk/bin/expr/expr.y
Modified: trunk/bin/expr/Makefile
===================================================================
--- trunk/bin/expr/Makefile 2015-07-16 11:52:35 UTC (rev 7096)
+++ trunk/bin/expr/Makefile 2015-07-16 11:54:03 UTC (rev 7097)
@@ -1,8 +1,15 @@
-# $MidnightBSD: src/bin/expr/Makefile,v 1.3 2012/04/12 23:23:29 laffer1 Exp $
-# $FreeBSD: src/bin/expr/Makefile,v 1.18 2003/06/13 07:04:02 markm Exp $
+# $MidnightBSD$
+# $FreeBSD: stable/10/bin/expr/Makefile 281148 2015-04-06 14:45:40Z dim $
+.include <bsd.own.mk>
+
PROG= expr
SRCS= expr.y
YFLAGS=
+# expr relies on signed integer wrapping
+CFLAGS+= -fwrapv
+
+NO_WMISSING_VARIABLE_DECLARATIONS=
+
.include <bsd.prog.mk>
Modified: trunk/bin/expr/expr.1
===================================================================
--- trunk/bin/expr/expr.1 2015-07-16 11:52:35 UTC (rev 7096)
+++ trunk/bin/expr/expr.1 2015-07-16 11:54:03 UTC (rev 7097)
@@ -28,8 +28,8 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/bin/expr/expr.1,v 1.28 2005/01/16 16:41:57 ru Exp $
-.\" $MidnightBSD: src/bin/expr/expr.1,v 1.3 2012/04/12 12:18:51 laffer1 Exp $
+.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/bin/expr/expr.1 235400 2012-05-13 14:16:04Z joel $
.\"
.Dd February 25, 2012
.Dt EXPR 1
@@ -78,7 +78,7 @@
and
.Ql } .
.Bl -tag -width indent
-.It Ar expr1 Li | Ar expr2
+.It Ar expr1 Li \&| Ar expr2
Return the evaluation of
.Ar expr1
if it is neither an empty string nor zero;
Modified: trunk/bin/expr/expr.y
===================================================================
--- trunk/bin/expr/expr.y 2015-07-16 11:52:35 UTC (rev 7096)
+++ trunk/bin/expr/expr.y 2015-07-16 11:54:03 UTC (rev 7097)
@@ -5,8 +5,8 @@
*
* Largely rewritten by J.T. Conklin (jtc at wimsey.com)
*
- * $FreeBSD: src/bin/expr/expr.y,v 1.24 2005/01/10 08:39:22 imp Exp $
- * $MidnightBSD: src/bin/expr/expr.y,v 1.3 2008/06/30 03:07:46 laffer1 Exp $
+ * $MidnightBSD$
+ * $FreeBSD: stable/10/bin/expr/expr.y 235771 2012-05-22 03:01:54Z kevlo $
*/
#include <sys/types.h>
@@ -75,7 +75,6 @@
void to_string(struct val *);
int yyerror(const char *);
int yylex(void);
-int yyparse(void);
%}
@@ -541,7 +540,7 @@
v = make_str(a->u.s + rm[1].rm_so);
} else
- v = make_integer((intmax_t)(rm[0].rm_eo - rm[0].rm_so));
+ v = make_integer((intmax_t)(rm[0].rm_eo));
else
if (rp.re_nsub == 0)
v = make_integer((intmax_t)0);
More information about the Midnightbsd-cvs
mailing list