diff options
-rw-r--r-- | source4/build/smb_build/input.pm | 8 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 14 | ||||
-rw-r--r-- | source4/include/structs.h | 6 | ||||
-rw-r--r-- | source4/lib/registry/config.mk | 1 | ||||
-rw-r--r-- | source4/lib/registry/registry.h | 2 | ||||
-rw-r--r-- | source4/main.mk | 5 | ||||
-rw-r--r-- | source4/smbd/server.c | 1 | ||||
-rw-r--r-- | source4/torture/local/registry.c | 1 |
8 files changed, 26 insertions, 12 deletions
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index 53cd0f218e..ad0a275120 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -140,10 +140,14 @@ sub check($$$$$) $part->{NOPROTO} = "NO"; } - if (defined($part->{PRIVATE_PROTO_HEADER}) or - defined($part->{PUBLIC_PROTO_HEADER})) { + if (defined($part->{PRIVATE_PROTO_HEADER})) { $part->{NOPROTO} = "YES"; } + + if (defined($part->{PUBLIC_PROTO_HEADER})) { + $part->{NOPROTO} = "YES"; + push (@{$part->{PUBLIC_HEADERS}}, $part->{PUBLIC_PROTO_HEADER}); + } if (defined($enabled->{$part->{NAME}})) { $part->{ENABLE} = $enabled->{$part->{NAME}}; diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index bae6fd5b93..4669180b56 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -25,6 +25,7 @@ sub new($$$) $self->{shared_libs} = []; $self->{headers} = []; $self->{pc_files} = []; + $self->{proto_headers} = []; $self->{output} = ""; $self->{mkfile} = $mkfile; @@ -426,7 +427,7 @@ sub Manpage($$) my $dir = $ctx->{BASEDIR}; - $ctx->{BASEDIR} =~ s/^\.\///g; + $dir =~ s/^\.\///g; push (@{$self->{manpages}}, "$dir/$ctx->{MANPAGE}"); } @@ -464,17 +465,19 @@ sub ProtoHeader($$) my ($self,$ctx) = @_; my $dir = $ctx->{BASEDIR}; - $ctx->{BASEDIR} =~ s/^\.\///g; + + $dir =~ s/^\.\///g; my $comment = ""; - my $target = "$dir/$ctx->{PRIVATE_PROTO_HEADER}"; if (defined($ctx->{PUBLIC_PROTO_HEADER})) { - $comment.= " and $dir/$ctx->{PRIVATE_PROTO_HEADER}"; + $comment.= " and $dir/$ctx->{PUBLIC_PROTO_HEADER}"; + push (@{$self->{proto_headers}}, "$dir/$ctx->{PUBLIC_PROTO_HEADER}"); } else { $ctx->{PUBLIC_PROTO_HEADER} = $ctx->{PRIVATE_PROTO_HEADER}; } + push (@{$self->{proto_headers}}, "$dir/$ctx->{PRIVATE_PROTO_HEADER}"); - $self->output("$target: \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c)\n"); + $self->output("$dir/$ctx->{PUBLIC_PROTO_HEADER}: \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c)\n"); $self->output("\t\@echo \"Creating $dir/$ctx->{PRIVATE_PROTO_HEADER}$comment\"\n"); $self->output("\t\@\$(PERL) \${srcdir}/script/mkproto.pl --private=$dir/$ctx->{PRIVATE_PROTO_HEADER} --public=$dir/$ctx->{PUBLIC_PROTO_HEADER} \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)\n\n"); @@ -494,6 +497,7 @@ sub write($$) $self->output("PC_FILES = " . array2oneperline($self->{pc_files}) . "\n"); $self->output("ALL_OBJS = " . array2oneperline($self->{all_objs}) . "\n"); $self->output("PROTO_OBJS = " . array2oneperline($self->{proto_objs}) . "\n"); + $self->output("PROTO_HEADERS = " . array2oneperline($self->{proto_headers}) . "\n"); $self->_prepare_mk_files(); diff --git a/source4/include/structs.h b/source4/include/structs.h index 39226cacbc..153902d13a 100644 --- a/source4/include/structs.h +++ b/source4/include/structs.h @@ -138,10 +138,6 @@ struct ldap_connection; struct ldap_message; struct ldap_Result; struct rw_buffer; -struct registry_context; -struct registry_key; -struct registry_value; -struct reg_diff_file; struct rap_NetShareEnum; struct rap_NetServerEnum2; @@ -375,3 +371,5 @@ struct IUnknown; struct IUnknown_vtable; struct MprVar; + +struct registry_context; diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk index 9d949a5c1d..3f63c5be98 100644 --- a/source4/lib/registry/config.mk +++ b/source4/lib/registry/config.mk @@ -90,6 +90,7 @@ OBJ_FILES = \ patchfile.o REQUIRED_SUBSYSTEMS = \ LIBBASIC +PRIVATE_PROTO_HEADER = registry_proto.h PUBLIC_HEADERS = registry.h # End MODULE registry_ldb ################################################ diff --git a/source4/lib/registry/registry.h b/source4/lib/registry/registry.h index ebfb2caf5c..7f57a9244d 100644 --- a/source4/lib/registry/registry.h +++ b/source4/lib/registry/registry.h @@ -161,4 +161,6 @@ struct reg_diff struct reg_diff_key *keys; }; +#include "registry_proto.h" + #endif /* _REGISTRY_H */ diff --git a/source4/main.mk b/source4/main.mk index 2bafa588d6..b185ec97e4 100644 --- a/source4/main.mk +++ b/source4/main.mk @@ -216,7 +216,8 @@ clean_pch: basics: include/config.h \ include/proto.h \ idl \ - heimdal_basics + heimdal_basics \ + $(PROTO_HEADERS) clean: heimdal_clean @echo Removing headers @@ -234,6 +235,8 @@ clean: heimdal_clean @echo Removing generated files @-rm -rf librpc/gen_* @-rm -f lib/registry/regf.h lib/registry/tdr_regf* + @echo Removing proto headers + @-rm -f $(PROTO_HEADERS) distclean: clean -rm -f bin/.dummy diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 9fa7cad0c7..a753a1668b 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -31,6 +31,7 @@ #include "system/filesys.h" #include "system/kerberos.h" #include "smb_build.h" +#include "registry/registry.h" /* recursively delete a directory tree diff --git a/source4/torture/local/registry.c b/source4/torture/local/registry.c index 5e7f2b0f5f..21b42d6129 100644 --- a/source4/torture/local/registry.c +++ b/source4/torture/local/registry.c @@ -23,6 +23,7 @@ #include "includes.h" #include "librpc/gen_ndr/security.h" #include "librpc/gen_ndr/ndr_epmapper.h" +#include "lib/registry/registry.h" static BOOL test_hive(TALLOC_CTX *mem_ctx, const char *backend, const char *location) { |