Alexander Pyhalov <[email protected]> wrote:

> I do not understand this...
>
> $ /usr/lib/cpp.sun -D__sun -D__unix -D__SVR4 -D__SUNW_D=1 -D__SUNW_D_64 
> -D__SunOS_5_11 -D__amd64 -D__SUNW_D_VERSION=0x0100c001 -D__STDC__=0 
> usr/src/lib/libc/port/threads/plockstat.d  | gsed  -e '/^#/d' -e '/^$/d' 
>  > /tmp/cpp.sun.output
>
> $ /usr/lib/cpp -D__sun -D__unix -D__SVR4 -D__SUNW_D=1 -D__SUNW_D_64 
> -D__SunOS_5_11 -D__amd64 -D__SUNW_D_VERSION=0x0100c001 -D__STDC__=0 
> usr/src/lib/libc/port/threads/plockstat.d  | gsed  -e '/^#/d' -e '/^$/d' 
>  > /tmp/cpp.output
>
> $ diff -u /tmp/cpp.output /tmp/cpp.sun.output
> --- /tmp/cpp.output     Tue Feb 10 16:52:37 2015
> +++ /tmp/cpp.sun.output Tue Feb 10 16:52:32 2015
> @@ -310,7 +310,7 @@
>   typedef        long    fd_mask;
>   typedef        long    fds_mask;
>   typedef        struct fd_set {
> -       long    fds_bits[       (((65536)+(( (sizeof (fds_mask) * 8) 
> )-1))/( (sizeof (fds_mask) * 8) ))];
> +       long    fds_bits[(((65536)+(( (sizeof (fds_mask) * 8))-1))/( 
> (sizeof (fds_mask) * 8)))];
>   } fd_set;
>   extern int select(int, fd_set *, fd_set *,
>          fd_set *, struct timeval *);
>
> The original comman I've traced was LD_PRELOAD=/tmp/libdtrace.so.1 
> /usr/sbin/amd64/dtrace -xnolibs -G -64 -C -s 
> usr/src/lib/libc/port/threads/plockstat.d , so __amd64 is expected.
> But what is not is the diff. Are you sure that /dev/fd/3 is 
> usr/src/lib/libc/port/threads/plockstat.d ? diff doesn't show anything 
> related to int8_t...

I did run truss -f on dtrace and could verify that with the dtrace command:

/tmp/dtrace -xnolibs -G -64 -C -xlazyload -s 
usr/src/lib/libc/port/threads/plockstat.d

/dev/fd/3 is usr/src/lib/libc/port/threads/plockstat.d
and
/dev/fd/4 (the second file argument for cpp) is an empty new /tmp file.

So am I right to assume that diff -w on the suncpp vs. Schilycpp output
would not show differences?

If this is true, then I have an idea....

Try to keep the

# <linenumber> "filename" <number>

lines intact and check again.

The second number is used by dtrace and this is why we need the special K&R cpp.

Jörg

-- 
 EMail:[email protected]                    (home) Jörg Schilling D-13353 Berlin
       [email protected] (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.org/private/ 
http://sourceforge.net/projects/schilytools/files/'


-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com

Reply via email to