Bug 496423
Summary: | something maybe busted in stdlib.h? | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tom Horsley <horsley1953> | ||||||
Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||||
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | rawhide | CC: | jakub | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-04-23 10:06:42 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Tom Horsley
2009-04-19 00:43:48 UTC
Created attachment 340196 [details]
Buffer.cpp run through g++ -E
I'm not sure what the heck this code is doing. It appears to maybe be defining
int32 in terms of int32_t and vice-versa, but with some namespaces involved as well. I'm willing to call it a truecrypt source bug, but it is still true that
the same source compiles OK in fedora 10 (or did a while back, I suppose
recent updates may have busted it there as well).
I guess I need to hack the source even more to reliably compile.
Here's the command line used by the Makefile to compile this. There are lots of suspicous -D options as well (this is the version I modified to use -E instead of -c): g++ -E -MMD -I/zooty/build/truecrypt-5.0-source -I/zooty/build/truecrypt-5.0-source/Crypto -DBOOL=int -DFALSE=0 -DTRUE=1 -D__int8=char -D__int16=short -D__int32=int '-D__int64=long long' -O2 -fno-strict-aliasing -DTC_UNIX -DTC_LINUX -fdata-sections -ffunction-sections -Wall -Wno-sign-compare -Wno-unused-parameter Buffer.cpp > Buffer.e Can you please add -dD to the options, so that macros can be seen in the preprocessed source as well? Created attachment 340850 [details]
Buffer.cpp run through g++ -E -dD
OK, here's the same file with -dD added to the command line.
I did discover a way to get this to work: After I unpack and patch the source,
I added a little script that runs through all the .cpp files and just
sticks:
#include <stdlib.h>
at the beginning of the file so it is included before all other local includes.
Everything seems to compile perfectly fine if I do that, and it is no worse
than most of the other hacks I'm doing to the source :-).
That's clearly a truecrypt bug. See how it does: namespace TrueCrypt { #include <inttypes.h> ... } ... #include <stdlib.h> That's invalid, standard headers may be only included outside of any external declaration or definition, so can't be included from within a namespace definition, see ISO C++ [lib.using.headers]/3. Yea, I was definitely leaning toward a truecrypt bug, I just couldn't figure out what silly thing it was doing. Thanks for letting me know. |