Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: Modularized mtio implementation.
[ashd.git]
/
lib
/
mtio.c
diff --git
a/lib/mtio.c
b/lib/mtio.c
index
43cc1f7
..
b994cc2
100644
(file)
--- a/
lib/mtio.c
+++ b/
lib/mtio.c
@@
-16,16
+16,17
@@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
+#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <sys/socket.h>
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
#include <log.h>
#include <utils.h>
#include <mt.h>
#include <log.h>
#include <utils.h>
#include <mt.h>
@@
-106,6
+107,7
@@
static int mtclose(void *cookie)
return(0);
}
return(0);
}
+#ifdef HAVE_GLIBC_STDIO
static cookie_io_functions_t iofuns = {
.read = mtread,
.write = mtwrite,
static cookie_io_functions_t iofuns = {
.read = mtread,
.write = mtwrite,
@@
-128,3
+130,6
@@
FILE *mtstdopen(int fd, int issock, int timeout, char *mode)
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
return(ret);
}
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
return(ret);
}
+#else
+#error "No stdio implementation for this system"
+#endif