(x86)
I see numerous posts about preprocessor problems, but nothing this simple...
$ cat test.d
#include "test.h"
pid$1::accept:entry
{
printf("accept(%d)\n", arg0);
}
$ cat test.h
typedef int16_t port_t;
$ pfexec /usr/sbin/dtrace -32 -I. -C -s ./test.d 524
dtrace: failed to compile script ./test.d: "./test.h", line 1: syntax
error near "port_t"
$ cc -E ./test.d > foo.d
$ pfexec /usr/sbin/dtrace -32 -s ./foo.d 524
dtrace: script './foo.d' matched 1 probe
^C
$ /usr/ccs/lib/cpp test.d > foo2.d
$ diff foo.d foo2.d
1,2c1,2
< # 1 "./test.d"
< # 1 "test.h"
---
> # 1 "test.d"
> # 1 "./test.h" 1
4c4
< # 2 "./test.d"
---
> # 2 "test.d" 2
11d10
< #ident "acomp: Sun Ceres C 5.10 SunOS_i386 2008/10/22"
$
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org