]> gitweb @ CieloNegro.org - pkgsrc-ghc.git/blob - files/capi-wrappers-darwin-powerpc.c
Drop superfluous PKG_DESTDIR_SUPPORT, "user-destdir" is default these days.
[pkgsrc-ghc.git] / files / capi-wrappers-darwin-powerpc.c
1 #include <assert.h>
2 #include <fcntl.h>
3 #include <sys/time.h>
4 #include <utime.h>
5
6 /* A quick and dirty hack to resurrect -fvia-C from bitrot.
7  *
8  * The newest CapiFFI extension doesn't play nice with -fvia-C,
9  * generating function wrappers without saving them into the .hc
10  * files.
11  */
12
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);
19
20 /* c_fcntl_read */
21 int ghc_wrapper_d2lP_fcntl(int filedes, int cmd) {
22     return fcntl(filedes, cmd);
23 }
24
25 /* c_fcntl_write */
26 int ghc_wrapper_d2lD_fcntl(int filedes, int cmd, long arg) {
27     return fcntl(filedes, cmd, arg);
28 }
29
30 /* c_fcntl_lock */
31 int ghc_wrapper_d2lo_fcntl(int filedes, int cmd, struct flock* arg) {
32     return fcntl(filedes, cmd, arg);
33 }
34
35 int ghc_wrapper_d1mz_gettimeofday(struct timeval* tp, void* tzp) {
36     return gettimeofday(tp, tzp);
37 }
38
39 int ghc_wrapper_d2jE_utime(const char *path, const struct utimbuf *times) {
40     return utime(path, times);
41 }
42
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.
47      */
48     assert("DO NOT CALL THIS FUNCTION" == NULL);
49 }