7 /* A quick and dirty hack to resurrect -fvia-C from bitrot.
9 * The newest CapiFFI extension doesn't play nice with -fvia-C,
10 * generating function wrappers without saving them into the .hc
14 int ghc_wrapper_d2lP_fcntl(int fd, int cmd);
15 int ghc_wrapper_d2lD_fcntl(int filedes, int cmd, long arg);
16 int ghc_wrapper_d2lo_fcntl(int filedes, int cmd, struct flock* arg);
17 int ghc_wrapper_d1mC_gettimeofday(struct timeval* tp, struct timezone* tzp);
18 int ghc_wrapper_d2jE_utime(const char *path, const struct utimbuf *times);
19 HsInt32 SystemziConsoleziTerminfoziBase_d2eD(StgStablePtr the_stableptr, void* original_return_addr, HsInt32 a1);
22 int ghc_wrapper_d2lP_fcntl(int fd, int cmd) {
23 return fcntl(fd, cmd);
27 int ghc_wrapper_d2lD_fcntl(int fd, int cmd, long arg) {
28 return fcntl(fd, cmd, arg);
32 int ghc_wrapper_d2lo_fcntl(int fd, int cmd, struct flock* arg) {
33 return fcntl(fd, cmd, arg);
36 int ghc_wrapper_d1mC_gettimeofday(struct timeval* tp, struct timezone* tzp) {
37 return gettimeofday(tp, tzp);
40 int ghc_wrapper_d2jE_utime(const char *path, const struct utimbuf *times) {
41 return utime(path, times);
44 HsInt32 SystemziConsoleziTerminfoziBase_d2eD(StgStablePtr the_stableptr, void* original_return_addr, HsInt32 a1) {
45 /* The recipe to create this function is somewhere in
46 * compiler/deSugar/DsForeign.lhs, but... I don't want to bother
47 * replicating that here.
49 assert("DO NOT CALL THIS FUNCTION" == NULL);