added gnutls backend and moved backend code into new files
[ircu2.10.12-pk.git] / include / fileio.h
index ad7ad7a4340ac98b9adc4d3c0c175b48912cc70e..a2fcc718afa74523d6a359530ebe3004a954d0ef 100644 (file)
@@ -1,19 +1,22 @@
+/** @file fileio.h
+ * @brief ANSI FILE* clone API declarations.
+ * @version $Id$
+ */
 #ifndef INCLUDED_fileio_h
 #define INCLUDED_fileio_h
 
 #ifndef INCLUDED_sys_types_h
-#include <sys/types.h>         /* size_t */
+#include <sys/types.h>          /* size_t */
 #define INCLUDED_sys_types_h
 #endif
-#ifndef INCLUDED_sys_stat_h
-#include <sys/stat.h>          /* struct stat */
-#define INCLUDED_sys_stat_h
-#endif
 
-/*
- * FileBuf is a mirror of the ANSI FILE struct, but it works for any
+struct stat;
+
+/** A mirror of the ANSI FILE struct, but it works for any
  * file descriptor. FileBufs are allocated when a file is opened with
  * fbopen, and they are freed when the file is closed using fbclose.
+ * (Some OSes limit the range of file descriptors in a FILE*, for
+ * example to fit in "char".)
  */
 typedef struct FileBuf FBFILE;
 
@@ -31,7 +34,7 @@ extern FBFILE *fdbopen(int fd, const char *mode);
  * close a file opened with fbopen, see fclose(3)
  */
 extern void fbclose(FBFILE * fb);
-/* 
+/*
  * return the next character from the file, EOF on end of file
  * see fgetc(3)
  */