comparison liboctave/file-ops.cc @ 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 62eb444704ba
comparison
equal deleted inserted replaced
10027:0f312e11957e 10028:52a248732bb6
133 { 133 {
134 msg = std::string (); 134 msg = std::string ();
135 135
136 int status = -1; 136 int status = -1;
137 137
138 #if defined (HAVE_MKFIFO) 138 // With gnulib we will always have mkfifo, but some systems like MinGW
139 // don't have working mkfifo functions. On those systems, mkfifo will
140 // always return -1 and set errno.
141
139 status = ::mkfifo (name.c_str (), mode); 142 status = ::mkfifo (name.c_str (), mode);
140 143
141 if (status < 0) 144 if (status < 0)
142 { 145 {
143 using namespace std; 146 using namespace std;
144 msg = ::strerror (errno); 147 msg = ::strerror (errno);
145 } 148 }
146 #else
147 msg = NOT_SUPPORTED ("mkfifo");
148 #endif
149 149
150 return status; 150 return status;
151 } 151 }
152 152
153 // I don't know how to emulate this on systems that don't provide it. 153 // I don't know how to emulate this on systems that don't provide it.