diff options
author | root <root@rshg054.dnsready.net> | 2011-10-01 23:14:36 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-10-01 23:14:36 +0000 |
commit | 0f78806d775c4d46c649425fcb67964d53531db8 (patch) | |
tree | 7f0a7491cc53b811c9b5d8f10af67e263391fed6 /testing/hpoj/hpoj-pack.patch | |
parent | 22b22c6e016b2a86a0d25e68eeb3fdec286f5352 (diff) |
Sat Oct 1 23:14:36 UTC 2011
Diffstat (limited to 'testing/hpoj/hpoj-pack.patch')
-rw-r--r-- | testing/hpoj/hpoj-pack.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/testing/hpoj/hpoj-pack.patch b/testing/hpoj/hpoj-pack.patch new file mode 100644 index 000000000..beb7040dc --- /dev/null +++ b/testing/hpoj/hpoj-pack.patch @@ -0,0 +1,59 @@ +There is a rather scary and longstanding GCC bug [1] which causes +instant crashes if a program defines a struct with function-pointers +and that structure happens to be "packed". Why anybody would want to +do such a thing is beyond me, but suffice it to say that hpoj v0.91 is +doing precisely that. The current Debian/sarge package for hpoj is +definitely affected (any attempt to scan an image results in an +instant crash). + +A patch to work around the problem is attached. + +Perhaps the hpoj developers can tell us whether it was really +intentional to have the #pragma pack(1) span all of <stdlib.h> and +<xform.h>? + +Thanks, + + --david + +[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1844 + +--- hpoj-0.91/include/hpojip.h 2002-07-25 02:01:24.000000000 -0700 ++++ hpoj-0.91-davidm/include/hpojip.h 2004-11-11 21:19:58.775236374 -0800 +@@ -131,12 +132,15 @@ + float fl; + } DWORD_OR_PVOID; + ++#pragma pack () ++ + #ifdef HPOJIP_INTERNAL + #include "../lib/hpojip/xform.h" // this file uses the above definitions + #else + typedef struct IP_XFORM_TBL_s FAR *LPIP_XFORM_TBL; + #endif + ++#pragma pack (1) + + /****************************************************************************\ + **************************************************************************** +@@ -587,8 +591,6 @@ + + EXPORT(WORD) ipGetFuncPtrs (LPIP_JUMP_TBL lpJumpTbl); + +-#pragma pack () +- + /****************************************************************************\ + **************************************************************************** + * + + +------------------------------------------------------- +This SF.Net email is sponsored by: +Sybase ASE Linux Express Edition - download now for FREE +LinuxWorld Reader's Choice Award Winner for best database on Linux. +http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click + +_______________________________________________ +hpoj-devel mailing list +hpoj-devel@lists.sourceforge.net +https://lists.sourceforge.net/lists/listinfo/hpoj-devel |