On 02/10/2015 19:12, Joerg Schilling via illumos-discuss wrote:
Now it would be good to make it work when compiled with gcc :)
What is your problem with GCC compilation?
I have no problem with compiling it usuing GCC.
I recently added some small changes to allow compilation with clang (this is in
cpp.c SCCS SID version 1.30).
Note that you need the schily printf() code as Illumos does not support %r in
the libc printf.
grep printf src/* |grep %r
^ shows nothing
I tried the compile Schilly cpp with gcc. That's results on
/usr/include/asm/byteorder.h.
1) With studio:
diff -u /tmp/cpp.cc.ouput /tmp/cpp.sun.ouptut
--- /tmp/cpp.cc.ouput 2015-02-10 19:23:24.790378957 +0300
+++ /tmp/cpp.sun.ouptut 2015-02-10 19:23:30.357847112 +0300
@@ -294,7 +294,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 *);
2) With gcc:
diff -u /tmp/cpp.gcc.ouput /tmp/cpp.sun.ouptut
--- /tmp/cpp.gcc.ouput 2015-02-10 19:25:04.724610102 +0300
+++ /tmp/cpp.sun.ouptut 2015-02-10 19:23:30.357847112 +0300
@@ -1,6 +1,4 @@
-typedef struct _label_t { long val[6]; } label_t;
-typedef unsigned char lock_t;
-typedef char int8_t;
+typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
@@ -12,7 +10,7 @@
typedef uint64_t uintmax_t;
typedef int intptr_t;
typedef unsigned int uintptr_t;
-typedef char int_fast8_t;
+typedef signed char int_fast8_t;
typedef int int_fast16_t;
typedef int int_fast32_t;
typedef long long int_fast64_t;
@@ -20,7 +18,7 @@
typedef unsigned int uint_fast16_t;
typedef unsigned int uint_fast32_t;
typedef unsigned long long uint_fast64_t;
-typedef char int_least8_t;
+typedef signed char int_least8_t;
typedef short int_least16_t;
typedef int int_least32_t;
typedef long long int_least64_t;
@@ -74,20 +72,6 @@
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;
@@ -310,7 +294,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 *);
--
С уважением,
Александр Пыхалов,
программист отдела телекоммуникационной инфраструктуры
управления информационно-коммуникационной инфраструктуры ЮФУ
-------------------------------------------
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