01-01-2009
6,
0
Join Date: Jan 2009
Last Activity: 22 February 2009, 2:14 AM EST
Posts: 6
Thanks Given: 0
Thanked 0 Times in 0 Posts
64 bit Porting Problem !!!
Dear All,
I am trying to build my code (currently functioning on 32bit) on 64 bit SUSE machine.
I am getting following error:
warning: initializer element is not computable at load time
dau.gss.c:275: error: initializer element is not constant
dau.gss.c:275: error: (near initialization for `type_hs.utility.n')
in dau.gss.c the content is :
line no. Code
...
...
272 static DH_T_HS ca_type_hs =
273 {0, DH_B_OID, 0, 0, ASN1_OID, 0, 3, 0, 0x55, 4, 37};
274 static DH_T_HS type_hs =
275 {(UINT32)&ca_type_hs, DH_B_OID, 0, 0, ASN1_OID, 0, 3, 0, 0x55, 4, 36};
...
...
Following are some definitions related to the above mentioned code:
typedef unsigned int UINT32;
typedef unsigned char OCTET;
typedef unsigned short UINT16;
typedef struct dh_t_hs {
union {
UINT32 n;
struct dh_t_hs *p;
} utility;
OCTET cntrl;
OCTET flags;
UINT16 use;
UINT16 id2;
UINT16 use2;
UINT32 count;
UINT32 count_lmt;
union {
OCTET id [4];
OCTET prime [4];
UINT32 list [1];
struct dh_t_hs *construct [1];
} content;
} DH_T_HS, *DH_P_HS;
If I make the "n" variable unsigned long (in union "utility" within structure dh_t_hs) and if in "type_hs" variable (@ line 275 in the file dau.gss.c) I do "(unsigned long)&ca_type_hs", I dont get the above mentioned error.
But the problem is that I cant make the "n" variable unsigned long (in union "utility" within structure "dh_t_hs") as it used widely in the project as an integer only.
Could anybody please suggest some solution for the same?
Thanks in advance.
Regards.
Thanks in advance.
Regards,