r5034: - added a type mapping function in pidl, so the type names in our IDL
authorAndrew Tridgell <tridge@samba.org>
Thu, 27 Jan 2005 06:16:59 +0000 (06:16 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:15 +0000 (13:09 -0500)
  files don't need to match the type names in the generated headers

- with this type mapping we no longer need definitions for the
  deprecated "int32", "uint8" etc form of types. We can now force
  everyone to use the standard types int32_t, uint8_t etc.

- fixed all the code that used the deprecated types

- converted the IDL types "int64" and "uint64" to "dlong" and
  "udlong". These are the 4 byte aligned 64 bit integers that
  Microsoft internally define as two 32 bit integers in a
  structure. After discussions with Ronnie Sahlberg we decided that
  calling these "int64" was confusing, as it implied a true 8 byte
  aligned type

- fixed all the cases where we incorrectly used things like
  "NTTIME_hyper" in our C code. The generated API now uses a NTTIME for
  those. The fact that it is hyper-aligned on the wire is not relevant
  to the API, and should remain just a IDL property
(This used to be commit f86521677d7ff16bdc4815f9524e5286026f10f3)

18 files changed:
source4/build/pidl/eparser.pm
source4/build/pidl/header.pm
source4/build/pidl/parser.pm
source4/build/pidl/util.pm
source4/include/includes.h
source4/include/smb.h
source4/lib/dcom/common/dcom.h
source4/lib/dcom/common/main.c
source4/libcli/ldap/ldap.h
source4/librpc/idl/netlogon.idl
source4/librpc/idl/samr.idl
source4/librpc/idl/xattr.idl
source4/librpc/ndr/libndr.h
source4/librpc/ndr/ndr_basic.c
source4/rpc_server/dcom/oxidresolver.c
source4/rpc_server/lsa/dcesrv_lsa.c
source4/torture/rpc/drsuapi.c
source4/torture/rpc/oxidresolve.c

index f6403992ad0c8faa9daf0f83f9b4ee8cb6f7feb0..1893a31573243b671abe10add1f5a68beb107163 100644 (file)
@@ -445,10 +445,6 @@ sub RewriteHeader($$$)
        s/^\#include\ \"librpc\/gen_ndr\/ndr_(.*?).h\"$
            /\#include \"packet-dcerpc-$1.h\"/smgx;
 
-       # Convert samba fixed width types to stdint types
-
-       s/((u)?int)([0-9]+)/$1$3_t/smg;
-
        # Rename struct ndr_pull to struct pidl_pull
 
        s/struct ndr_pull \*ndr/struct pidl_pull \*ndr/smg;
index 51983460ed39f66a60738c50c2233c78e168b34c..c1fb5e6619160e005cb63d927e265b4e7793b139 100644 (file)
@@ -191,7 +191,7 @@ sub HeaderType($$$)
                my $bitmap = util::get_bitmap($e->{TYPE});
                $res .= util::bitmap_type_decl($bitmap);
        } elsif (util::is_scalar_type($data)) {
-               $res .= "$data";
+               $res .= util::map_type($data);
        } elsif (util::has_property($e, "switch_is")) {
                $res .= "union $data";
        } else {
@@ -349,7 +349,7 @@ sub HeaderFunction($)
            HeaderFunctionInOut($fn, "out");
            if ($fn->{RETURN_TYPE} && $fn->{RETURN_TYPE} ne "void") {
                    tabs();
-                   $res .= "$fn->{RETURN_TYPE} result;\n";
+                   $res .= util::map_type($fn->{RETURN_TYPE}) . " result;\n";
            }
            $tab_depth--;
            tabs();
index 136809940358f43d7d08c0cb218ccc183ac44bb1..ac29fe028579457fcaa4ef03e71ba826514aa1e7 100644 (file)
@@ -470,7 +470,7 @@ sub ParseElementPullSwitch($$$$)
        if (!defined $utype ||
            !util::has_property($utype, "nodiscriminant")) {
                my $e2 = find_sibling($e, $switch);
-               my $type_decl = $e2->{TYPE};
+               my $type_decl = util::map_type($e2->{TYPE});
                pidl "\tif (($ndr_flags) & NDR_SCALARS) {\n";
                if (util::is_enum($e2->{TYPE})) {
                        $type_decl = util::enum_type_decl($e2);
index 48fd9469b8da2ba404def8ab5b8ee3de9a00a41b..277c6c02538c2e101596a5ccb253295870000851 100644 (file)
@@ -259,7 +259,7 @@ sub get_bitmap($)
        return $bitmap_list{$name};
 }
 
-sub bitmap_type_decl($)
+sub bitmap_type_fn($)
 {
        my $bitmap = shift;
 
@@ -273,12 +273,13 @@ sub bitmap_type_decl($)
        return "uint32";
 }
 
-sub bitmap_type_fn($)
+sub bitmap_type_decl($)
 {
        my $bitmap = shift;
-       return bitmap_type_decl($bitmap);
+       return map_type(bitmap_type_fn($bitmap));
 }
 
+
 my %type_alignments = 
     (
      "char" => 1,
@@ -291,8 +292,8 @@ my %type_alignments =
      "long" => 4,
      "int32" => 4,
      "uint32" => 4,
-     "int64" => 4,
-     "uint64" => 4,
+     "dlong" => 4,
+     "udlong" => 4,
      "NTTIME" => 4,
      "NTTIME_1sec" => 4,
      "time_t" => 4,
@@ -301,6 +302,7 @@ my %type_alignments =
      "WERROR" => 4,
      "boolean32" => 4,
      "unsigned32" => 4,
+     "hyper" => 8,
      "HYPER_T" => 8,
      "NTTIME_hyper" => 8
      );
@@ -519,5 +521,38 @@ sub make_str($)
        return "\"" . $str . "\"";
 }
 
+
+# provide mappings between IDL base types and types in our headers
+my %type_mappings = 
+    (
+     "int8"         => "int8_t",
+     "uint8"        => "uint8_t",
+     "short"        => "int16_t",
+     "wchar_t"      => "uint16_t",
+     "int16"        => "int16_t",
+     "uint16"       => "uint16_t",
+     "int32"        => "int32_t",
+     "uint32"       => "uint32_t",
+     "int64"        => "int64_t",
+     "uint64"       => "uint64_t",
+     "dlong"        => "int64_t",
+     "udlong"       => "uint64_t",
+     "hyper"        => "uint64_t",
+     "HYPER_T"      => "uint64_t",
+     "hyper"        => "uint64_t",
+     "NTTIME_1sec"  => "NTTIME",
+     "NTTIME_hyper" => "NTTIME"
+     );
+
+# map from a IDL type to a C header type
+sub map_type($)
+{
+       my $name = shift;
+       if (my $ret = $type_mappings{$name}) {
+               return $ret;
+       }
+       return $name;
+}
+
 1;
 
index 8c2e96b62e53d0b4bfa3497c6d0f177870c8d462..68e369a77be2ae36ca162c887ba9009fdecd661a 100644 (file)
 #define VOLATILE
 #endif
 
-/*
-   Samba needs type definitions for 
-   int8_t,  int16_t,  int32_t, int64_t 
-   uint8_t, uint16_t, uint32_t and uint64_t.
-
-   Normally these are signed and unsigned 8, 16, 32 and 64 bit integers, but
-   they actually only need to be at least 8, 16, 32 and 64 bits
-   respectively. Thus if your word size is 8 bytes just defining them
-   as signed and unsigned int will work.
-*/
-
-#if !defined(int8)
-#define int8 int8_t
-#endif
-
-#if !defined(uint8)
-#define uint8 uint8_t
-#endif
-
-#if !defined(int16)
-#define int16 int16_t
-#endif
-
-#if !defined(uint16)
-#define uint16 uint16_t
-#endif
-
-#if !defined(int32)
-#define int32 int32_t
-#endif
-
-#if !defined(uint32)
-#define uint32 uint32_t
-#endif
-
-#if !defined(int64)
-#define int64 int64_t
-#endif
-
-#if !defined(uint64)
-#define uint64 uint64_t
-#endif
-
 #define False (0)
 #define True (1)
 #define Auto (2)
index 3032847460d578ddf6141501053f59e6725e4607..e40f86eb4c6bff7ea6b40a9d5b8c5042ec825a19 100644 (file)
@@ -196,18 +196,9 @@ typedef struct data_blob {
        size_t length;
 } DATA_BLOB;
 
-/* 8 byte aligned 'hyper' type from MS IDL */
-typedef uint64_t HYPER_T;
-
 /* 64 bit time (100 nanosec) 1601 - cifs6.txt, section 3.5, page 30, 4 byte aligned */
 typedef uint64_t NTTIME;
 
-/* 64 bit time (100 nanosec) 1601, but 8 byte aligned 'hyper' type */
-#define NTTIME_hyper NTTIME
-
-/* 64 bit time (1 sec) 1601 - in the NDR blob but mapped to NTTIME  */
-#define NTTIME_1sec NTTIME
-
 /* the basic packet size, assuming no words or bytes. Does not include the NBT header */
 #define MIN_SMB_SIZE 35
 
index d8e3797c73f99941575790623848463079fc8034..0bc4a256f1f61c4b5a7d32fc528fed65c18973c4 100644 (file)
@@ -34,12 +34,12 @@ struct dcom_context
                struct dcom_object_exporter *prev, *next;
                struct STRINGARRAY resolver_address;
                struct DUALSTRINGARRAY bindings;
-               HYPER_T oxid;
+               uint64_t oxid;
                struct dcerpc_pipe *pipe;
                struct dcom_object
                {
                        struct dcom_object *prev, *next;
-                       HYPER_T oid;
+                       uint64_t oid;
                        void *private_data;
                } *objects;
        } *oxids;
