From owner-freebsd-current Tue Nov 5 2:58:16 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5987737B401; Tue, 5 Nov 2002 02:58:14 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21EA343E4A; Tue, 5 Nov 2002 02:58:14 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id EA29FAE34C; Tue, 5 Nov 2002 02:58:13 -0800 (PST) Date: Tue, 5 Nov 2002 02:58:13 -0800 From: Maxime Henrion To: Patrick Hartling Cc: current@freebsd.org, marcel@freebsd.org Subject: Re: uuid.h is not C++ safe Message-ID: <20021105105813.GD26605@elvis.mu.org> References: <3DC71B56.1050102@137.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="imjhCm/Pyz7Rq5F2" Content-Disposition: inline In-Reply-To: <3DC71B56.1050102@137.org> User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --imjhCm/Pyz7Rq5F2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --imjhCm/Pyz7Rq5F2 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="uuid.patch" 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 #include #include @@ -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_ */ --imjhCm/Pyz7Rq5F2-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message