

This patch allows the the header to be used in C++ programs by surrounding it
with extern "C" clauses. This has no effect on C programs but it's needed by
the C++ linker. It's ugly but there's nothing much we can do to avoid it
(besides blaming C++, of course =).

Thanks to Ronald Burkey.



---

 cur-root/lib/old.h |   10 ++++++++++
 1 files changed, 10 insertions(+)

diff -puN lib/old.h~extern_C lib/old.h
--- cur/lib/old.h~extern_C	2004-04-27 11:15:16.000000000 -0300
+++ cur-root/lib/old.h	2004-04-27 11:15:16.000000000 -0300
@@ -8,6 +8,11 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* some useful typedefs */
 typedef uint8_t         u8;
 typedef uint16_t        u16;
@@ -63,5 +68,10 @@ int old_lock(int fd, char *s);
 int old_unlock(int fd, char *s);
 int old_trylock(int fd, char *s);
 
+
+#ifdef __cplusplus
+} /* from extern "C" avobe */
+#endif
+
 #endif
 

_
