changeset 10028:52a248732bb6

use mkfifo module from gnulib
author John W. Eaton <jwe@octave.org>
date Fri, 25 Dec 2009 23:58:08 -0500
parents 0f312e11957e
children 3b2f81d5a6dc
files configure.ac liboctave/file-ops.cc
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Sat Dec 26 00:20:12 2009 -0500
+++ b/configure.ac	Fri Dec 25 23:58:08 2009 -0500
@@ -1435,7 +1435,7 @@
   getegid geteuid getgid getgrent getgrgid getgrnam getpgrp getpid \
   getppid getpwent getpwuid gettimeofday getuid getwd _kbhit kill \
   lgamma lgammaf lgamma_r lgammaf_r link localtime_r log1p log1pf lstat \
-  memmove mkfifo mkstemp on_exit pipe poll putenv raise readlink \
+  memmove mkstemp on_exit pipe poll putenv raise readlink \
   realpath rename resolvepath rindex rmdir roundl select setgrent setlocale \
   setpwent setvbuf sigaction siglongjmp sigpending sigprocmask sigsuspend \
   snprintf stat strcasecmp strdup strerror stricmp strncasecmp \
--- a/liboctave/file-ops.cc	Sat Dec 26 00:20:12 2009 -0500
+++ b/liboctave/file-ops.cc	Fri Dec 25 23:58:08 2009 -0500
@@ -135,7 +135,10 @@
 
   int status = -1;
 
-#if defined (HAVE_MKFIFO)
+  // With gnulib we will always have mkfifo, but some systems like MinGW
+  // don't have working mkfifo functions.  On those systems, mkfifo will
+  // always return -1 and set errno.
+
   status = ::mkfifo (name.c_str (), mode);
 
   if (status < 0)
@@ -143,9 +146,6 @@
       using namespace std;
       msg = ::strerror (errno);
     }
-#else
-  msg = NOT_SUPPORTED ("mkfifo");
-#endif
 
   return status;
 }