/* [<][>][^][v][top][bottom][index][help] */
1 /****************************************************************************
2 * Copyright (C) 2006-2010 by Jason Ansel, Kapil Arya, and Gene Cooperman *
3 * jansel@csail.mit.edu, kapil@ccs.neu.edu, gene@ccs.neu.edu *
4 * *
5 * This file is part of the dmtcp/src module of DMTCP (DMTCP:dmtcp/src). *
6 * *
7 * DMTCP:dmtcp/src is free software: you can redistribute it and/or *
8 * modify it under the terms of the GNU Lesser General Public License as *
9 * published by the Free Software Foundation, either version 3 of the *
10 * License, or (at your option) any later version. *
11 * *
12 * DMTCP:dmtcp/src is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU Lesser General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License along with DMTCP:dmtcp/src. If not, see *
19 * <http://www.gnu.org/licenses/>. *
20 ****************************************************************************/
21
22 #pragma once
23 #ifndef FILE_WRAPPERS_H
24 #define FILE_WRAPPERS_H
25
26 #include "dmtcp.h"
27
28 #define _real_open NEXT_FNC(open)
29 #define _real_open64 NEXT_FNC(open64)
30 #define _real_fopen NEXT_FNC(fopen)
31 #define _real_fopen64 NEXT_FNC(fopen64)
32 #define _real_freopen NEXT_FNC(freopen)
33 #define _real_openat NEXT_FNC(openat)
34 #define _real_openat64 NEXT_FNC(openat64)
35 #define _real_opendir NEXT_FNC(opendir)
36 #define _real_tmpfile NEXT_FNC(tmpfile)
37 #define _real_mkstemp NEXT_FNC(mkstemp)
38 #define _real_mkostemp NEXT_FNC(mkostemp)
39 #define _real_mkstemps NEXT_FNC(mkstemps)
40 #define _real_mkostemps NEXT_FNC(mkostemps)
41 #define _real_close NEXT_FNC(close)
42 #define _real_fclose NEXT_FNC(fclose)
43 #define _real_closedir NEXT_FNC(closedir)
44 #define _real_lseek NEXT_FNC(lseek)
45 #define _real_dup NEXT_FNC(dup)
46 #define _real_dup2 NEXT_FNC(dup2)
47 #define _real_dup3 NEXT_FNC(dup3)
48 #define _real_xstat NEXT_FNC(__xstat)
49 #define _real_xstat64 NEXT_FNC(__xstat64)
50 #define _real_lxstat NEXT_FNC(__lxstat)
51 #define _real_lxstat64 NEXT_FNC(__lxstat64)
52 #define _real_readlink NEXT_FNC(readlink)
53 #define _real_exit NEXT_FNC(exit)
54 #define _real_syscall NEXT_FNC(syscall)
55 #define _real_unsetenv NEXT_FNC(unsetenv)
56 #define _real_ptsname_r NEXT_FNC(ptsname_r)
57 #define _real_ttyname_r NEXT_FNC(ttyname_r)
58 #define _real_getpt NEXT_FNC(getpt)
59 #define _real_posix_openpt NEXT_FNC(posix_openpt)
60 #define _real_openlog NEXT_FNC(openlog)
61 #define _real_closelog NEXT_FNC(closelog)
62 #define _real_mq_open NEXT_FNC(mq_open)
63 #define _real_mq_close NEXT_FNC(mq_close)
64 #define _real_mq_send NEXT_FNC(mq_send)
65 #define _real_mq_receive NEXT_FNC(mq_receive)
66 #define _real_mq_timedsend NEXT_FNC(mq_timedsend)
67 #define _real_mq_timedreceive NEXT_FNC(mq_timedreceive)
68 #define _real_mq_notify NEXT_FNC(mq_notify)
69 #define _real_fcntl NEXT_FNC(fcntl)
70
71 #define _real_system NEXT_FNC(system)
72 #define _real_mmap NEXT_FNC(mmap)
73 #define _real_munmap NEXT_FNC(munmap)
74 #define _real_access NEXT_FNC(access)
75 #define _real_access NEXT_FNC(access)
76 // NOTE: realpath is a versioned symbol, and we should be using
77 // NEXT_FNC_DEFAULT. But that interferes with libdl.so (e.g., dlopen).
78 // and other functions that use gettid() -> __tls_get_addr()
79 // for some unknown reason.
80 #define _real_realpath NEXT_FNC(realpath)
81
82 #endif // FILE_WRAPPERS_H