l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] libl4 compatibility


From: Ludovic Courtès
Subject: [PATCH] libl4 compatibility
Date: Tue, 18 Nov 2003 16:17:15 +0100
User-agent: Mutt/1.5.4i [Guile enabled]

Hi,

Below is a patch for libl4 that defines some types for compatibility
with the official libl4 and also defines __GNU_LIBL4__ so that programs
can easily differentiate between the two.

Coming soon: a patch for IDL4's headers.

diff -U2 -r1.3 l4.h
--- l4.h        18 Sep 2003 20:16:39 -0000      1.3
+++ l4.h        18 Nov 2003 15:10:01 -0000
@@ -23,4 +23,6 @@
 #define _L4_H  1
 
+#define __GNU_LIBL4__
+
 #include <l4/types.h>
 #include <l4/syscall.h>
diff -U2 -r1.4 ipc.h
--- l4/ipc.h    18 Sep 2003 15:46:58 -0000      1.4
+++ l4/ipc.h    18 Nov 2003 15:10:02 -0000
@@ -382,4 +382,8 @@
 })) l4_acceptor_t;
 
+#ifndef _L4_NOT_COMPAT
+typedef l4_acceptor_t L4_Acceptor_t;
+#endif
+
 #define l4_untyped_words_acceptor \
   ((l4_acceptor_t) { .string_items = 0, ._zero = 0, .rcv_window = 0 })
@@ -595,4 +599,7 @@
 } l4_msg_t;
 
+#ifndef _L4_NOT_COMPAT
+typedef l4_msg_t L4_Msg_t;
+#endif
 
 static inline void
diff -U2 -r1.8 types.h
--- l4/types.h  25 Sep 2003 00:17:36 -0000      1.8
+++ l4/types.h  18 Nov 2003 15:10:02 -0000
@@ -174,5 +174,4 @@
  } local)) l4_thread_id_t;
 
-
 
 /* The clock is 64 bits on all architectures.  The clock base is
diff -U2 -r1.3 types.h
--- l4/compat/types.h   9 Sep 2003 22:07:50 -0000       1.3
+++ l4/compat/types.h   18 Nov 2003 15:10:02 -0000
@@ -24,7 +24,16 @@
 #endif
 
-typedef l4_word_t L4_Word_t;
-typedef l4_uint64_t L4_Word64_t;
-typedef l4_word_t L4_Bool_t;
+#ifndef NULL
+# define NULL ((void *)0)
+#endif
+
+typedef l4_word_t      L4_Word_t;
+typedef l4_uint64_t    L4_Word64_t;
+typedef l4_word_t      L4_Bool_t;
+typedef l4_thread_id_t L4_ThreadId_t;
+typedef l4_fpage_t     L4_Fpage_t;
+typedef l4_msg_tag_t   L4_MsgTag_t;
+
+
 
 

Thanks,
Ludovic.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]