ntfile.c revision e76d4c91bfadf823f04dcca1c1c5bcc14c67671d
/*
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ntfile.c,v 1.3 2001/07/09 21:06:14 gson Exp $ */
/*
* This file has been necessitated by the fact that the iov array is local
* to the module, so passing the FILE ptr to a file I/O function in a
* different module or DLL will cause the application to fail to find the
* I/O channel and the application will terminate. The standard file I/O
* functions are redefined to call these routines instead and there will
* be just the one iov to deal with.
*/
#include <config.h>
#include <io.h>
FILE *
}
int
isc_ntfile_fclose(FILE *f) {
return (fclose(f));
}
int
}
}
int r;
fflush(f);
return (r);
}
int
isc_ntfile_flush(FILE *f) {
return (fflush(f));
}
int
isc_ntfile_sync(FILE *f) {
}
FILE *
isc_ntfile_getaddress(int r) {
return (&_iob[r]);
}
int
isc_ntfile_printf(const char *format, ...) {
int r;
return (r);
}
int
int r;
return (r);
}
int
int r;
return (r);
}
int
int r;
return (r);
}
int
int r;
return (r);
}
int
}
int
}
char *
}
int
}
FILE *
}
FILE *
}
/*
* open(), close(), read(), write(), fsync()
* sockets are file descriptors in UNIX. This is not so in NT
* We keep track of what is a socket and what is an FD to
* make everything flow right.
*/
int
int pmode;
int fd;
/* Extract the cmd parameter */
return fd;
}
int
isc_ntfile_close(int fd){
}
int
}
int
int r;
return (r);
}