6 /* A quick and dirty hack to resurrect -fvia-C from bitrot.
8 * The newest CapiFFI extension doesn't play nice with -fvia-C,
9 * generating function wrappers without saving them into the .hc
13 int ghc_wrapper_d2lP_fcntl(int filedes, int cmd);
14 int ghc_wrapper_d2lD_fcntl(int filedes, int cmd, long arg);
15 int ghc_wrapper_d2lo_fcntl(int filedes, int cmd, struct flock* arg);
16 int ghc_wrapper_d1mz_gettimeofday(struct timeval* tp, void* tzp);
17 int ghc_wrapper_d2jE_utime(const char *path, const struct utimbuf *times);
18 void SystemziConsoleziTerminfoziBase_d2eD(void *cif, void* resp, void** args, void* the_stableptr);
21 int ghc_wrapper_d2lP_fcntl(int filedes, int cmd) {
22 return fcntl(filedes, cmd);
26 int ghc_wrapper_d2lD_fcntl(int filedes, int cmd, long arg) {
27 return fcntl(filedes, cmd, arg);
31 int ghc_wrapper_d2lo_fcntl(int filedes, int cmd, struct flock* arg) {
32 return fcntl(filedes, cmd, arg);
35 int ghc_wrapper_d1mz_gettimeofday(struct timeval* tp, void* tzp) {
36 return gettimeofday(tp, tzp);
39 int ghc_wrapper_d2jE_utime(const char *path, const struct utimbuf *times) {
40 return utime(path, times);
43 void SystemziConsoleziTerminfoziBase_d2eD(void *cif, void* resp, void** args, void* the_stableptr) {
44 /* The recipe to create this function is somewhere in
45 * compiler/deSugar/DsForeign.lhs, but... I don't want to bother
46 * replicating that here.
48 assert("DO NOT CALL THIS FUNCTION" == NULL);