Joerg Schilling писал 09.02.2015 20:14:
Alexander Pyhalov <[email protected]> wrote:

>> --- /usr/include/asm/byteorder.h (Sun cpp)
>> +++ /usr/include/asm/byteorder.h (Schilix cpp)
>> @@ -1,4 +1,6 @@
>> -typedef signed char            int8_t;
>> +typedef        struct _label_t { long val[6]; } label_t;
>> +typedef        unsigned char   lock_t;
>> +typedef char                   int8_t;
>
> This looks strange....
>
> /usr/include/asm/byteorder.h is a direct copy of
> usr/src/uts/intel/asm/byteorder.h.
>
> cpp is not used to create that file and the content you are talking of
> is not in that file.
>
> Or are you givng the output from processing asm/byteorder.h with cpp?
>

Yes, these are results from preprocessing asm/byteorder.h with cpp

So you get something that differs significantly from the latest OpenSolaris
sources.

Please provide more information on the problem!

        The "reference" output you send cannot be created by the Sun cpp....


/usr/lib/cpp -V
cpp: Software Generation Utilities (SGU) SunOS/SVR4

$ /usr/lib/cpp /usr/include/asm/byteorder.h  >/tmp/sun.cpp
"/usr/include/sys/isa_defs.h", line 476: undefined control

$ ./build/prototype/i386/usr/lib/cpp /usr/include/asm/byteorder.h > /tmp/s.cpp

$ sed -i -e '/^#/d' -e '/^$/d' /tmp/sun.cpp
$ sed -i -e '/^#/d' -e '/^$/d' /tmp/s.cpp

$ diff -u /tmp/sun.cpp  /tmp/s.cpp
--- /tmp/sun.cpp        2015-02-09 20:28:13.113917923 +0300
+++ /tmp/s.cpp  2015-02-09 20:28:16.843525501 +0300
@@ -1,4 +1,6 @@
-typedef signed char            int8_t;
+typedef        struct _label_t { long val[6]; } label_t;
+typedef        unsigned char   lock_t;
+typedef char                   int8_t;
 typedef short                  int16_t;
 typedef int                    int32_t;
 typedef        long long               int64_t;
@@ -10,7 +12,7 @@
 typedef uint64_t               uintmax_t;
 typedef        int                     intptr_t;
 typedef        unsigned int            uintptr_t;
-typedef signed char            int_fast8_t;
+typedef char                   int_fast8_t;
 typedef int                    int_fast16_t;
 typedef int                    int_fast32_t;
 typedef long long              int_fast64_t;
@@ -18,7 +20,7 @@
 typedef unsigned int           uint_fast16_t;
 typedef unsigned int           uint_fast32_t;
 typedef unsigned long long     uint_fast64_t;
-typedef signed char            int_least8_t;
+typedef char                   int_least8_t;
 typedef short                  int_least16_t;
 typedef int                    int_least32_t;
 typedef long long              int_least64_t;
@@ -72,6 +74,20 @@
 typedef        u_longlong_t    u_offset_t;
 typedef u_longlong_t   len_t;
 typedef        u_longlong_t    diskaddr_t;
+typedef union {
+       offset_t        _f;
+       struct {
+               int32_t _l;
+               int32_t _u;
+       } _p;
+} lloff_t;
+typedef union {
+       longlong_t      _f;
+       struct {
+               int32_t _l;
+               int32_t _u;
+       } _p;
+} lldaddr_t;
 typedef uint_t k_fltset_t;
 typedef        long            id_t;
 typedef id_t           lgrp_id_t;
@@ -294,7 +310,7 @@
 typedef        long    fd_mask;
 typedef        long    fds_mask;
 typedef        struct fd_set {
- long fds_bits[(((1024)+(( (sizeof (fds_mask) * 8))-1))/( (sizeof (fds_mask) * 8)))]; + long fds_bits[ (((1024)+(( (sizeof (fds_mask) * 8) )-1))/( (sizeof (fds_mask) * 8) ))];
 } fd_set;
 extern int select(int, fd_set *, fd_set *,
        fd_set *, struct timeval *);

More information is here:
http://buildzone.oi-build.r61.net/cpp-s/

used_includes.tar - all includes used by cpp,
s.cpp.full and sun.cpp.full - full output of Schilly cpp and Sun cpp,
s.cpp and sun.cpp - truncated output of Schilly cpp and Sun cpp (sed -i -e '/^#/d' -e '/^$/d')

Here Sun cpp (as I understand it) is the latest version from OpenSolaris distribution.

---
System Administrator of Southern Federal University Computer Center







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