summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-16 22:58:10 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-16 22:58:10 +0100
commit97f372003869e8ad1f4e2f673c59f7f0d563346a (patch)
treea3d46803f85f78a5de385a541641d6edf1553cdc
parentcc2d1eb743bb5b49b88a6fbdfeeb8730fb8e6189 (diff)
downloadsamba-97f372003869e8ad1f4e2f673c59f7f0d563346a.tar.gz
samba-97f372003869e8ad1f4e2f673c59f7f0d563346a.tar.bz2
samba-97f372003869e8ad1f4e2f673c59f7f0d563346a.zip
Don't write out forward declarations for enums, as some compilers don't
seem to like it.
-rw-r--r--librpc/gen_ndr/drsblobs.h4
-rw-r--r--librpc/gen_ndr/nbt.h2
-rw-r--r--librpc/gen_ndr/netlogon.h8
-rw-r--r--librpc/gen_ndr/samr.h2
-rw-r--r--librpc/gen_ndr/wkssvc.h2
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Header.pm2
6 files changed, 2 insertions, 18 deletions
diff --git a/librpc/gen_ndr/drsblobs.h b/librpc/gen_ndr/drsblobs.h
index 692746468e..f8fd304d3d 100644
--- a/librpc/gen_ndr/drsblobs.h
+++ b/librpc/gen_ndr/drsblobs.h
@@ -10,10 +10,6 @@
#define _HEADER_drsblobs
#define SUPPLEMENTAL_CREDENTIALS_PREFIX ( " " )
-enum drsuapi_DsAttributeId;
-
-enum lsa_TrustAuthType;
-
struct replPropertyMetaData1 {
enum drsuapi_DsAttributeId attid;
uint32_t version;
diff --git a/librpc/gen_ndr/nbt.h b/librpc/gen_ndr/nbt.h
index 4b872d7936..a8c66a6795 100644
--- a/librpc/gen_ndr/nbt.h
+++ b/librpc/gen_ndr/nbt.h
@@ -534,8 +534,6 @@ struct nbt_netlogon_response_from_pdc {
uint16_t lm20_token;
}/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
-enum netr_SamDatabaseID;
-
struct nbt_db_change_info {
enum netr_SamDatabaseID db_index;
uint64_t serial;
diff --git a/librpc/gen_ndr/netlogon.h b/librpc/gen_ndr/netlogon.h
index 7fb253446a..b4de53bf7b 100644
--- a/librpc/gen_ndr/netlogon.h
+++ b/librpc/gen_ndr/netlogon.h
@@ -14,10 +14,6 @@
#define DSGETDC_VALID_FLAGS ( (DS_FORCE_REDISCOVERY|DS_DIRECTORY_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_PREFERRED|DS_GC_SERVER_REQUIRED|DS_PDC_REQUIRED|DS_BACKGROUND_ONLY|DS_IP_REQUIRED|DS_KDC_REQUIRED|DS_TIMESERV_REQUIRED|DS_WRITABLE_REQUIRED|DS_GOOD_TIMESERV_PREFERRED|DS_AVOID_SELF|DS_ONLY_LDAP_NEEDED|DS_IS_FLAT_NAME|DS_IS_DNS_NAME|DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME) )
#define DS_GFTI_UPDATE_TDO ( 0x1 )
-enum netr_DeltaEnum8Bit;
-
-enum netr_SamDatabaseID8Bit;
-
struct netr_UasInfo {
const char *account_name;/* [unique,charset(UTF16)] */
uint32_t priv;
@@ -251,10 +247,6 @@ struct netr_Authenticator {
time_t timestamp;
}/* [public] */;
-enum netr_SchannelType;
-
-enum netr_SamDatabaseID;
-
struct netr_DELTA_DELETE_USER {
const char *account_name;/* [unique,charset(UTF16)] */
struct lsa_String unknown1;
diff --git a/librpc/gen_ndr/samr.h b/librpc/gen_ndr/samr.h
index 3116f26d8c..782987de1c 100644
--- a/librpc/gen_ndr/samr.h
+++ b/librpc/gen_ndr/samr.h
@@ -698,8 +698,6 @@ enum samr_ConnectVersion
#endif
;
-enum samr_RejectReason;
-
struct samr_ChangeReject {
enum samr_RejectReason reason;
uint32_t unknown1;
diff --git a/librpc/gen_ndr/wkssvc.h b/librpc/gen_ndr/wkssvc.h
index 07b4c40e83..dc12fe2a3f 100644
--- a/librpc/gen_ndr/wkssvc.h
+++ b/librpc/gen_ndr/wkssvc.h
@@ -7,8 +7,6 @@
#ifndef _HEADER_wkssvc
#define _HEADER_wkssvc
-enum srvsvc_PlatformId;
-
struct wkssvc_NetWkstaInfo100 {
enum srvsvc_PlatformId platform_id;
const char *server_name;/* [unique,charset(UTF16)] */
diff --git a/pidl/lib/Parse/Pidl/Samba4/Header.pm b/pidl/lib/Parse/Pidl/Samba4/Header.pm
index 611f0adb92..94e1efbfe4 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Header.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Header.pm
@@ -226,6 +226,8 @@ sub HeaderType($$$;$)
sub HeaderTypedef($;$)
{
my($typedef,$tail) = @_;
+ # Don't print empty "enum foo;", since some compilers don't like it.
+ return if ($typedef->{DATA}->{TYPE} eq "ENUM" and not defined($typedef->{DATA}->{ELEMENTS}));
HeaderType($typedef, $typedef->{DATA}, $typedef->{NAME}, $tail) if defined ($typedef->{DATA});
}