Patrick Hartling wrote: > I was just about to put the new DCE 1.1 UUID functions into use in some > C++ code, but linking fails because the function prototypes in uuid.h > are not protected with the __cplusplus/extern "C" bits. It's easy > enough for me to fix my local copy, but I'm sure this same thing could > trip up other people.
This should be fixed with the attached patch. Marcel, can you review and commit it please ? Cheers, Maxime
Index: uuid.h =================================================================== RCS file: /space2/ncvs/src/lib/libc/uuid/uuid.h,v retrieving revision 1.1 diff -u -p -r1.1 uuid.h --- uuid.h 30 Oct 2002 03:51:00 -0000 1.1 +++ uuid.h 5 Nov 2002 10:55:56 -0000 @@ -30,6 +30,7 @@ #ifndef _UUID_H_ #define _UUID_H_ +#include <sys/cdefs.h> #include <sys/types.h> #include <sys/uuid.h> @@ -45,6 +46,7 @@ #define uuid_s_invalid_string_uuid 2 #define uuid_s_no_memory 3 +__BEGIN_DECLS int32_t uuid_compare(uuid_t *, uuid_t *, uint32_t *); void uuid_create(uuid_t *, uint32_t *); void uuid_create_nil(uuid_t *, uint32_t *); @@ -53,5 +55,6 @@ void uuid_from_string(const char *, uuid uint16_t uuid_hash(uuid_t *, uint32_t *); int32_t uuid_is_nil(uuid_t *, uint32_t *); void uuid_to_string(uuid_t *, char **, uint32_t *); +__END_DECLS #endif /* _UUID_H_ */