diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-06-11 10:46:24 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-06-11 10:46:24 +0000 |
commit | a068fd32e25b1eee3ad50636b169b0b06a0eb4c5 (patch) | |
tree | f4a37d590a84b29461fb9965223a4a76790f4937 /lib/Bitcode | |
parent | b4d6a5a76cca5828c9e2599f12036c7f9c5f89d7 (diff) | |
download | external_llvm-a068fd32e25b1eee3ad50636b169b0b06a0eb4c5.zip external_llvm-a068fd32e25b1eee3ad50636b169b0b06a0eb4c5.tar.gz external_llvm-a068fd32e25b1eee3ad50636b169b0b06a0eb4c5.tar.bz2 |
Better test for availability of __gnu_cxx::stdio_filebuf.
If this doesn't work, I'll write a configure test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52213 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r-- | lib/Bitcode/Writer/BitWriter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Bitcode/Writer/BitWriter.cpp b/lib/Bitcode/Writer/BitWriter.cpp index 1aac500..8834964 100644 --- a/lib/Bitcode/Writer/BitWriter.cpp +++ b/lib/Bitcode/Writer/BitWriter.cpp @@ -28,7 +28,7 @@ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) { return 0; } -#ifdef __GNUC__ +#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR >= 4) #include <ext/stdio_filebuf.h> // FIXME: Control this with configure? Provide some portable abstraction in @@ -49,4 +49,10 @@ int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) { return 0; } +#else + +int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) { + return -1; // Not supported. +} + #endif |