diff options
-rwxr-xr-x | source4/script/build_smb_interfaces.pl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source4/script/build_smb_interfaces.pl b/source4/script/build_smb_interfaces.pl index bfa73b32a5..7c9bd3d365 100755 --- a/source4/script/build_smb_interfaces.pl +++ b/source4/script/build_smb_interfaces.pl @@ -13,9 +13,11 @@ require smb_interfaces; my $parser = new smb_interfaces; $header = $parser->parse($file); +stat "libcli/gen_raw" || mkdir("libcli/gen_raw") || die("mkdir"); + # Create header -open(FILE, ">ejs_${basename}.h"); +open(FILE, ">libcli/gen_raw/ejs_${basename}.h"); print FILE "/* header auto-generated by build_smb_interfaces.pl */\n\n"; @@ -60,16 +62,23 @@ close(FILE); # Create file -open(FILE, ">ejs_${basename}.c"); +open(FILE, ">libcli/gen_raw/ejs_${basename}.c"); print FILE "/* EJS wrapper functions auto-generated by build_smb_interfaces.pl */\n\n"; +print FILE "#include \"includes.h\"\n"; +print FILE "#include \"lib/appweb/ejs/ejs.h\"\n"; +print FILE "#include \"scripting/ejs/ejsrpc.h\"\n"; # TODO: remove this +print FILE "\n"; + # Top level push/pull functions sub print_field($$) { my $f = shift; my $suffix = shift; + my $type = "UNKNOWN"; + if ($f->{TYPE} eq "char" and $f->{POINTERS} == 1) { $type = "string"; } @@ -106,7 +115,7 @@ foreach my $x (@{$header}) { # Push from struct.out - print FILE "static NTSTATUS ejs_push_$x->{STRUCT_NAME}(struct ejs_rpc *ejs, struct MprVar *v, const struct $x->{STRUCT_NAME} *r)\n\n"; + print FILE "static NTSTATUS ejs_push_$x->{STRUCT_NAME}(struct ejs_rpc *ejs, struct MprVar *v, struct $x->{STRUCT_NAME} *r)\n\n"; print FILE "{\n"; print FILE "\tNDR_CHECK(ejs_push_struct_start(ejs, &v, \"output\"));\n"; |