]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD/MINOR: 51d: Updated build registration output to indicate thatif the library...
authorBen51Degrees <Ben@51Degrees.com>
Thu, 13 Jun 2019 15:51:59 +0000 (16:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 13 Jun 2019 16:00:54 +0000 (18:00 +0200)
When built with the dummy 51Degrees library for testing, the output will
include "(dummy library)" to ensure it is clear that this is this is not
the API.

contrib/51d/src/pattern/51Degrees.h
contrib/51d/src/trie/51Degrees.h
src/51d.c

index 6a646a69fc7a226cfe77144ef216b147d68e5fa2..9aaf9498ea323c52cd0330e31c028e0dedf2e093 100644 (file)
 #define FIFTYONEDEGREES_H_PATTERN_INCLUDED
 #endif
 
+#ifndef FIFTYONEDEGREES_DUMMY_LIB
+#define FIFTYONEDEGREES_DUMMY_LIB
+#endif
+
 #include <stdint.h>
 
 typedef enum e_fiftyoneDegrees_MatchMethod {
index a5f0868c4cc15271cc25c278aec19a2f1455687d..bedcfd7b341d54b585b239624d7c3be0862f4b57 100644 (file)
 #define FIFTYONEDEGREES_H_TRIE_INCLUDED
 #endif
 
+#ifndef FIFTYONEDEGREES_DUMMY_LIB
+#define FIFTYONEDEGREES_DUMMY_LIB
+#endif
+
 #include <stdint.h>
 
 typedef enum e_fiftyoneDegrees_DataSetInitStatus {
index bf4065802cd5f4f96a0ab876cc35f911b9056051..344be41be1991ba8cd866aa2b422be14adc18d0a 100644 (file)
--- a/src/51d.c
+++ b/src/51d.c
@@ -827,4 +827,17 @@ INITCALL1(STG_REGISTER, sample_register_convs, &conv_kws);
 
 REGISTER_POST_CHECK(init_51degrees);
 REGISTER_POST_DEINIT(deinit_51degrees);
-REGISTER_BUILD_OPTS("Built with 51Degrees support.");
+
+#if defined(FIFTYONEDEGREES_H_PATTERN_INCLUDED)
+#ifndef FIFTYONEDEGREES_DUMMY_LIB
+       REGISTER_BUILD_OPTS("Built with 51Degrees Pattern support.");
+#else
+       REGISTER_BUILD_OPTS("Built with 51Degrees Pattern support (dummy library).");
+#endif
+#elif defined(FIFTYONEDEGREES_H_TRIE_INCLUDED)
+#ifndef FIFTYONEDEGREES_DUMMY_LIB
+       REGISTER_BUILD_OPTS("Built with 51Degrees Trie support.");
+#else
+       REGISTER_BUILD_OPTS("Built with 51Degrees Trie support (dummy library).");
+#endif
+#endif
\ No newline at end of file