4 /* Decls for routines in ghc/lib/cbits/ only used there.
5 * This file is used when compiling the Haskell library
6 * that _ccalls_ those routines; and when compiling those
7 * routines (to check consistency).
11 StgInt closeFile PROTO((StgForeignObj));
13 /* createDirectory.lc */
14 StgInt createDirectory PROTO((StgByteArray));
17 StgAddr openDir__ PROTO((StgByteArray));
18 StgAddr readDir__ PROTO((StgAddr));
21 char * strDup PROTO((const char *));
22 int setenviron PROTO((char **));
23 int copyenv (STG_NO_ARGS);
24 int _setenv PROTO((char *));
25 int delenv PROTO((char *));
29 extern int ghc_errtype;
30 void cvtErrno(STG_NO_ARGS);
31 void stdErrno(STG_NO_ARGS);
34 int execvpe PROTO((char *, char **, char **));
37 StgInt fileEOF PROTO((StgForeignObj));
39 StgInt fileGetc PROTO((StgForeignObj));
41 /* fileLookAhead.lc */
42 StgInt fileLookAhead PROTO((StgForeignObj));
45 StgInt getFilePosn PROTO((StgForeignObj));
46 StgInt setFilePosn PROTO((StgForeignObj, StgInt));
49 StgInt filePutc PROTO((StgForeignObj, StgInt));
52 StgInt fileSize PROTO((StgForeignObj, StgByteArray));
55 StgInt flushFile PROTO((StgForeignObj));
58 void freeStdFile PROTO((StgForeignObj));
59 void freeFile PROTO((StgForeignObj));
61 /* getBufferMode.lc */
62 StgInt getBufferMode PROTO((StgForeignObj));
65 StgInt getClockTime PROTO((StgByteArray, StgByteArray));
66 StgAddr showTime PROTO((I_, StgByteArray, StgByteArray));
67 StgAddr toClockSec PROTO((I_, I_, I_, I_, I_, I_, I_, StgByteArray));
68 StgAddr toLocalTime PROTO((I_, StgByteArray, StgByteArray));
69 StgAddr toUTCTime PROTO((I_, StgByteArray, StgByteArray));
72 StgByteArray getCPUTime PROTO((StgByteArray));
75 /* getCurrentDirectory.lc */
76 StgAddr getCurrentDirectory(STG_NO_ARGS);
79 int lockFile PROTO((int, int));
80 int unlockFile PROTO((int));
81 StgInt getLock PROTO((StgForeignObj, StgInt));
84 StgInt inputReady PROTO((StgForeignObj,StgInt));
87 StgAddr openFile PROTO((StgByteArray, StgByteArray));
88 StgAddr openFd PROTO((StgInt, StgByteArray));
91 StgInt readBlock PROTO((StgAddr, StgForeignObj, StgInt));
92 StgInt readLine PROTO((StgAddr, StgForeignObj, StgInt));
93 StgInt readChar PROTO((StgForeignObj));
95 /* removeDirectory.lc */
96 StgInt removeDirectory PROTO((StgByteArray));
99 StgInt removeFile PROTO((StgByteArray));
101 /* renameDirectory.lc */
102 StgInt renameDirectory PROTO((StgByteArray, StgByteArray));
105 StgInt renameFile PROTO((StgByteArray, StgByteArray));
108 StgInt seekFile PROTO((StgForeignObj, StgInt, StgInt, StgByteArray));
109 StgInt seekFileP PROTO((StgForeignObj));
111 /* setBuffering.lc */
112 StgInt setBuffering PROTO((StgForeignObj, StgInt));
114 /* setCurrentDirectory.lc */
115 StgInt setCurrentDirectory PROTO((StgByteArray));
118 StgAddr showTime PROTO((StgInt, StgByteArray, StgByteArray));
121 StgInt systemCmd PROTO((StgByteArray));
124 StgAddr toLocalTime PROTO((StgInt, StgByteArray, StgByteArray));
127 StgAddr toUTCTime PROTO((StgInt, StgByteArray, StgByteArray));
130 StgAddr toClockSec PROTO((StgInt, StgInt, StgInt, StgInt, StgInt, StgInt, StgInt, StgByteArray));
133 StgInt writeFile PROTO((StgAddr, StgForeignObj, StgInt));
135 #endif /* ! STGIO_H */