Lines 100-105
Link Here
|
100 |
#include <saldata.hxx> |
100 |
#include <saldata.hxx> |
101 |
#endif |
101 |
#endif |
102 |
|
102 |
|
|
|
103 |
#include <sys/types.h> |
104 |
#include <sys/stat.h> |
105 |
#include <fcntl.h> |
106 |
#include <stdio.h> |
107 |
|
103 |
#ifndef _PSPRINT_PRINTERINFOMANAGER_HXX_ |
108 |
#ifndef _PSPRINT_PRINTERINFOMANAGER_HXX_ |
104 |
#include <psprint/printerinfomanager.hxx> |
109 |
#include <psprint/printerinfomanager.hxx> |
105 |
#endif |
110 |
#endif |
Lines 839-845
SalPrinter::~SalPrinter()
Link Here
|
839 |
static inline String getTmpName() |
844 |
static inline String getTmpName() |
840 |
{ |
845 |
{ |
841 |
char tmpNam[ L_tmpnam ]; |
846 |
char tmpNam[ L_tmpnam ]; |
842 |
#if defined( FREEBSD ) || defined (IRIX) || defined(NETBSD) |
847 |
#if defined (FREEBSD) || defined (IRIX) || defined(NETBSD) || defined (LINUX) |
843 |
mkstemp ( tmpNam ); |
848 |
mkstemp ( tmpNam ); |
844 |
#elif defined( MACOSX ) |
849 |
#elif defined( MACOSX ) |
845 |
{ |
850 |
{ |
Lines 849-855
static inline String getTmpName()
Link Here
|
849 |
free( tempFileName ); |
854 |
free( tempFileName ); |
850 |
} |
855 |
} |
851 |
#else |
856 |
#else |
852 |
tmpnam_r( tmpNam ); |
857 |
int fd; |
|
|
858 |
do { |
859 |
tmpnam_r( tmpNam ); |
860 |
fd = open (tmpNam, O_CREAT | O_EXCL | O_TRUNC | O_RDWR, 0600); |
861 |
} while (fd == -1); |
862 |
close (fd); |
853 |
#endif |
863 |
#endif |
854 |
return String( ByteString( tmpNam ), gsl_getSystemTextEncoding() ); |
864 |
return String( ByteString( tmpNam ), gsl_getSystemTextEncoding() ); |
855 |
} |
865 |
} |