mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
(make_tempfile): simplify the #ifdef block by using #if defined and re-write
the #warning as a #error because it's terminal. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3994 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5b787c3c33
commit
c9265e7ccb
@ -1,3 +1,8 @@
|
|||||||
|
2002-04-15 Angus Leeming <a.leeming@ic.ac.uk>
|
||||||
|
|
||||||
|
* tempname.C (make_tempfile): simplify the #ifdef block by using
|
||||||
|
#if defined and re-write the #warning as a #error because it's terminal.
|
||||||
|
|
||||||
2002-04-08 Herbert Voss <voss@perce.de>
|
2002-04-08 Herbert Voss <voss@perce.de>
|
||||||
|
|
||||||
* filetools.C (getExtFromContents): get tgif run
|
* filetools.C (getExtFromContents): get tgif run
|
||||||
|
@ -18,18 +18,14 @@ namespace {
|
|||||||
inline
|
inline
|
||||||
int make_tempfile(char * templ)
|
int make_tempfile(char * templ)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MKSTEMP
|
#if defined(HAVE_MKSTEMP)
|
||||||
return ::mkstemp(templ);
|
return ::mkstemp(templ);
|
||||||
#else
|
#elif defined(HAVE_MKTEMP)
|
||||||
#ifdef HAVE_MKTEMP
|
|
||||||
// This probably just barely works...
|
// This probably just barely works...
|
||||||
::mktemp(templ);
|
::mktemp(templ);
|
||||||
return ::open(templ, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
|
return ::open(templ, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
|
||||||
#else
|
#else
|
||||||
#ifdef WITH_WARNINGS
|
#error FIX FIX FIX
|
||||||
#warning FIX FIX FIX
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user