Browse Source

Make DTrace stuff compile with C99 standard.

freebsd/11.0-releng/master
delphij 5 years ago
parent
commit
b684263996
7 changed files with 13 additions and 2 deletions
  1. +0
    -1
      cddl/Makefile.inc
  2. +5
    -0
      cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
  3. +5
    -0
      cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
  4. +1
    -0
      cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c
  5. +1
    -0
      cddl/contrib/opensolaris/lib/libgen/common/gmatch.c
  6. +1
    -0
      cddl/lib/libdtrace/libproc_compat.h
  7. +0
    -1
      cddl/usr.sbin/lockstat/Makefile

+ 0
- 1
cddl/Makefile.inc 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.

+ 5
- 0
cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h 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

+ 5
- 0
cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c 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>


+ 1
- 0
cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c 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>

+ 1
- 0
cddl/contrib/opensolaris/lib/libgen/common/gmatch.c 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) \

+ 1
- 0
cddl/lib/libdtrace/libproc_compat.h 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

+ 0
- 1
cddl/usr.sbin/lockstat/Makefile View File

@@ -18,7 +18,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${.CURDIR}/../../../sys

CFLAGS+= -DNEED_ERRLOC -g
CSTD?= gnu99

#YFLAGS+= -d


Loading…
Cancel
Save