aboutsummaryrefslogtreecommitdiff
path: root/lib/libcbor/cbor/cbor_export.h
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2021-10-07 00:42:40 +0000
committerEd Maste <emaste@FreeBSD.org>2021-10-15 19:10:24 +0000
commit2e85df652caef859c532b7e1e8a178c75f1a4a92 (patch)
tree0bc9ba211f0e6c91543b0035c00b6d8bff54d4cc /lib/libcbor/cbor/cbor_export.h
parent67829b6307b8c81397cedaaf7a0e6e281560be32 (diff)
downloadsrc-2e85df652caef859c532b7e1e8a178c75f1a4a92.tar.gz
src-2e85df652caef859c532b7e1e8a178c75f1a4a92.zip
Add libcbor to the build
From https://github.com/PJK/libcbor: libcbor is a C library for parsing and generating CBOR, the general- purpose schema-less binary data format. libcbor will be used by ssh to support FIDO/U2F keys. It is currently intended only for use by ssh, and so is installed as a PRIVATELIB and is placed in the ssh pkgbase package. cbor_export.h and configuration.h were generated by the upstream CMake build. We could create them with bmake rules instead (as NetBSD has done) but this is a fine start. This is currently disabled for the 32-bit library build as libfido2 is not compatible with the COMPAT_32BIT hack in usb_ioctl.h, and there is no need for libcbor without libfido2. Reviewed by: kevans MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32347
Diffstat (limited to 'lib/libcbor/cbor/cbor_export.h')
-rw-r--r--lib/libcbor/cbor/cbor_export.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/libcbor/cbor/cbor_export.h b/lib/libcbor/cbor/cbor_export.h
new file mode 100644
index 000000000000..cce2560b8d29
--- /dev/null
+++ b/lib/libcbor/cbor/cbor_export.h
@@ -0,0 +1,42 @@
+
+#ifndef CBOR_EXPORT_H
+#define CBOR_EXPORT_H
+
+#ifdef CBOR_STATIC_DEFINE
+# define CBOR_EXPORT
+# define CBOR_NO_EXPORT
+#else
+# ifndef CBOR_EXPORT
+# ifdef cbor_EXPORTS
+ /* We are building this library */
+# define CBOR_EXPORT __attribute__((visibility("default")))
+# else
+ /* We are using this library */
+# define CBOR_EXPORT __attribute__((visibility("default")))
+# endif
+# endif
+
+# ifndef CBOR_NO_EXPORT
+# define CBOR_NO_EXPORT __attribute__((visibility("hidden")))
+# endif
+#endif
+
+#ifndef CBOR_DEPRECATED
+# define CBOR_DEPRECATED __attribute__ ((__deprecated__))
+#endif
+
+#ifndef CBOR_DEPRECATED_EXPORT
+# define CBOR_DEPRECATED_EXPORT CBOR_EXPORT CBOR_DEPRECATED
+#endif
+
+#ifndef CBOR_DEPRECATED_NO_EXPORT
+# define CBOR_DEPRECATED_NO_EXPORT CBOR_NO_EXPORT CBOR_DEPRECATED
+#endif
+
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef CBOR_NO_DEPRECATED
+# define CBOR_NO_DEPRECATED
+# endif
+#endif
+
+#endif /* CBOR_EXPORT_H */