diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-01-28 23:45:51 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-01-29 15:39:11 +0100 |
commit | 1eb936d24568269908bde10289c789f671d66aad (patch) | |
tree | 5b31c672455ef594622b1284033edd99f0c3f755 /idlc | |
parent | 9c03e3097f59f57b60780ab8b2791ca08ddc4192 (diff) |
Use errno to get the correct error message if mkstemp() fails.
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/source/idlccompile.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx index 48c975b280a9..2af8168e18a0 100644 --- a/idlc/source/idlccompile.cxx +++ b/idlc/source/idlccompile.cxx @@ -41,6 +41,7 @@ #endif #ifdef SAL_UNX +#include <errno.h> #include <unistd.h> #if defined(MACOSX) || defined(FREEBSD) || defined(NETBSD) || \ defined(AIX) || defined(OPENBSD) @@ -168,7 +169,7 @@ OString makeTempName(const OString& prefix) int nDescriptor = mkstemp(tmpFilePattern); if( -1 == nDescriptor ) { - fprintf( stderr,"idlc: couldn't create temporary file\n" ); + fprintf(stderr, "idlc: mkstemp(\"%s\") failed: %s\n", tmpFilePattern, strerror(errno)); exit( 1 ); } // the file shall later be reopened by stdio functions |