diff options
author | rillig <rillig> | 2007-09-29 12:08:25 +0000 |
---|---|---|
committer | rillig <rillig> | 2007-09-29 12:08:25 +0000 |
commit | 2aea5603364327cf33d527a9528d05e756998d95 (patch) | |
tree | 46270af9ff16273cbb3f35eff8ddd64fb297a3c2 /cad/felt/patches | |
parent | e79938bc14563807c041e671bfc26f18404f8a82 (diff) | |
download | pkgsrc-2aea5603364327cf33d527a9528d05e756998d95.tar.gz |
Fixed gcc 4 error message.
Diffstat (limited to 'cad/felt/patches')
-rw-r--r-- | cad/felt/patches/patch-ao | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/cad/felt/patches/patch-ao b/cad/felt/patches/patch-ao new file mode 100644 index 00000000000..2a32889223b --- /dev/null +++ b/cad/felt/patches/patch-ao @@ -0,0 +1,47 @@ +$NetBSD: patch-ao,v 1.1 2007/09/29 12:08:25 rillig Exp $ + +Since gcc 4, type casts are no longer lvalues. + +--- src/Burlap/descriptor.h.orig 2000-02-21 23:44:29.000000000 +0100 ++++ src/Burlap/descriptor.h 2007-09-29 14:04:42.000000000 +0200 +@@ -65,6 +65,7 @@ + + # define D_NumTypes (T_External + 1) + ++# define D_uptr_as(d, Type) (*((Type *) &((d) -> u.ptr))) + # define D_Type(d) ((d) -> type) + # define D_Temp(d) ((d) -> temp) + # define D_Trapped(d) ((d) -> trapped) +@@ -80,19 +81,19 @@ + # define D_Array(d) ((d) -> u.array) + # define D_Row(d) ((d) -> u.row) + # define D_Matrix(d) ((d) -> u.mtx) +-# define D_MatrixPtr(d) ((Matrix *) (d) -> u.ptr) +-# define D_Analysis(d) ((Analysis *) (d) -> u.ptr) +-# define D_Constraint(d) ((Constraint *) (d) -> u.ptr) +-# define D_Definition(d) ((Definition *) (d) -> u.ptr) +-# define D_Element(d) ((Element *) (d) -> u.ptr) +-# define D_Force(d) ((Force *) (d) -> u.ptr) +-# define D_Load(d) ((Distributed *) (d) -> u.ptr) +-# define D_Material(d) ((Material *) (d) -> u.ptr) +-# define D_Node(d) ((Node *) (d) -> u.ptr) +-# define D_Pair(d) ((Pair *) (d) -> u.ptr) +-# define D_Problem(d) ((Problem *) (d) -> u.ptr) +-# define D_Stress(d) ((Stress *) (d) -> u.ptr) +-# define D_External(d) ((int (**) ( )) (d) -> u.ptr) ++# define D_MatrixPtr(d) D_uptr_as((d), Matrix *) ++# define D_Analysis(d) D_uptr_as((d), Analysis *) ++# define D_Constraint(d) D_uptr_as((d), Constraint *) ++# define D_Definition(d) D_uptr_as((d), Definition *) ++# define D_Element(d) D_uptr_as((d), Element *) ++# define D_Force(d) D_uptr_as((d), Force *) ++# define D_Load(d) D_uptr_as((d), Distributed *) ++# define D_Material(d) D_uptr_as((d), Material *) ++# define D_Node(d) D_uptr_as((d), Node *) ++# define D_Pair(d) D_uptr_as((d), Pair *) ++# define D_Problem(d) D_uptr_as((d), Problem *) ++# define D_Stress(d) D_uptr_as((d), Stress *) ++# define D_External(d) (*((int (***) ( )) &((d) -> u.ptr))) + # define D_TypeName(d) (type_names [D_Type (d)]) + # define D_Direct(d) (D_Type (d) == T_Analysis || \ + D_Type (d) == T_Problem || D_Type (d) == T_Pair) |