[master] 1b49d5687 build: Prefix all VMOD sources with vmod_<name>

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Jan 7 14:16:08 UTC 2021


commit 1b49d56877e81d09c352a456fdcb11fe977cf673
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Jan 7 12:14:58 2021 +0100

    build: Prefix all VMOD sources with vmod_<name>

diff --git a/vmod/Makefile.am b/vmod/Makefile.am
index 32331da09..6557b366e 100644
--- a/vmod/Makefile.am
+++ b/vmod/Makefile.am
@@ -20,12 +20,12 @@ AM_CPPFLAGS = \
 libvmod_blob_la_SOURCES = \
 	vmod_blob.c \
 	vmod_blob.h \
-	id.c \
-	base64.c \
-	hex.c \
-	url.c \
-	tbl_encodings.h \
-	tbl_case.h
+	vmod_blob_id.c \
+	vmod_blob_base64.c \
+	vmod_blob_hex.c \
+	vmod_blob_url.c \
+	vmod_blob_tbl_encodings.h \
+	vmod_blob_tbl_case.h
 
 libvmod_cookie_la_SOURCES = \
 	vmod_cookie.c
@@ -38,15 +38,15 @@ libvmod_debug_la_SOURCES = \
 libvmod_directors_la_SOURCES = \
 	vmod_directors.c \
 	vmod_directors.h \
-	fall_back.c \
-	hash.c \
-	random.c \
-	round_robin.c \
-	vmod_shard.c \
-	shard_cfg.c \
-	shard_cfg.h \
-	shard_dir.c \
-	shard_dir.h
+	vmod_directors_fall_back.c \
+	vmod_directors_hash.c \
+	vmod_directors_random.c \
+	vmod_directors_round_robin.c \
+	vmod_directors_shard.c \
+	vmod_directors_shard_cfg.c \
+	vmod_directors_vmod_directors_shard_cfg.h \
+	vmod_directors_shard_dir.c \
+	vmod_directors_shard_dir.h
 
 libvmod_proxy_la_SOURCES = \
 	vmod_proxy.c
@@ -62,7 +62,7 @@ libvmod_std_la_SOURCES = \
 
 libvmod_unix_la_SOURCES = \
 	vmod_unix.c \
-	cred_compat.h
+	vmod_unix_cred_compat.h
 
 libvmod_vtc_la_SOURCES = \
 	vmod_vtc.c
diff --git a/vmod/flint.lnt b/vmod/flint.lnt
index ac5724d6c..34dfed208 100644
--- a/vmod/flint.lnt
+++ b/vmod/flint.lnt
@@ -2,7 +2,7 @@
  * vmod_{blob,directors}
  */
 
--efile(451, "tbl_*.h")		// No include guard
+-efile(451, "vmod_*_tbl_*.h")	// No include guard
 
 /*
  * vmod_blob
diff --git a/vmod/vmod_blob.c b/vmod/vmod_blob.c
index c9c3dac2e..e1f474c26 100644
--- a/vmod/vmod_blob.c
+++ b/vmod/vmod_blob.c
@@ -121,7 +121,7 @@ static enum encoding
 parse_encoding(VCL_ENUM e)
 {
 #define VMODENUM(n) if (e == VENUM(n)) return (n);
-#include "tbl_encodings.h"
+#include "vmod_blob_tbl_encodings.h"
 	WRONG("illegal encoding enum");
 }
 
@@ -129,7 +129,7 @@ static enum case_e
 parse_case(VCL_ENUM e)
 {
 #define VMODENUM(n) if (e == VENUM(n)) return (n);
-#include "tbl_case.h"
+#include "vmod_blob_tbl_case.h"
 	WRONG("illegal case enum");
 }
 
diff --git a/vmod/vmod_blob.h b/vmod/vmod_blob.h
index 4574bdf9f..90872b61a 100644
--- a/vmod/vmod_blob.h
+++ b/vmod/vmod_blob.h
@@ -36,7 +36,7 @@
 enum encoding {
 	__INVALID_ENCODING = 0,
 #define VMODENUM(x) x,
-#include "tbl_encodings.h"
+#include "vmod_blob_tbl_encodings.h"
 	__MAX_ENCODING
 };
 
@@ -48,7 +48,7 @@ enum encoding {
  */
 enum case_e {
 #define VMODENUM(x) x,
-#include "tbl_case.h"
+#include "vmod_blob_tbl_case.h"
 };
 
 typedef const size_t			blob_len_t;
