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 | a2fef0c117545092e6d1c7a47b814509b767c112 (patch) | |
tree | ff5bebd8636264ae6b02a066e7cbe14e3f28e999 /llvm/lib/Bitcode/Writer/BitWriter.cpp | |
parent | 3453c7bcb50da0b73b20dfd52034787007695d14 (diff) | |
download | bcm5719-llvm-a2fef0c117545092e6d1c7a47b814509b767c112.tar.gz bcm5719-llvm-a2fef0c117545092e6d1c7a47b814509b767c112.zip |
Better test for availability of __gnu_cxx::stdio_filebuf.
If this doesn't work, I'll write a configure test.
llvm-svn: 52213
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitWriter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitWriter.cpp b/llvm/lib/Bitcode/Writer/BitWriter.cpp index 1aac5006d8f..8834964b040 100644 --- a/llvm/lib/Bitcode/Writer/BitWriter.cpp +++ b/llvm/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 |