Module Name: othersrc
Committed By: agc
Date: Tue May 3 06:28:22 UTC 2011
Modified Files:
othersrc/external/bsd/crc/dist: libcrc.h
othersrc/external/bsd/find2/dist: find2.h
othersrc/external/bsd/hmac/dist: hmac.h
othersrc/external/bsd/rs/dist: rs.h
Log Message:
use C calling conventions via BEGIN_DECLS/END_DECLS
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/crc/dist/libcrc.h
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/find2/dist/find2.h
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/hmac/dist/hmac.h
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/rs/dist/rs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/external/bsd/crc/dist/libcrc.h
diff -u othersrc/external/bsd/crc/dist/libcrc.h:1.1.1.1 othersrc/external/bsd/crc/dist/libcrc.h:1.2
--- othersrc/external/bsd/crc/dist/libcrc.h:1.1.1.1 Thu Apr 28 02:09:00 2011
+++ othersrc/external/bsd/crc/dist/libcrc.h Tue May 3 06:28:22 2011
@@ -45,6 +45,18 @@
#include <inttypes.h>
+#ifndef __BEGIN_DECLS
+# if defined(__cplusplus)
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+# else
+# define __BEGIN_DECLS
+# define __END_DECLS
+# endif
+#endif
+
+__BEGIN_DECLS
+
/******************************************************************************/
#define CRC_DEF_WIDTH 4
@@ -78,4 +90,6 @@
unsigned CRC_tabentry(CRC_CTX */*ctx*/, int /*indx*/);
+__END_DECLS
+
#endif
Index: othersrc/external/bsd/find2/dist/find2.h
diff -u othersrc/external/bsd/find2/dist/find2.h:1.1.1.1 othersrc/external/bsd/find2/dist/find2.h:1.2
--- othersrc/external/bsd/find2/dist/find2.h:1.1.1.1 Sat Mar 19 04:44:51 2011
+++ othersrc/external/bsd/find2/dist/find2.h Tue May 3 06:28:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: find2.h,v 1.1.1.1 2011/03/19 04:44:51 agc Exp $ */
+/* $NetBSD: find2.h,v 1.2 2011/05/03 06:28:22 agc Exp $ */
/*-
* Copyright (c) 2005-2011 Alistair Crooks <[email protected]>
@@ -33,6 +33,18 @@
#include <stdio.h>
#include <time.h>
+#ifndef __BEGIN_DECLS
+# if defined(__cplusplus)
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+# else
+# define __BEGIN_DECLS
+# define __END_DECLS
+# endif
+#endif
+
+__BEGIN_DECLS
+
/* a phrase in an expression */
typedef struct f2phrase_t {
int name; /* token for name of var */
@@ -73,4 +85,6 @@
int find2_parse(find_t *, const char *);
int find2(find_t *, const char *, FILE *);
+__END_DECLS
+
#endif /* FIND2_H_ */
Index: othersrc/external/bsd/hmac/dist/hmac.h
diff -u othersrc/external/bsd/hmac/dist/hmac.h:1.1.1.1 othersrc/external/bsd/hmac/dist/hmac.h:1.2
--- othersrc/external/bsd/hmac/dist/hmac.h:1.1.1.1 Thu Apr 14 04:52:46 2011
+++ othersrc/external/bsd/hmac/dist/hmac.h Tue May 3 06:28:22 2011
@@ -27,6 +27,19 @@
#include <inttypes.h>
+#ifndef __BEGIN_DECLS
+# if defined(__cplusplus)
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+# else
+# define __BEGIN_DECLS
+# define __END_DECLS
+# endif
+#endif
+
+__BEGIN_DECLS
+
+
int hmac(const char *, uint8_t *, size_t, const uint8_t *, size_t, uint8_t *, size_t);
size_t hmac_bin2str(uint8_t *, size_t, char *, size_t);
size_t hmac_str2bin(uint8_t *, size_t, uint8_t *, size_t);
@@ -36,4 +49,6 @@
HMAC_MAX_STRING_SIZE = (HMAC_MAX_DIGEST_SIZE * 2) + 1
};
+__END_DECLS
+
#endif
Index: othersrc/external/bsd/rs/dist/rs.h
diff -u othersrc/external/bsd/rs/dist/rs.h:1.3 othersrc/external/bsd/rs/dist/rs.h:1.4
--- othersrc/external/bsd/rs/dist/rs.h:1.3 Tue Apr 26 15:41:26 2011
+++ othersrc/external/bsd/rs/dist/rs.h Tue May 3 06:28:21 2011
@@ -35,6 +35,18 @@
#include <inttypes.h>
+#ifndef __BEGIN_DECLS
+# if defined(__cplusplus)
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+# else
+# define __BEGIN_DECLS
+# define __END_DECLS
+# endif
+#endif
+
+__BEGIN_DECLS
+
typedef struct rs_header_t {
char magic[4]; /* magic number */
uint32_t poly; /* polynomial used */
@@ -82,4 +94,6 @@
ssize_t rs_get_header(rs_t *, const void *, size_t);
ssize_t rs_put_header(rs_t *, void *, size_t);
+__END_DECLS
+
#endif