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 char * strDup PROTO((const char *));
18 int setenviron PROTO((char **));
19 int copyenv (STG_NO_ARGS);
20 int _setenv PROTO((char *));
21 int delenv PROTO((char *));
25 extern int ghc_errtype;
26 void cvtErrno(STG_NO_ARGS);
27 void stdErrno(STG_NO_ARGS);
30 int execvpe PROTO((char *, char **, char **));
33 StgInt fileEOF PROTO((StgForeignObj));
35 StgInt fileGetc PROTO((StgForeignObj));
37 /* fileLookAhead.lc */
38 StgInt fileLookAhead PROTO((StgForeignObj));
41 StgInt getFilePosn PROTO((StgForeignObj));
42 StgInt setFilePosn PROTO((StgForeignObj, StgInt));
45 StgInt filePutc PROTO((StgForeignObj, StgInt));
48 StgInt fileSize PROTO((StgForeignObj, StgByteArray));
51 StgInt flushFile PROTO((StgForeignObj));
54 void freeStdChannel PROTO((StgForeignObj));
55 void freeFile PROTO((StgForeignObj));
57 /* getBufferMode.lc */
58 StgInt getBufferMode PROTO((StgForeignObj));
61 StgInt getClockTime PROTO((StgByteArray, StgByteArray));
64 StgByteArray getCPUTime PROTO((StgByteArray));
67 /* getCurrentDirectory.lc */
68 StgAddr getCurrentDirectory(STG_NO_ARGS);
70 /* getDirectoryContents.lc */
71 StgAddr getDirectoryContents PROTO((StgByteArray));
74 int lockFile PROTO((int, int));
75 int unlockFile PROTO((int));
76 StgInt getLock PROTO((StgForeignObj, StgInt));
79 StgInt inputReady PROTO((StgForeignObj));
82 StgAddr openFile PROTO((StgByteArray, StgByteArray));
85 StgInt readBlock PROTO((StgAddr, StgForeignObj, StgInt));
86 StgInt readLine PROTO((StgAddr, StgForeignObj, StgInt));
87 StgInt readChar PROTO((StgForeignObj));
89 /* removeDirectory.lc */
90 StgInt removeDirectory PROTO((StgByteArray));
93 StgInt removeFile PROTO((StgByteArray));
95 /* renameDirectory.lc */
96 StgInt renameDirectory PROTO((StgByteArray, StgByteArray));
99 StgInt renameFile PROTO((StgByteArray, StgByteArray));
102 StgInt seekFile PROTO((StgForeignObj, StgInt, StgInt, StgByteArray));
103 StgInt seekFileP PROTO((StgForeignObj));
105 /* setBuffering.lc */
106 StgInt setBuffering PROTO((StgForeignObj, StgInt));
108 /* setCurrentDirectory.lc */
109 StgInt setCurrentDirectory PROTO((StgByteArray));
112 StgAddr showTime PROTO((StgInt, StgByteArray, StgByteArray));
115 StgInt systemCmd PROTO((StgByteArray));
118 StgAddr toLocalTime PROTO((StgInt, StgByteArray, StgByteArray));
121 StgAddr toUTCTime PROTO((StgInt, StgByteArray, StgByteArray));
124 StgAddr toClockSec PROTO((StgInt, StgInt, StgInt, StgInt, StgInt, StgInt, StgInt, StgByteArray));
127 StgInt writeFile PROTO((StgAddr, StgForeignObj, StgInt));
129 #endif /* ! STGIO_H */