Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Aug 2014 20:04:51 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r270358 - in head/cddl: . contrib/opensolaris/lib/libdtrace/common contrib/opensolaris/lib/libgen/common lib/libdtrace usr.sbin/lockstat
Message-ID:  <201408222004.s7MK4pEa035023@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Fri Aug 22 20:04:51 2014
New Revision: 270358
URL: http://svnweb.freebsd.org/changeset/base/270358

Log:
  Make DTrace stuff compile with C99 standard.

Modified:
  head/cddl/Makefile.inc
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c
  head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c
  head/cddl/lib/libdtrace/libproc_compat.h
  head/cddl/usr.sbin/lockstat/Makefile

Modified: head/cddl/Makefile.inc
==============================================================================
--- head/cddl/Makefile.inc	Fri Aug 22 20:01:35 2014	(r270357)
+++ head/cddl/Makefile.inc	Fri Aug 22 20:04:51 2014	(r270358)
@@ -8,7 +8,6 @@ IGNORE_PRAGMA=	YES
 CFLAGS+=	-DNEED_SOLARIS_BOOLEAN
 
 WARNS?=		6
-CSTD?=		gnu89
 
 # Do not lint the CDDL stuff. It is all externally maintained and
 # lint output is wasteful noise here.

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h	Fri Aug 22 20:01:35 2014	(r270357)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h	Fri Aug 22 20:04:51 2014	(r270358)
@@ -723,6 +723,11 @@ extern int _dtrace_argmax;		/* default m
 extern const char *_dtrace_libdir;	/* default library directory */
 extern const char *_dtrace_moddir;	/* default kernel module directory */
 
+#ifdef __FreeBSD__
+extern int gmatch(const char *, const char *);
+extern int yylex(void);
+#endif
+
 #ifdef	__cplusplus
 }
 #endif

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c	Fri Aug 22 20:01:35 2014	(r270357)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c	Fri Aug 22 20:04:51 2014	(r270358)
@@ -29,6 +29,11 @@
 #if defined(sun)
 #include <sys/modctl.h>
 #include <sys/systeminfo.h>
+#else
+/* FreeBSD */
+#include <sys/param.h>
+#include <sys/module.h>
+#include <sys/linker.h>
 #endif
 #include <sys/resource.h>
 

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c	Fri Aug 22 20:01:35 2014	(r270357)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c	Fri Aug 22 20:04:51 2014	(r270358)
@@ -36,6 +36,7 @@
 #include <stdio.h>
 
 #include <sys/types.h>
+#include <sys/sysctl.h>
 #include <sys/stat.h>
 
 #include <dt_parser.h>

Modified: head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c	Fri Aug 22 20:01:35 2014	(r270357)
+++ head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c	Fri Aug 22 20:04:51 2014	(r270358)
@@ -42,6 +42,7 @@
 #include <widec.h>
 #include "_range.h"
 #else
+#include <ctype.h>
 /* DOODAD */ static int multibyte = 0;
 #define WCHAR_CSMASK    0x30000000
 #define valid_range(c1, c2) \

Modified: head/cddl/lib/libdtrace/libproc_compat.h
==============================================================================
--- head/cddl/lib/libdtrace/libproc_compat.h	Fri Aug 22 20:01:35 2014	(r270357)
+++ head/cddl/lib/libdtrace/libproc_compat.h	Fri Aug 22 20:04:51 2014	(r270358)
@@ -43,6 +43,7 @@
 #define	Pcreate_error strerror
 #define	Pdelbkpt proc_bkptdel
 #define	Pgrab_error strerror
+#define	Plmid(p, a, l) (-1)
 #define	Plmid_to_map(p, l, o) proc_obj2map((p), (o))
 #define	Plookup_by_addr proc_addr2sym
 #define	Pname_to_ctf(p, obj) NULL

Modified: head/cddl/usr.sbin/lockstat/Makefile
==============================================================================
--- head/cddl/usr.sbin/lockstat/Makefile	Fri Aug 22 20:01:35 2014	(r270357)
+++ head/cddl/usr.sbin/lockstat/Makefile	Fri Aug 22 20:04:51 2014	(r270358)
@@ -18,7 +18,6 @@ CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/
 		-I${.CURDIR}/../../../sys
 
 CFLAGS+=	-DNEED_ERRLOC -g
-CSTD?=		gnu99
 
 #YFLAGS+=	-d
 



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