This appears also to be part of a larger problem. egcs included with RedHat 6 optimizes a function in such a way that called from certain places, the return value is smashed. This causes Pine to correctly report to the local user that a file is of one MIME type, but end up attaching it as the default for the type. (E.g. text/* becomes text/plain, etc.) To reproduce this bug, compile Pine from the SRPM on RedHat 6 with egcs-1.1.2-13 (RPM, egcs --version shows 2.91.66). This bug ALSO occured on a Linux 1.2.x system using gcc-2.7.2 on RedHat 3.0.3 (just to show it's apparently a long-standing bug). Adding a sleep(0) call above the return in the problematic function is a solution to this problem. See the attached URL. While this should probably be fixed in PINE in the short-term, long term it probably points to something needing to be seen to in egcs. IT IS WORTH NOTING THAT THIS BUG OCCURED WITH ALL OPTIMIZATIONS OFF. This bug has been logged against Pine as well.
Pine counterpart bug is #3977
*** This bug has been marked as a duplicate of 3977 ***