summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-12-08 11:30:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:26 -0500
commit87d5e061e0ddd41e21a60b8934db339e5ef5f306 (patch)
tree6958770e8f6bfd77bc782e81de60fd8ea6c3e729 /source4/librpc
parent58a83c60410a588e671891af5891342f7987a3cb (diff)
downloadsamba-87d5e061e0ddd41e21a60b8934db339e5ef5f306.tar.gz
samba-87d5e061e0ddd41e21a60b8934db339e5ef5f306.tar.bz2
samba-87d5e061e0ddd41e21a60b8934db339e5ef5f306.zip
r4102: more uint64 vs HYPER_T fixes
NOTE: [u]int64 uses 4 Byte alignment and HYPER_T uses 8 Byte alignment metze (This used to be commit 717454eb2fd2bf90e67074acefdae5304cd7433f)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/idl/drsblobs.idl14
-rw-r--r--source4/librpc/idl/drsuapi.idl4
-rw-r--r--source4/librpc/ndr/libndr.h12
-rw-r--r--source4/librpc/ndr/ndr_basic.c4
4 files changed, 20 insertions, 14 deletions
diff --git a/source4/librpc/idl/drsblobs.idl b/source4/librpc/idl/drsblobs.idl
index d583828198..ff8be33478 100644
--- a/source4/librpc/idl/drsblobs.idl
+++ b/source4/librpc/idl/drsblobs.idl
@@ -16,8 +16,8 @@ interface drsblobs {
uint32 version;
NTTIME_1sec orginating_time;
GUID orginating_dsa; /* the 'invocationId' ? */
- uint64 orginating_usn;
- uint64 local_usn;
+ HYPER_T orginating_usn;
+ HYPER_T local_usn;
} replPropertyMetaData1;
typedef struct {
@@ -47,7 +47,7 @@ interface drsblobs {
*/
typedef struct {
GUID invocation_id_guid; /* the 'invocationId' field of the CN=NTDS Settings object */
- uint64 highest_usn; /* updated after a full replication cycle */
+ HYPER_T highest_usn; /* updated after a full replication cycle */
} replUpToDateVector1;
typedef struct {
@@ -58,7 +58,7 @@ interface drsblobs {
typedef struct {
GUID invocation_id_guid; /* the 'invocationId' field of the CN=NTDS Settings object */
- uint64 highest_usn; /* updated after a full replication cycle */
+ HYPER_T highest_usn; /* updated after a full replication cycle */
NTTIME_1sec last_success;
} replUpToDateVector2;
@@ -104,9 +104,9 @@ interface drsblobs {
uint32 replica_flags;
uint8 schedule[84];
uint32 reserved;
- uint64 tmp_highest_usn; /* updated after each object update */
- uint64 reserved_usn;
- uint64 highest_usn; /* updated after a full replication cycle */
+ HYPER_T tmp_highest_usn; /* updated after each object update */
+ HYPER_T reserved_usn;
+ HYPER_T highest_usn; /* updated after a full replication cycle */
GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
GUID transport_guid;
diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl
index 3b0444980d..846ccd82a2 100644
--- a/source4/librpc/idl/drsuapi.idl
+++ b/source4/librpc/idl/drsuapi.idl
@@ -526,7 +526,7 @@ interface drsuapi
} drsuapi_DsReplicaAttrValMetaData2Ctr;
typedef struct {
- uint64 u1; /* session number? */
+ HYPER_T u1; /* session number? */
uint32 u2;
uint32 u3;
GUID bind_guid;
@@ -556,7 +556,7 @@ interface drsuapi
uint32 u3;
uint32 u4;
uint32 u5;
- uint64 u6;
+ HYPER_T u6;
uint32 u7;
} drsuapi_DsReplica06;
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index 1cec8d4c2a..fe817bfdcd 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -200,12 +200,18 @@ enum ndr_err_code {
#define ndr_size_uint16(t, p, flags) (NDR_SIZE_ALIGN(t, 2, flags) + 2)
#define ndr_size_int32(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4)
#define ndr_size_uint32(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4)
-#define ndr_size_int64(t, p, flags) (NDR_SIZE_ALIGN(t, 8, flags) + 8)
-#define ndr_size_uint64(t, p, flags) (NDR_SIZE_ALIGN(t, 8, flags) + 8)
#define ndr_size_ptr(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4)
+/*
+ * [u]int64 uses 4 Byte alignment
+ * and HYPER_T uses 8 Byte alignment
+ */
+#define ndr_size_int64(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 8)
+#define ndr_size_uint64(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 8)
+#define ndr_size_HYPER_T(t, p, flags) (NDR_SIZE_ALIGN(t, 8, flags) + 8)
+
#define ndr_size_NTTIME(t, p, flags) ndr_size_uint64(t, p, flags)
-#define ndr_size_NTTIME_1sec(t, p, flags) ndr_size_NTTIME(t, p, flags)
+#define ndr_size_NTTIME_1sec(t, p, flags) ndr_size_HYPER_T(t, p, flags)
#define ndr_size_WERROR(t, p, flags) ndr_size_uint32(t, p, flags)
#define ndr_size_NTSTATUS(t, p, flags) ndr_size_uint32(t, p, flags)
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index 3959e91563..315dc76059 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -960,7 +960,7 @@ NTSTATUS ndr_pull_NTTIME(struct ndr_pull *ndr, NTTIME *t)
NTSTATUS ndr_push_NTTIME_1sec(struct ndr_push *ndr, NTTIME t)
{
t /= 10000000;
- NDR_CHECK(ndr_push_uint64(ndr, t));
+ NDR_CHECK(ndr_push_HYPER_T(ndr, t));
return NT_STATUS_OK;
}
@@ -969,7 +969,7 @@ NTSTATUS ndr_push_NTTIME_1sec(struct ndr_push *ndr, NTTIME t)
*/
NTSTATUS ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, NTTIME *t)
{
- NDR_CHECK(ndr_pull_uint64(ndr, t));
+ NDR_CHECK(ndr_pull_HYPER_T(ndr, t));
(*t) *= 10000000;
return NT_STATUS_OK;
}