Hello Daniel and Dan,
Dan Moore wrote:
OK, So I investigated this a bit further and found that the found in
xcircuit.c is there to protect the long handle being stored into a
pointertype that is typedef'ed off a u_int.
The code in xcircuit.h establishes the pointertype:
107 #if SIZEOF_VOID_P == SIZEOF_UNSIGNED_INT
108 #define Number(a) (void *)((u_int) a)
109 typedef u_int pointertype;
110 #elif SIZEOF_VOID_P == SIZEOF_UNSIGNED_LONG
111 #define Number(a) (void *)((u_long) a)
112 typedef u_long pointertype;
113 #elif SIZEOF_VOID_P == SIZEOF_UNSIGNED_LONG_LONG
114 #define Number(a) (void *)((u_long_long) a)
115 typedef u_long_long pointertype;
116 #else
117 ERROR: Cannot compile without knowing the size of a pointer. See
xcircuit.h.
118 #endif
The aforementioned code in xcircuit.c assumed that pointertype was
typedef'ed from u_int. However, on my system SIZEOF_VOID_P is the same a
SIZEOF_UNSIGNED_LONG. Therefore the cast down/up code is not needed.
A solution is to put these same preprocessor directives around the code in
xcircuit.c as well.
https://github.com/mooredan/xcircuit-3.10/commit/1225d030e0d010fb17dda26e151081b5a3df4d89
I recently had this issue with xcircuit 3.10.26 and confirm that the
above commit resolves it. Thanks!
I'm not sure how I missed that whole discussion, but I have applied that
patch the master branch of the xcircuit git repo now.
Regards,
Tim
+--------------------------------+-------------------------------------+
| R. Timothy Edwards (Tim) | email: t...@opencircuitdesign.com |
| Open Circuit Design | web: http://opencircuitdesign.com |
| 19601 Jerusalem Road | phone: (240) 489-3255 |
| Poolesville, MD 20837 | cell: (408) 828-8212 |
+--------------------------------+-------------------------------------+
_______________________________________________
Xcircuit-dev mailing list
Xcircuit-dev@opencircuitdesign.com
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev