Make DTrace stuff compile with C99 standard.
This commit is contained in:
parent
d77e67e495
commit
4ddb46f694
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <dt_parser.h>
|
||||
|
@ -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) \
|
||||
|
@ -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
|
||||
|
@ -18,7 +18,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
|
||||
-I${.CURDIR}/../../../sys
|
||||
|
||||
CFLAGS+= -DNEED_ERRLOC -g
|
||||
CSTD?= gnu99
|
||||
|
||||
#YFLAGS+= -d
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user