Don't test HAVE_C_STRUCTURE_ASSIGNMENT.
authorKen Raeburn <raeburn@mit.edu>
Sat, 29 Apr 2006 06:59:23 +0000 (06:59 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 29 Apr 2006 06:59:23 +0000 (06:59 +0000)
Instead, just assume we do have a working C compiler.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17969 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/auth_con.c
src/lib/krb5/krb/copy_addrs.c
src/lib/krb5/krb/copy_athctr.c
src/lib/krb5/krb/copy_auth.c
src/lib/krb5/krb/copy_cksum.c
src/lib/krb5/krb/copy_creds.c
src/lib/krb5/krb/copy_key.c
src/lib/krb5/krb/copy_princ.c
src/lib/krb5/krb/copy_tick.c
src/lib/krb5/krb/get_creds.c
src/lib/krb5/krb/mk_req_ext.c

index cd3acf176c09d2900d314ebca3993a94b08f581c..ca33862fd74c721926996a4f03f0385665101b00 100644 (file)
@@ -10,11 +10,7 @@ actx_copy_addr(krb5_context context, const krb5_address *inad, krb5_address **ou
 
     if (!(tmpad = (krb5_address *)malloc(sizeof(*tmpad))))
        return ENOMEM;
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
     *tmpad = *inad;
-#else
-    memcpy(tmpad, inad, sizeof(krb5_address));
-#endif
     if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
        krb5_xfree(tmpad);
        return ENOMEM;
index 0e9ee702c6e145337ec2d01f979a9e1cbf260f21..28f19facc9c7fdc680f45957ec5e4426e00cce0f 100644 (file)
@@ -36,11 +36,7 @@ krb5_copy_addr(krb5_context context, const krb5_address *inad, krb5_address **ou
 
     if (!(tmpad = (krb5_address *)malloc(sizeof(*tmpad))))
        return ENOMEM;
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
     *tmpad = *inad;
-#else
-    memcpy(tmpad, inad, sizeof(krb5_address));
-#endif
     if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
        krb5_xfree(tmpad);
        return ENOMEM;
index 4b852a435e43239f7a62a33f5e3cebea7b5b4d54..2694776c2e335b67d6caf1f89102326c525091f6 100644 (file)
@@ -37,11 +37,7 @@ krb5_copy_authenticator(krb5_context context, const krb5_authenticator *authfrom
 
     if (!(tempto = (krb5_authenticator *)malloc(sizeof(*tempto))))
        return ENOMEM;
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
     *tempto = *authfrom;
-#else
-    memcpy(tempto, authfrom, sizeof(krb5_authenticator));
-#endif
 
     retval = krb5_copy_principal(context, authfrom->client, &tempto->client);
     if (retval) {
index 19e026411099bb46254ab3110727f6d094eafc57..9c978cb6bfa22db06054de9b2f64c862e85b2cee 100644 (file)
@@ -36,11 +36,7 @@ krb5_copy_authdatum(krb5_context context, const krb5_authdata *inad, krb5_authda
 
     if (!(tmpad = (krb5_authdata *)malloc(sizeof(*tmpad))))
        return ENOMEM;
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
     *tmpad = *inad;
-#else
-    memcpy(tmpad, inad, sizeof(krb5_authdata));
-#endif
     if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
        krb5_xfree(tmpad);
        return ENOMEM;
index 38b267159de0c4ffb4b9e6c45d622fb3f26c1f69..ce7eb7aa74d14d2e699f1cba7443b85ba52ddda9 100644 (file)
@@ -36,11 +36,7 @@ krb5_copy_checksum(krb5_context context, const krb5_checksum *ckfrom, krb5_check
 
     if (!(tempto = (krb5_checksum *)malloc(sizeof(*tempto))))
        return ENOMEM;
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
     *tempto = *ckfrom;
-#else
-    memcpy(tempto, ckfrom, sizeof(krb5_checksum));
-#endif
 
     if (!(tempto->contents =
          (krb5_octet *)malloc(tempto->length))) {
index 2be1950551f4dac3dc77b66ec99f163e12dd392c..9f1429c08ea46894c544f7e6aa01b33253b4b815 100644 (file)
@@ -43,11 +43,7 @@ krb5_copy_creds(krb5_context context, const krb5_creds *incred, krb5_creds **out
     if (!(tempcred = (krb5_creds *)malloc(sizeof(*tempcred))))
        return ENOMEM;
 
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
-    *tempcred = *incred;               /* copy everything quickly */
-#else
-    memcpy(tempcred, incred, sizeof(krb5_creds));
-#endif
+    *tempcred = *incred;
     retval = krb5_copy_principal(context, incred->client, &tempcred->client);
     if (retval)
        goto cleanlast;
index d2640ed58c16b3891f6c9217b15172b3452f1e6a..1bb04c1993272b5d263fab9d51698041a30bb3f3 100644 (file)
@@ -39,11 +39,7 @@ krb5_copy_keyblock(krb5_context context, const krb5_keyblock *from, krb5_keybloc
 
        if (!(new_key = (krb5_keyblock *) malloc(sizeof(krb5_keyblock))))
                return ENOMEM;
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
        *new_key = *from;
-#else
-       memcpy(new_key, from, sizeof(krb5_keyblock));
-#endif
        if (!(new_key->contents = (krb5_octet *)malloc(new_key->length))) {
                krb5_xfree(new_key);
                return(ENOMEM);
index f623236958e18fc92286d915e000a40ac839ec62..d16c17b5c6fcd57e8bfeae4e0d38897de700a90d 100644 (file)
@@ -43,11 +43,7 @@ krb5_copy_principal(krb5_context context, krb5_const_principal inprinc, krb5_pri
     if (tempprinc == 0)
        return ENOMEM;
 
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
-    *tempprinc = *inprinc;     /* Copy all of the non-allocated pieces */
-#else
-    memcpy(tempprinc, inprinc, sizeof(krb5_principal_data));
-#endif
+    *tempprinc = *inprinc;
 
     nelems = (int) krb5_princ_size(context, inprinc);
     tempprinc->data = malloc(nelems * sizeof(krb5_data));
index 00f235d3c817ef0bdcbb8c972f0bd60b46c5611c..43268e50f2e208d59c506002c95efc08723406c2 100644 (file)
@@ -37,11 +37,7 @@ krb5_copy_enc_tkt_part(krb5_context context, const krb5_enc_tkt_part *partfrom,
 
     if (!(tempto = (krb5_enc_tkt_part *)malloc(sizeof(*tempto))))
        return ENOMEM;
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
     *tempto = *partfrom;
-#else
-    memcpy(tempto, partfrom, sizeof(krb5_enc_tkt_part));
-#endif
     retval = krb5_copy_keyblock(context, partfrom->session,
                                &tempto->session);
     if (retval) {
@@ -104,11 +100,7 @@ krb5_copy_ticket(krb5_context context, const krb5_ticket *from, krb5_ticket **pt
 
     if (!(tempto = (krb5_ticket *)malloc(sizeof(*tempto))))
        return ENOMEM;
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
     *tempto = *from;
-#else
-    memcpy(tempto, from, sizeof(krb5_ticket));
-#endif
     retval = krb5_copy_principal(context, from->server, &tempto->server);
     if (retval) {
        krb5_xfree(tempto);
index 7dd3ad6c94d319099784911b44523597a7022b0d..b3e94f4c61709dca15422f33d0cf3bab976aedef 100644 (file)
@@ -62,11 +62,7 @@ krb5_get_credentials_core(krb5_context context, krb5_flags options,
        retval = krb5_timeofday(context, &mcreds->times.endtime);
        if (retval != 0) return retval;
     }
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
     mcreds->keyblock = in_creds->keyblock;
-#else
-    memcpy(&mcreds->keyblock, &in_creds->keyblock, sizeof(krb5_keyblock));
-#endif
     mcreds->authdata = in_creds->authdata;
     mcreds->server = in_creds->server;
     mcreds->client = in_creds->client;
index 9066567baf992370641cde4de34ad997030ad0d0..e5cb43a5285fb73a915a432d93115edf3e2a9d6f 100644 (file)
@@ -233,11 +233,7 @@ krb5_mk_req_extended(krb5_context context, krb5_auth_context *auth_context,
 
     if ((retval = encode_krb5_ap_req(&request, &toutbuf)))
        goto cleanup_cksum;
-#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
     *outbuf = *toutbuf;
-#else
-    memcpy(outbuf, toutbuf, sizeof(krb5_data));
-#endif
 
     krb5_xfree(toutbuf);