index 48b5ec946b96cfc4635d2df8f69f5a3a7c1215b3..219c06a665f6e9fa95b249dbba0416189fdf5739 100644 (file)
@@ -116,7 +116,7 @@ WERROR dcom_init(struct dcom_context **ctx, const char *domain, const char *user
        return WERR_OK;
 }
 
-static struct dcom_object_exporter *oxid_mapping_by_oxid (struct dcom_context *ctx, HYPER_T oxid)
+static struct dcom_object_exporter *oxid_mapping_by_oxid (struct dcom_context *ctx, uint64_t oxid)
 {
        struct dcom_object_exporter *m;
        
@@ -345,7 +345,7 @@ NTSTATUS dcom_get_pipe (struct dcom_interface_p *iface, struct dcerpc_pipe **pp)
 {
        struct dcerpc_binding binding;
        struct GUID iid;
-       HYPER_T oxid;
+       uint64_t oxid;
        NTSTATUS status;
        int i;
        struct dcerpc_pipe *p;
@@ -408,7 +408,7 @@ NTSTATUS dcom_get_pipe (struct dcom_interface_p *iface, struct dcerpc_pipe **pp)
        return NT_STATUS_OK;
 }
 
-struct dcom_object *dcom_object_by_oid(struct dcom_object_exporter *ox, HYPER_T oid)
+struct dcom_object *dcom_object_by_oid(struct dcom_object_exporter *ox, uint64_t oid)
 {
        struct dcom_object *o;
 
@@ -544,7 +544,7 @@ NTSTATUS dcom_ifacep_from_OBJREF(struct dcom_context *ctx, struct dcom_interface
        return NT_STATUS_NOT_SUPPORTED; 
 }
 
-HYPER_T dcom_get_current_oxid(void)
+uint64_t dcom_get_current_oxid(void)
 {
        return getpid();
 }
index 65962bf5b5470f10584c00c18b442e32616576d4..8947562b7793fc2f1ca45691410fa865ab10b4a2 100644 (file)
@@ -146,8 +146,8 @@ struct ldap_SearchRequest {
        const char *basedn;
        enum ldap_scope scope;
        enum ldap_deref deref;
-       uint32 timelimit;
-       uint32 sizelimit;
+       uint32_t timelimit;
+       uint32_t sizelimit;
        BOOL attributesonly;
        char *filter;
        int num_attributes;
@@ -206,7 +206,7 @@ struct ldap_CompareRequest {
 };
 
 struct ldap_AbandonRequest {
-       uint32 messageid;
+       uint32_t messageid;
 };
 
 struct ldap_ExtendedRequest {
@@ -251,8 +251,8 @@ struct ldap_Control {
 
 struct ldap_message {
        TALLOC_CTX             *mem_ctx;
-       uint32                  messageid;
-       uint8                   type;
+       uint32_t                  messageid;
+       uint8_t                   type;
        union  ldap_Request     r;
        int                     num_controls;
        struct ldap_Control    *controls;
@@ -269,7 +269,7 @@ struct ldap_connection {
        int sock;
        int next_msgid;
        char *host;
-       uint16 port;
+       uint16_t port;
        BOOL ldaps;
 
        const char *auth_dn;
index 3d3005685b64492b58e48f519ddf9f4a7778a65f..cb537d75a36ecfa7429d14ab311807d3d0801b2c 100644 (file)
@@ -76,8 +76,8 @@ interface netlogon
        /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks 
           that the structure of the bindata looks like this:
 
-               uint64 lockout_duration;
-               uint64 reset_count;
+               dlong  lockout_duration;
+               udlong reset_count;
                uint32 bad_attempt_lockout;
                uint32 dummy;   
 
@@ -407,9 +407,9 @@ interface netlogon
                uint16 min_password_length;
                uint16 password_history_length;
                /* yes, these are signed. They are in negative 100ns */
-               int64  max_password_age;
-               int64  min_password_age;
-               uint64 sequence_num;
+               dlong  max_password_age;
+               dlong  min_password_age;
+               udlong sequence_num;
                NTTIME domain_create_time;
                uint32 SecurityInformation;
                sec_desc_buf sdbuf;
@@ -504,7 +504,7 @@ interface netlogon
                netr_String primary_domain_name;
                dom_sid2 *sid;
                netr_QUOTA_LIMITS quota_limits;
-               uint64 sequence_num;
+               udlong sequence_num;
                NTTIME db_create_time;
                uint32 SecurityInformation;
                sec_desc_buf sdbuf;
@@ -635,7 +635,7 @@ interface netlogon
                [case(NETR_DELTA_DELETE_SECRET)]   netr_DELTA_DELETE_SECRET    delete_secret;
                [case(NETR_DELTA_DELETE_GROUP2)]   netr_DELTA_DELETE_USER     *delete_group;
                [case(NETR_DELTA_DELETE_USER2)]    netr_DELTA_DELETE_USER     *delete_user;
-               [case(NETR_DELTA_MODIFY_COUNT)]    uint64                     *modified_count;
+               [case(NETR_DELTA_MODIFY_COUNT)]    udlong                     *modified_count;
        } netr_DELTA_UNION;
 
        typedef union {
@@ -681,7 +681,7 @@ interface netlogon
                [in]      netr_Authenticator credential,
                [in,out]  netr_Authenticator return_authenticator,
                [in]      netr_SamDatabaseID database_id,
-               [in,out]  uint64 sequence_num,
+               [in,out]  udlong sequence_num,
                [in]      uint32 preferredmaximumlength,
                [out]     netr_DELTA_ENUM_ARRAY *delta_enum_array
                );
index fd6229bf6364889713caeac692fadae0edb47256..db7f4aa6cc204c5178a6788526c4637773fed3cb 100644 (file)
                uint16 password_history_length;
                uint32 password_properties;
                /* yes, these are signed. They are in negative 100ns */
-               int64  max_password_age;
-               int64  min_password_age;
+               dlong  max_password_age;
+               dlong  min_password_age;
        } samr_DomInfo1;
 
        typedef struct {
                samr_String comment;
                samr_String domain;  /* domain name */
                samr_String primary; /* PDC name if this is a BDC */
-               uint64 sequence_num;
+               udlong sequence_num;
                uint32 unknown2;
                samr_Role role;
                uint32 unknown3;
index 501ac2ab7dc032cbf47078004b76fb77dd572baf..afcefe49bc7d39c24bfc9cce1aaab7db922a0501 100644 (file)
@@ -23,8 +23,8 @@ interface xattr
        typedef struct {
                uint32 attrib;
                uint32 ea_size;
-               uint64 size;
-               uint64 alloc_size;
+               udlong size;
+               udlong alloc_size;
                NTTIME create_time;
                NTTIME change_time;
        } xattr_DosInfo1;
@@ -35,8 +35,8 @@ interface xattr
                uint32     flags;
                uint32     attrib;
                uint32     ea_size;
-               uint64     size;
-               uint64     alloc_size;
+               udlong     size;
+               udlong     alloc_size;
                NTTIME     create_time;
                NTTIME     change_time;
                NTTIME     write_time; /* only used when sticky write time is set */
@@ -82,8 +82,8 @@ interface xattr
 
        typedef struct {
                uint32     flags;
-               uint64     size;
-               uint64     alloc_size;
+               udlong     size;
+               udlong     alloc_size;
                utf8string name;
        } xattr_DosStream;
 
index b5a55734489f0d483dec0db9432ad4341aca637f..7070ae80ec36df6d05fe68d688e82b4d1ed56023 100644 (file)
@@ -199,27 +199,6 @@ enum ndr_err_code {
        } \
 } while(0)
 
-#define NDR_SIZE_ALIGN(t, n, flags) ((flags & LIBNDR_FLAG_NOALIGN)?(t):(((t) + (n-1)) & ~(n-1)))
-#define ndr_size_uint8(t, p, flags) (NDR_SIZE_ALIGN(t, 1, flags) + 1)
-#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_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_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)
-
 /* these are used to make the error checking on each element in libndr
    less tedious, hopefully making the code more readable */
 #define NDR_CHECK(call) do { NTSTATUS _status; \
index 6476f587645d00ac5c5ae0adc60c5a40976e3c98..7ca930d78d05fcb6714860345e74867b26b7c674 100644 (file)
@@ -118,9 +118,9 @@ NTSTATUS ndr_pull_ptr(struct ndr_pull *ndr, uint32_t *v)
 }
 
 /*
-  parse a uint64
+  parse a udlong
 */
-NTSTATUS ndr_pull_uint64(struct ndr_pull *ndr, uint64_t *v)
+NTSTATUS ndr_pull_udlong(struct ndr_pull *ndr, uint64_t *v)
 {
        NDR_PULL_ALIGN(ndr, 4);
        NDR_PULL_NEED_BYTES(ndr, 8);
@@ -131,20 +131,20 @@ NTSTATUS ndr_pull_uint64(struct ndr_pull *ndr, uint64_t *v)
 }
 
 /*
-  parse a int64
+  parse a dlong
 */
-NTSTATUS ndr_pull_int64(struct ndr_pull *ndr, int64_t *v)
+NTSTATUS ndr_pull_dlong(struct ndr_pull *ndr, int64_t *v)
 {
-       return ndr_pull_uint64(ndr, (uint64_t *)v);
+       return ndr_pull_udlong(ndr, (uint64_t *)v);
 }
 
 /*
-  parse a HYPER_T
+  parse a hyper
 */
-NTSTATUS ndr_pull_HYPER_T(struct ndr_pull *ndr, HYPER_T *v)
+NTSTATUS ndr_pull_HYPER_T(struct ndr_pull *ndr, uint64_t *v)
 {
        NDR_PULL_ALIGN(ndr, 8);
-       return ndr_pull_uint64(ndr, v);
+       return ndr_pull_udlong(ndr, v);
 }
 
 /*
@@ -251,7 +251,7 @@ NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *da
 /*
   pull a const array of HYPER_T
 */
-NTSTATUS ndr_pull_array_HYPER_T(struct ndr_pull *ndr, int ndr_flags, HYPER_T *data, uint32_t n)
+NTSTATUS ndr_pull_array_HYPER_T(struct ndr_pull *ndr, int ndr_flags, uint64_t *data, uint32_t n)
 {
        uint32_t i;
        if (!(ndr_flags & NDR_SCALARS)) {
@@ -330,7 +330,7 @@ NTSTATUS ndr_push_int32(struct ndr_push *ndr, int32_t v)
 /*
   push a uint64
 */
-NTSTATUS ndr_push_uint64(struct ndr_push *ndr, uint64_t v)
+NTSTATUS ndr_push_udlong(struct ndr_push *ndr, uint64_t v)
 {
        NDR_PUSH_ALIGN(ndr, 4);
        NDR_PUSH_NEED_BYTES(ndr, 8);
@@ -343,18 +343,18 @@ NTSTATUS ndr_push_uint64(struct ndr_push *ndr, uint64_t v)
 /*
   push a int64
 */
-NTSTATUS ndr_push_int64(struct ndr_push *ndr, int64_t v)
+NTSTATUS ndr_push_dlong(struct ndr_push *ndr, int64_t v)
 {
-       return ndr_push_uint64(ndr, (uint64_t)v);
+       return ndr_push_udlong(ndr, (uint64_t)v);
 }
 
 /*
   push a HYPER_T
 */
-NTSTATUS ndr_push_HYPER_T(struct ndr_push *ndr, HYPER_T v)
+NTSTATUS ndr_push_HYPER_T(struct ndr_push *ndr, uint64_t v)
 {
        NDR_PUSH_ALIGN(ndr, 8);
-       return ndr_push_uint64(ndr, v);
+       return ndr_push_udlong(ndr, v);
 }
 
 NTSTATUS ndr_push_align(struct ndr_push *ndr, size_t size)
@@ -435,7 +435,7 @@ NTSTATUS ndr_push_array_uint32(struct ndr_push *ndr, int ndr_flags, const uint32
 /*
   push an array of HYPER_T
 */
-NTSTATUS ndr_push_array_HYPER_T(struct ndr_push *ndr, int ndr_flags, const HYPER_T *data, uint32_t n)
+NTSTATUS ndr_push_array_HYPER_T(struct ndr_push *ndr, int ndr_flags, const uint64_t *data, uint32_t n)
 {
        int i;
        if (!(ndr_flags & NDR_SCALARS)) {
@@ -946,7 +946,7 @@ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s)
 */
 NTSTATUS ndr_push_NTTIME(struct ndr_push *ndr, NTTIME t)
 {
-       NDR_CHECK(ndr_push_uint64(ndr, t));
+       NDR_CHECK(ndr_push_udlong(ndr, t));
        return NT_STATUS_OK;
 }
 
@@ -955,7 +955,7 @@ NTSTATUS ndr_push_NTTIME(struct ndr_push *ndr, NTTIME t)
 */
 NTSTATUS ndr_pull_NTTIME(struct ndr_pull *ndr, NTTIME *t)
 {
-       NDR_CHECK(ndr_pull_uint64(ndr, t));
+       NDR_CHECK(ndr_pull_udlong(ndr, t));
        return NT_STATUS_OK;
 }
 
@@ -982,7 +982,7 @@ NTSTATUS ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, NTTIME *t)
 /*
   pull a NTTIME_hyper
 */
-NTSTATUS ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, NTTIME_hyper *t)
+NTSTATUS ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, NTTIME *t)
 {
        NDR_CHECK(ndr_pull_HYPER_T(ndr, t));
        return NT_STATUS_OK;
@@ -991,7 +991,7 @@ NTSTATUS ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, NTTIME_hyper *t)
 /*
   push a NTTIME_hyper
 */
-NTSTATUS ndr_push_NTTIME_hyper(struct ndr_push *ndr, NTTIME_hyper t)
+NTSTATUS ndr_push_NTTIME_hyper(struct ndr_push *ndr, NTTIME t)
 {
        NDR_CHECK(ndr_push_HYPER_T(ndr, t));
        return NT_STATUS_OK;
@@ -1068,7 +1068,7 @@ void ndr_print_int32(struct ndr_print *ndr, const char *name, int32_t v)
        ndr->print(ndr, "%-25s: %d", name, v);
 }
 
-void ndr_print_uint64(struct ndr_print *ndr, const char *name, uint64_t v)
+void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v)
 {
        ndr->print(ndr, "%-25s: 0x%08x%08x (%llu)", name,
                   (uint32_t)(v >> 32),
@@ -1076,7 +1076,7 @@ void ndr_print_uint64(struct ndr_print *ndr, const char *name, uint64_t v)
                   v);
 }
 
-void ndr_print_int64(struct ndr_print *ndr, const char *name, int64_t v)
+void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v)
 {
        ndr->print(ndr, "%-25s: 0x%08x%08x (%lld)", name, 
                   (uint32_t)(v >> 32), 
@@ -1084,9 +1084,9 @@ void ndr_print_int64(struct ndr_print *ndr, const char *name, int64_t v)
                   v);
 }
 
-void ndr_print_HYPER_T(struct ndr_print *ndr, const char *name, HYPER_T v)
+void ndr_print_HYPER_T(struct ndr_print *ndr, const char *name, uint64_t v)
 {
-       ndr->print(ndr, "%-25s: 0x%08x%08x", name, (uint32_t)(v >> 32), (uint32_t)(v & 0xFFFFFFFF));
+       ndr_print_dlong(ndr, name, v);
 }
 
 void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p)
@@ -1112,7 +1112,7 @@ void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t)
        ndr->print(ndr, "%-25s: %s", name, nt_time_string(ndr, t));
 }
 
-void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME_1sec t)
+void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t)
 {
        /* this is a standard NTTIME here
         * as it's already converted in the pull/push code
@@ -1120,7 +1120,7 @@ void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME_1sec
        ndr_print_NTTIME(ndr, name, t);
 }
 
-void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME_hyper t)
+void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME t)
 {
        ndr_print_NTTIME(ndr, name, t);
 }
@@ -1163,7 +1163,7 @@ void ndr_print_array_WERROR(struct ndr_print *ndr, const char *name,
 }
 
 void ndr_print_array_HYPER_T(struct ndr_print *ndr, const char *name, 
-                           const HYPER_T *data, uint32_t count)
+                           const uint64_t *data, uint32_t count)
 {
        int i;
 
index a3f65b62e5629fee1770323d3440c2424d1e06db..1880d6f8dcf555df43d865ca06849ddf69a6866e 100644 (file)
@@ -31,7 +31,7 @@ struct OXIDObject
 
 struct PingSet
 {
-       HYPER_T id;
+       uint64_t id;
        struct OXIDObject *objects;
        struct PingSet *prev, *next;
 };
index 2bef02be114292b8d27c3a43372837056ef3a638..ff33d52d01bcaf6337be191bfea72f9b5e9788cf 100644 (file)
@@ -2160,7 +2160,7 @@ static NTSTATUS lsa_QuerySecret(struct dcesrv_call_state *dce_call, TALLOC_CTX *
        }
        
        if (r->in.old_mtime) {
-               r->out.old_mtime = talloc(mem_ctx, NTTIME_hyper);
+               r->out.old_mtime = talloc(mem_ctx, NTTIME);
                if (!r->out.old_mtime) {
                        return NT_STATUS_NO_MEMORY;
                }
@@ -2196,7 +2196,7 @@ static NTSTATUS lsa_QuerySecret(struct dcesrv_call_state *dce_call, TALLOC_CTX *
        }
        
        if (r->in.new_mtime) {
-               r->out.new_mtime = talloc(mem_ctx, NTTIME_hyper);
+               r->out.new_mtime = talloc(mem_ctx, NTTIME);
                if (!r->out.new_mtime) {
                        return NT_STATUS_NO_MEMORY;
                }
index 2e3fe87bb4d1347c3c077d98ed66a89c18013da7..4821d67d9c0d800f736ca1f77f2dd66c8e692902 100644 (file)
@@ -638,8 +638,8 @@ static BOOL test_DsReplicaGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
        BOOL ret = True;
        int i;
        struct {
-               int32 level;
-               int32 infotype;
+               int32_t level;
+               int32_t infotype;
                const char *obj_dn;
        } array[] = {
                {       
@@ -765,7 +765,7 @@ static BOOL test_DsReplicaSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
        struct drsuapi_DsReplicaSyncRequest1Info info1;
 
        struct {
-               int32 level;
+               int32_t level;
        } array[] = {
                {       
                        1
index cbd287b45327cec49032fb78dc3a6b5bb3afdaf9..18493029298bed8ea0f17062834f2a1d63f1b50c 100644 (file)
@@ -28,7 +28,7 @@
 #define CLSID_SIMPLE "5e9ddec7-5767-11cf-beab-00aa006c3606"
 #define CLSID_COFFEEMACHINE "DB7C21F8-FE33-4C11-AEA5-CEB56F076FBB"
 
-static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T *oxid, struct GUID *oid)
+static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint64_t *oxid, struct GUID *oid)
 {
        struct RemoteActivation r;
        NTSTATUS status;
@@ -74,7 +74,7 @@ static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYP
        return 1;
 }
 
-static int test_SimplePing(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T setid)
+static int test_SimplePing(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint64_t setid)
 {
        struct SimplePing r;
        NTSTATUS status;
@@ -95,7 +95,7 @@ static int test_SimplePing(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T s
        return 1;
 }
 
-static int test_ComplexPing(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T *setid, struct GUID oid)
+static int test_ComplexPing(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint64_t *setid, struct GUID oid)
 {
        struct ComplexPing r;
        NTSTATUS status;
@@ -143,7 +143,7 @@ static int test_ServerAlive(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        return 1;
 }
 
-static int test_ResolveOxid(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T oxid)
+static int test_ResolveOxid(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint64_t oxid)
 {
        struct ResolveOxid r;
        NTSTATUS status;
@@ -167,7 +167,7 @@ static int test_ResolveOxid(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T
        return 1;
 }
 
-static int test_ResolveOxid2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T oxid)
+static int test_ResolveOxid2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint64_t oxid)
 {
        struct ResolveOxid2 r;
        NTSTATUS status;
@@ -220,8 +220,8 @@ BOOL torture_rpc_oxidresolve(void)
        struct dcerpc_pipe *p, *premact;
        TALLOC_CTX *mem_ctx;
        BOOL ret = True;
-       HYPER_T setid;
-       HYPER_T oxid;
+       uint64_t setid;
+       uint64_t oxid;
        struct GUID oid;
 
        mem_ctx = talloc_init("torture_rpc_oxidresolve");