]> git.lyx.org Git - features.git/commitdiff
(make_tempfile): simplify the #ifdef block by using #if defined and re-write
authorAngus Leeming <leeming@lyx.org>
Mon, 15 Apr 2002 11:01:19 +0000 (11:01 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 15 Apr 2002 11:01:19 +0000 (11:01 +0000)
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

src/support/ChangeLog
src/support/tempname.C

index 573742700c9889005d72800b555747624ed860fc..099ae47cca407780e57de3159408d77d0ed36fba 100644 (file)
@@ -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>
 
        * filetools.C (getExtFromContents): get tgif run 
index 88f142bac4784465d1e3cb5da4290807d638e04c..f15ec1a6f0d63fc38a93e6a2eb9cb69b5dd1b930 100644 (file)
@@ -18,18 +18,14 @@ namespace {
 inline
 int make_tempfile(char * templ)
 {
-#ifdef HAVE_MKSTEMP
+#if defined(HAVE_MKSTEMP)
        return ::mkstemp(templ);
-#else
-#ifdef HAVE_MKTEMP
+#elif defined(HAVE_MKTEMP)
        // This probably just barely works...
        ::mktemp(templ);
        return ::open(templ, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
 #else
-#ifdef WITH_WARNINGS
-#warning FIX FIX FIX
-#endif
-#endif
+#error FIX FIX FIX
 #endif
 }