Make DTrace stuff compile with C99 standard.

This commit is contained in:
delphij 2014-08-22 20:04:51 +00:00
parent ac07a3a377
commit b684263996
7 changed files with 13 additions and 2 deletions

View File

@ -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.

View File

@ -723,6 +723,11 @@ extern int _dtrace_argmax; /* default maximum probe arguments */
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

View File

@ -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>

View File

@ -36,6 +36,7 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/stat.h>
#include <dt_parser.h>

View File

@ -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) \

View File

@ -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

View File

@ -18,7 +18,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${.CURDIR}/../../../sys
CFLAGS+= -DNEED_ERRLOC -g
CSTD?= gnu99
#YFLAGS+= -d