[PATCH] s4:smbtorture: Add forward declaration of test_netuseradd()

Andrew Kroeger andrew at id10ts.net
Mon Jun 1 09:43:37 GMT 2009


Andrew Bartlett wrote:
> Whatever the problem, I don't think the solution is to add a non-static
> header to a .c file
> 
> Can you either fix the proto script, or add this to a header file?
> 
> Thanks,
> 
> Andrew Bartlett

Please find attached a new patch that teaches mkproto.pl about the 
NET_API_STATUS return type.

Sincerely,
Andrew Kroeger

-------------- next part --------------
>From d5af9baef73d5b03a55cf92f7edfe331776f5dbe Mon Sep 17 00:00:00 2001
From: Andrew Kroeger <andrew at id10ts.net>
Date: Mon, 1 Jun 2009 04:36:50 -0500
Subject: [PATCH] s4:mkproto: Add NET_API_STATUS return type.

The recently added LIBNETAPI torture tests use NET_API_STATUS as a return type
for some functions.  The torture/libnetapi/proto.h private header that was being
generated by mkproto.pl did not include a prototype for the test_netuseradd()
function, as it did not know how to handle the NET_API_STATUS return type.
---
 source4/script/mkproto.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl
index e1b790d..5930788 100755
--- a/source4/script/mkproto.pl
+++ b/source4/script/mkproto.pl
@@ -206,7 +206,7 @@ sub process_file($$$)
 				  void|bool|int|struct|char|const|\w+_[tT]\s|uint|unsigned|long|NTSTATUS|
 				  ADS_STATUS|enum\s.*\(|DATA_BLOB|WERROR|XFILE|FILE|DIR|
 			      double|TDB_CONTEXT|TDB_DATA|TALLOC_CTX|NTTIME|FN_|init_module|
-			      GtkWidget|GType|smb_ucs2_t|krb5_error_code)
+			      GtkWidget|GType|smb_ucs2_t|krb5_error_code|NET_API_STATUS)
 			      /xo);
 
 		next if ($line =~ /^int\s*main/);
-- 
1.6.0.6



More information about the samba-technical mailing list