about summary refs log tree commit diff
path: root/Src/makepro.awk
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-15 21:29:55 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-15 21:29:55 +0000
commit03e230cc54103d18e9c8a18208c7d27805400a71 (patch)
treeefb79fe4d798134599ec6c90cd9912e59ccca69d /Src/makepro.awk
parentb9c19b15a6f01279ddcf32ca6fa51894a64a6c16 (diff)
downloadzsh-03e230cc54103d18e9c8a18208c7d27805400a71.tar.gz
zsh-03e230cc54103d18e9c8a18208c7d27805400a71.tar.xz
zsh-03e230cc54103d18e9c8a18208c7d27805400a71.zip
manual:9047
Diffstat (limited to 'Src/makepro.awk')
-rw-r--r--Src/makepro.awk9
1 files changed, 9 insertions, 0 deletions
diff --git a/Src/makepro.awk b/Src/makepro.awk
index eb063f092..350b2f9c8 100644
--- a/Src/makepro.awk
+++ b/Src/makepro.awk
@@ -109,6 +109,15 @@ BEGIN {
 	gsub(/@>/, ")", dcltor)
 	gsub(/@!/, ",", dcltor)
 
+	# If this is a module boot/cleanup function, conditionally rename it.
+	if(" " dtype " " ~ / int / && dcltor ~ / *@\+(boot|cleanup|setup|finish)_[_0-9A-Za-z]+@- *_\(\( *Module +[_0-9A-Za-z]+ *\)\) */) {
+	    modtype = dnam
+	    sub(/_.*$/, "", modtype)
+	    printf "%s# if defined(DYNAMIC_NAME_CLASH_OK) && defined(MODULE)\n", locality
+	    printf "%s#  define " dnam " " modtype "_\n", locality
+	    printf "%s# endif\n", locality
+	}
+
 	# If this is exported, add it to the exported symbol list.
 	if(exported)
 	    printf "X%s\n", dnam