diff --git a/vmod/base64.c b/vmod/vmod_blob_base64.c
similarity index 100%
rename from vmod/base64.c
rename to vmod/vmod_blob_base64.c
diff --git a/vmod/hex.c b/vmod/vmod_blob_hex.c
similarity index 100%
rename from vmod/hex.c
rename to vmod/vmod_blob_hex.c
diff --git a/vmod/id.c b/vmod/vmod_blob_id.c
similarity index 100%
rename from vmod/id.c
rename to vmod/vmod_blob_id.c
diff --git a/vmod/tbl_case.h b/vmod/vmod_blob_tbl_case.h
similarity index 100%
rename from vmod/tbl_case.h
rename to vmod/vmod_blob_tbl_case.h
diff --git a/vmod/tbl_encodings.h b/vmod/vmod_blob_tbl_encodings.h
similarity index 100%
rename from vmod/tbl_encodings.h
rename to vmod/vmod_blob_tbl_encodings.h
diff --git a/vmod/url.c b/vmod/vmod_blob_url.c
similarity index 100%
rename from vmod/url.c
rename to vmod/vmod_blob_url.c
diff --git a/vmod/fall_back.c b/vmod/vmod_directors_fall_back.c
similarity index 100%
rename from vmod/fall_back.c
rename to vmod/vmod_directors_fall_back.c
diff --git a/vmod/hash.c b/vmod/vmod_directors_hash.c
similarity index 100%
rename from vmod/hash.c
rename to vmod/vmod_directors_hash.c
diff --git a/vmod/random.c b/vmod/vmod_directors_random.c
similarity index 100%
rename from vmod/random.c
rename to vmod/vmod_directors_random.c
diff --git a/vmod/round_robin.c b/vmod/vmod_directors_round_robin.c
similarity index 100%
rename from vmod/round_robin.c
rename to vmod/vmod_directors_round_robin.c
diff --git a/vmod/vmod_shard.c b/vmod/vmod_directors_shard.c
similarity index 99%
rename from vmod/vmod_shard.c
rename to vmod/vmod_directors_shard.c
index a88095c26..d12df4476 100644
--- a/vmod/vmod_shard.c
+++ b/vmod/vmod_directors_shard.c
@@ -40,8 +40,8 @@
 #include "vend.h"
 
 #include "vcc_directors_if.h"
-#include "shard_dir.h"
-#include "shard_cfg.h"
+#include "vmod_directors_shard_dir.h"
+#include "vmod_directors_shard_cfg.h"
 #include "vsb.h"
 
 /* -------------------------------------------------------------------------
diff --git a/vmod/shard_cfg.c b/vmod/vmod_directors_shard_cfg.c
similarity index 99%
rename from vmod/shard_cfg.c
rename to vmod/vmod_directors_shard_cfg.c
index 1a0cb40e4..680a8cf04 100644
--- a/vmod/shard_cfg.c
+++ b/vmod/vmod_directors_shard_cfg.c
@@ -38,8 +38,8 @@
 
 #include "cache/cache.h"
 
-#include "shard_dir.h"
-#include "shard_cfg.h"
+#include "vmod_directors_shard_dir.h"
+#include "vmod_directors_shard_cfg.h"
 
 /*lint -esym(749,  shard_change_task_e::*) */
 enum shard_change_task_e {
diff --git a/vmod/shard_cfg.h b/vmod/vmod_directors_shard_cfg.h
similarity index 100%
rename from vmod/shard_cfg.h
rename to vmod/vmod_directors_shard_cfg.h
diff --git a/vmod/shard_dir.c b/vmod/vmod_directors_shard_dir.c
similarity index 99%
rename from vmod/shard_dir.c
rename to vmod/vmod_directors_shard_dir.c
index 00b61aa98..9b82722d1 100644
--- a/vmod/shard_dir.c
+++ b/vmod/vmod_directors_shard_dir.c
@@ -45,7 +45,7 @@
 #include "vrnd.h"
 
 #include "vcc_directors_if.h"
-#include "shard_dir.h"
+#include "vmod_directors_shard_dir.h"
 
 struct shard_be_info {
 	unsigned	hostid;
diff --git a/vmod/shard_dir.h b/vmod/vmod_directors_shard_dir.h
similarity index 100%
rename from vmod/shard_dir.h
rename to vmod/vmod_directors_shard_dir.h
diff --git a/vmod/vmod_unix.c b/vmod/vmod_unix.c
index 0dfbd5ae2..1edfca9d5 100644
--- a/vmod/vmod_unix.c
+++ b/vmod/vmod_unix.c
@@ -37,7 +37,7 @@
 #include "vcl.h"
 #include "common/heritage.h"
 
-#include "cred_compat.h"
+#include "vmod_unix_cred_compat.h"
 #include "vcc_unix_if.h"
 
 #define FAIL(ctx, msg) \
diff --git a/vmod/cred_compat.h b/vmod/vmod_unix_cred_compat.h
similarity index 100%
rename from vmod/cred_compat.h
rename to vmod/vmod_unix_cred_compat.h


More information about the varnish-commit mailing list