httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Re: [Beta blocker] apr_get_username undefined, BSD w/dso
Date Wed, 31 Jan 2001 01:25:41 GMT
On Tue, 30 Jan 2001 14:46:16 -0500, Greg Ames wrote:

>I still don't have an apr_get_username symbol in the httpd executable on
>apache.org.  server/exports.c doesn't have it or any of the others that
>should come from apr/include/apr_user.h; same story with
>apr/apr.exports.  
>
>If you feed apr_user.h into apr/helpers/make_export.pl (Ryan's perl
>prototype), it does the Right Thing. If you feed it into
>apr/helpers/make_export.awk (what the build uses), it produces nada,
>nil, zip, nothing.  Feeding other header files into make_export.awk does
>the Right Thing:
>
>[gregames@gandalf apr]$ awk -f helpers/make_export.awk
>include/apr_xlate.h
>APR_HAS_XLATE
>        apr_xlate_open
>        apr_xlate_get_sb
>        apr_xlate_conv_buffer
>APR_NOT_DONE_YET
>                apr_xlate_conv_char
>/APR_NOT_DONE_YET
>        apr_xlate_close
>/APR_HAS_XLATE
>[gregames@gandalf apr]$ awk -f helpers/make_export.awk
>include/apr_user.h
>[gregames@gandalf apr]$
>
>You can repro this part of it on Linux - piece of cake.  The only hard
>part is figuring out what the awk program doesn't like about apr_user.h
>.  Any awk experts out there?

Try this (not fully tested)

Index: make_export.awk
===================================================================
RCS file: /home/cvs/apr/helpers/make_export.awk,v
retrieving revision 1.4
diff -u -r1.4 make_export.awk
--- make_export.awk	2000/12/22 14:32:37	1.4
+++ make_export.awk	2001/01/30 23:52:35
@@ -11,7 +11,6 @@
 	}
 	macro_stack[macro_no++] = macro
 	macro = substr($0, length($1)+2)
-	found++
 	count++
 	line = line macro "\n"
 	next
@@ -23,17 +22,17 @@
 		line = line "/" macro "\n"
 		macro = macro_stack[--macro_no]
 	}
-	if (found == count + 1) {
-		found--
+	if (count == 0) {
+		if (found != 0) {
+			printf("%s", line)
+		}
 		line = ""
-	} else if (found > count + 1) {
-		found = 0
 	}
 	next
 }
 
 /^[ \t]*(AP[RU]?_DECLARE[^(]*[(])?(const[ \t])?[a-z_]+[ \t\*]*[)]?[ \t]+[*]?([A-Za-z0-9_]+)\(/
{
-	if (found) {
+	if (count) {
 		found++
 	}
 	for (i = 0; i < count; i++) {

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message