This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mudflap wrappers [patch]
Steven Bosscher wrote:
> Another oops: Where's the patch :-)
Bugger, what happened to it?
Whatever, here it comes. And fixed too.
--
Eyal Lebedinsky (eyal at eyal dot emu dot id dot au) <http://samba.org/eyal/>
--- Makefile.am Sat Apr 26 00:07:00 2003
+++ Makefile.am.new Fri Apr 25 22:13:23 2003
@@ -8,7 +8,7 @@
MAINT_CHARSET = latin1
SUBDIRS = testsuite
-AM_CFLAGS = -ansi -Wall
+AM_CFLAGS = -Wall
lib_LTLIBRARIES = libmudflap.la
include_HEADERS = mf-runtime.h
@@ -51,8 +51,59 @@
rindex-hook.lo \
mmap-hook.lo \
munmap-hook.lo \
- alloca-hook.lo
-
+ alloca-hook.lo \
+\
+ time-hook.lo \
+ ctime-hook.lo \
+ strerror-hook.lo \
+ fopen-hook.lo \
+ fclose-hook.lo \
+ fread-hook.lo \
+ fwrite-hook.lo \
+ fgetc-hook.lo \
+ fgets-hook.lo \
+ getc-hook.lo \
+ gets-hook.lo \
+ ungetc-hook.lo \
+ fputc-hook.lo \
+ fputs-hook.lo \
+ putc-hook.lo \
+ puts-hook.lo \
+ clearerr-hook.lo \
+ feof-hook.lo \
+ ferror-hook.lo \
+ fileno-hook.lo \
+ access-hook.lo \
+ remove-hook.lo \
+ fflush-hook.lo \
+ fseek-hook.lo \
+ ftell-hook.lo \
+ rewind-hook.lo \
+ fgetpos-hook.lo \
+ fsetpos-hook.lo \
+ stat-hook.lo \
+ fstat-hook.lo \
+ lstat-hook.lo \
+ mkfifo-hook.lo \
+ setvbuf-hook.lo \
+ setbuf-hook.lo \
+ opendir-hook.lo \
+ closedir-hook.lo \
+ readdir-hook.lo \
+ recv-hook.lo \
+ recvfrom-hook.lo \
+ recvmsg-hook.lo \
+ send-hook.lo \
+ sendto-hook.lo \
+ sendmsg-hook.lo \
+ setsockopt-hook.lo \
+ getsockopt-hook.lo \
+ accept-hook.lo \
+ bind-hook.lo \
+ connect-hook.lo \
+ gethostname-hook.lo \
+ sethostname-hook.lo \
+ gethostbyname-hook.lo
#.NOTPARALLEL: # Otherwise the following loop will be executed in parallel!
$(HOOKOBJS): mf-hooks.c mf-runtime.h mf-impl.h
hook=`basename $@ -hook.lo`; \
--- Makefile.in Sat Apr 26 00:07:01 2003
+++ Makefile.in.new Fri Apr 25 22:13:28 2003
@@ -92,7 +92,7 @@
MAINT_CHARSET = latin1
SUBDIRS = testsuite
-AM_CFLAGS = -ansi -Wall
+AM_CFLAGS = -Wall
lib_LTLIBRARIES = libmudflap.la
include_HEADERS = mf-runtime.h
@@ -136,7 +136,59 @@
rindex-hook.lo \
mmap-hook.lo \
munmap-hook.lo \
- alloca-hook.lo
+ alloca-hook.lo \
+\
+ time-hook.lo \
+ ctime-hook.lo \
+ strerror-hook.lo \
+ fopen-hook.lo \
+ fclose-hook.lo \
+ fread-hook.lo \
+ fwrite-hook.lo \
+ fgetc-hook.lo \
+ fgets-hook.lo \
+ getc-hook.lo \
+ gets-hook.lo \
+ ungetc-hook.lo \
+ fputc-hook.lo \
+ fputs-hook.lo \
+ putc-hook.lo \
+ puts-hook.lo \
+ clearerr-hook.lo \
+ feof-hook.lo \
+ ferror-hook.lo \
+ fileno-hook.lo \
+ access-hook.lo \
+ remove-hook.lo \
+ fflush-hook.lo \
+ fseek-hook.lo \
+ ftell-hook.lo \
+ rewind-hook.lo \
+ fgetpos-hook.lo \
+ fsetpos-hook.lo \
+ stat-hook.lo \
+ fstat-hook.lo \
+ lstat-hook.lo \
+ mkfifo-hook.lo \
+ setvbuf-hook.lo \
+ setbuf-hook.lo \
+ opendir-hook.lo \
+ closedir-hook.lo \
+ readdir-hook.lo \
+ recv-hook.lo \
+ recvfrom-hook.lo \
+ recvmsg-hook.lo \
+ send-hook.lo \
+ sendto-hook.lo \
+ sendmsg-hook.lo \
+ setsockopt-hook.lo \
+ getsockopt-hook.lo \
+ accept-hook.lo \
+ bind-hook.lo \
+ connect-hook.lo \
+ gethostname-hook.lo \
+ sethostname-hook.lo \
+ gethostbyname-hook.lo
libmudflap_la_LDFLAGS =
--- mf-hooks.c Sat Apr 26 00:07:01 2003
+++ mf-hooks.c.new Fri Apr 25 22:34:39 2003
@@ -7,6 +7,7 @@
XXX: libgcc license?
*/
+#define _GNU_SOURCE
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@@ -810,6 +811,546 @@
}
#endif
+/* mf-hooks.c.el start */
+
+#define MF_VALIDATE_FP(stream, title) \
+do { \
+ FILE *p = (stream); \
+ if (stdin != p && stdout != p && stderr != p) { \
+ MF_VALIDATE_EXTENT(p, sizeof (*p), __MF_CHECK_WRITE, title); \
+ } \
+} while (0)
+
+#ifdef WRAP_time
+#include <time.h>
+WRAPPER2(time_t, time, time_t *timep)
+{
+ if (NULL != timep)
+ MF_VALIDATE_EXTENT(timep, sizeof (*timep), __MF_CHECK_WRITE, "time timep");
+ return time (timep);
+}
+#endif
+
+#ifdef WRAP_ctime
+#include <time.h>
+WRAPPER2(char *, ctime, time_t *timep)
+{
+ char *p;
+ int n;
+ MF_VALIDATE_EXTENT(timep, sizeof (*timep), __MF_CHECK_READ, "ctime timep");
+ p = ctime (timep);
+ if (NULL != p) {
+ n = strlen (p);
+ __mf_register (p, CLAMPADD(n, 1), __MF_TYPE_STATIC, "ctime area");
+ }
+ return p;
+}
+#endif
+
+#ifdef WRAP_strerror
+WRAPPER2(char *, strerror, int errnum)
+{
+ char *p;
+ int n;
+ p = strerror (errnum);
+ if (NULL != p) {
+ n = strlen (p);
+ __mf_register (p, CLAMPADD(n, 1), __MF_TYPE_STATIC, "strerror area");
+ }
+ return p;
+}
+#endif
+
+#undef MF_REGISTER_FOPEN
+
+#ifdef WRAP_fopen
+WRAPPER2(FILE *, fopen, const char *path, const char *mode)
+{
+ size_t n;
+ FILE *p;
+
+ n = strlen (path);
+ MF_VALIDATE_EXTENT(path, CLAMPADD(n, 1), __MF_CHECK_READ, "fopen path");
+
+ n = strlen (mode);
+ MF_VALIDATE_EXTENT(mode, CLAMPADD(n, 1), __MF_CHECK_READ, "fopen mode");
+
+ p = fopen (path, mode);
+#ifdef MF_REGISTER_FOPEN
+ if (NULL != p)
+ __mf_register (p, sizeof (*p), __MF_TYPE_STATIC, "fopen result");
+#endif
+
+ return p;
+}
+#endif
+
+#ifdef WRAP_fclose
+WRAPPER2(int, fclose, FILE *stream)
+{
+ int resp;
+ MF_VALIDATE_FP (stream, "fclose stream");
+ resp = fclose (stream);
+#ifdef MF_REGISTER_FOPEN
+ __mf_unregister (stream, sizeof (*stream));
+#endif
+
+ return resp;
+}
+#endif
+
+#ifdef WRAP_fread
+WRAPPER2(size_t, fread, void *ptr, size_t size, size_t nmemb, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "fread stream");
+ MF_VALIDATE_EXTENT(ptr, size * nmemb, __MF_CHECK_WRITE, "fread buffer");
+ return fread (ptr, size, nmemb, stream);
+}
+#endif
+
+#ifdef WRAP_fwrite
+WRAPPER2(size_t, fwrite, const void *ptr, size_t size, size_t nmemb, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "fwrite stream");
+ MF_VALIDATE_EXTENT(ptr, size * nmemb, __MF_CHECK_READ, "fwrite buffer");
+ return fwrite (ptr, size, nmemb, stream);
+}
+#endif
+
+#ifdef WRAP_fgetc
+WRAPPER2(int, fgetc, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "fgetc stream");
+ return fgetc (stream);
+}
+#endif
+
+#ifdef WRAP_fgets
+WRAPPER2(char *, fgets, char *s, int size, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "fgets stream");
+ MF_VALIDATE_EXTENT(s, size, __MF_CHECK_WRITE, "fgets buffer");
+ return fgets (s, size, stream);
+}
+#endif
+
+#ifdef WRAP_getc
+WRAPPER2(int, getc, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "getc stream");
+ return getc (stream);
+}
+#endif
+
+#ifdef WRAP_gets
+WRAPPER2(char *, gets, char *s)
+{
+ MF_VALIDATE_EXTENT(s, 1, __MF_CHECK_WRITE, "gets buffer");
+ s = gets (s);
+ if (NULL != s) { /* better late than never */
+ int n = strlen (s);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_WRITE, "gets buffer");
+ }
+ return s;
+}
+#endif
+
+#ifdef WRAP_ungetc
+WRAPPER2(int, ungetc, int c, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "ungetc stream");
+ return ungetc (c, stream);
+}
+#endif
+
+#ifdef WRAP_fputc
+WRAPPER2(int, fputc, int c, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "fputc stream");
+ return fputc (c, stream);
+}
+#endif
+
+#ifdef WRAP_fputs
+WRAPPER2(int, fputs, const char *s, FILE *stream)
+{
+ int n = strlen (s);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "fputs buffer");
+ MF_VALIDATE_FP (stream, "fputs stream");
+ return fputs (s, stream);
+}
+#endif
+
+#ifdef WRAP_putc
+WRAPPER2(int, putc, int c, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "putc stream");
+ return putc (c, stream);
+}
+#endif
+
+#ifdef WRAP_puts
+WRAPPER2(int, puts, const char *s)
+{
+ int n = strlen (s);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "puts buffer");
+ return puts (s);
+}
+#endif
+
+#ifdef WRAP_clearerr
+WRAPPER2(void, clearerr, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "clearerr stream");
+ clearerr (stream);
+}
+#endif
+
+#ifdef WRAP_feof
+WRAPPER2(int, feof, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "feof stream");
+ return feof (stream);
+}
+#endif
+
+#ifdef WRAP_ferror
+WRAPPER2(int, ferror, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "ferror stream");
+ return ferror (stream);
+}
+#endif
+
+#ifdef WRAP_fileno
+#include <stdio.h>
+WRAPPER2(int, fileno, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "fileno stream");
+ return fileno (stream);
+}
+#endif
+
+#ifdef WRAP_access
+WRAPPER2(int , access, const char *path, int mode)
+{
+ size_t n = strlen (path);
+ MF_VALIDATE_EXTENT(path, CLAMPADD(n, 1), __MF_CHECK_READ, "access path");
+
+ return access (path, mode);
+}
+#endif
+
+#ifdef WRAP_remove
+WRAPPER2(int , remove, const char *path)
+{
+ size_t n = strlen (path);
+ MF_VALIDATE_EXTENT(path, CLAMPADD(n, 1), __MF_CHECK_READ, "remove path");
+
+ return remove (path);
+}
+#endif
+
+#ifdef WRAP_fflush
+WRAPPER2(int, fflush, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "fflush stream");
+ return fflush (stream);
+}
+#endif
+
+#ifdef WRAP_fseek
+WRAPPER2(int, fseek, FILE *stream, long offset, int whence)
+{
+ MF_VALIDATE_FP (stream, "fseek stream");
+ return fseek (stream, offset, whence);
+}
+#endif
+
+#ifdef WRAP_ftell
+WRAPPER2(long, ftell, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "ftell stream");
+ return ftell (stream);
+}
+#endif
+
+#ifdef WRAP_rewind
+WRAPPER2(void, rewind, FILE *stream)
+{
+ MF_VALIDATE_FP (stream, "rewind stream");
+ rewind (stream);
+}
+#endif
+
+#ifdef WRAP_fgetpos
+WRAPPER2(int, fgetpos, FILE *stream, fpos_t *pos)
+{
+ MF_VALIDATE_FP (stream, "fgetpos stream");
+ MF_VALIDATE_EXTENT(pos, sizeof (*pos), __MF_CHECK_WRITE, "fgetpos pos");
+ return fgetpos (stream, pos);
+}
+#endif
+
+#ifdef WRAP_fsetpos
+WRAPPER2(int, fsetpos, FILE *stream, fpos_t *pos)
+{
+ MF_VALIDATE_FP (stream, "fsetpos stream");
+ MF_VALIDATE_EXTENT(pos, sizeof (*pos), __MF_CHECK_READ, "fsetpos pos");
+ return fsetpos (stream, pos);
+}
+#endif
+
+#ifdef WRAP_stat
+#include <sys/stat.h>
+WRAPPER2(int , stat, const char *path, struct stat *buf)
+{
+ size_t n = strlen (path);
+ MF_VALIDATE_EXTENT(path, CLAMPADD(n, 1), __MF_CHECK_READ, "stat path");
+ MF_VALIDATE_EXTENT(buf, sizeof (*buf), __MF_CHECK_READ, "stat buf");
+
+ return stat (path, buf);
+}
+#endif
+
+#ifdef WRAP_fstat
+#include <sys/stat.h>
+WRAPPER2(int , fstat, int filedes, struct stat *buf)
+{
+ MF_VALIDATE_EXTENT(buf, sizeof (*buf), __MF_CHECK_READ, "fstat buf");
+
+ return fstat (filedes, buf);
+}
+#endif
+
+#ifdef WRAP_lstat
+#include <sys/stat.h>
+WRAPPER2(int , lstat, const char *path, struct stat *buf)
+{
+ size_t n = strlen (path);
+ MF_VALIDATE_EXTENT(path, CLAMPADD(n, 1), __MF_CHECK_READ, "lstat path");
+ MF_VALIDATE_EXTENT(buf, sizeof (*buf), __MF_CHECK_READ, "lstat buf");
+
+ return lstat (path, buf);
+}
+#endif
+
+#ifdef WRAP_mkfifo
+#include <sys/stat.h>
+WRAPPER2(int , mkfifo, const char *path, mode_t mode)
+{
+ size_t n = strlen (path);
+ MF_VALIDATE_EXTENT(path, CLAMPADD(n, 1), __MF_CHECK_READ, "mkfifo path");
+
+ return mkfifo (path, mode);
+}
+#endif
+
+#ifdef WRAP_setvbuf
+WRAPPER2(int, setvbuf, FILE *stream, char *buf, int mode , size_t size)
+{
+ MF_VALIDATE_FP (stream, "setvbuf stream");
+ if (NULL != buf)
+ MF_VALIDATE_EXTENT(buf, size, __MF_CHECK_READ, "setvbuf buf");
+ return setvbuf (stream, buf, mode, size);
+}
+#endif
+
+#ifdef WRAP_setbuf
+WRAPPER2(void, setbuf, FILE *stream, char *buf)
+{
+ MF_VALIDATE_FP (stream, "setbuf stream");
+ if (NULL != buf)
+ MF_VALIDATE_EXTENT(buf, BUFSIZ, __MF_CHECK_READ, "setbuf buf");
+ setbuf (stream, buf);
+}
+#endif
+
+#undef MF_REGISTER_OPENDIR
+
+#ifdef WRAP_opendir
+#include <dirent.h>
+WRAPPER2(DIR *, opendir, const char *path)
+{
+ DIR *p;
+ size_t n = strlen (path);
+ MF_VALIDATE_EXTENT(path, CLAMPADD(n, 1), __MF_CHECK_READ, "opendir path");
+
+ p = opendir (path);
+#ifdef MF_REGISTER_OPENDIR
+ if (NULL != p)
+ __mf_register (p, 4 /*sizeof (*p)*/, __MF_TYPE_STATIC, "opendir result");
+#endif
+ return p;
+}
+#endif
+
+#ifdef WRAP_closedir
+#include <dirent.h>
+WRAPPER2(int, closedir, DIR *dir)
+{
+#ifdef MF_REGISTER_OPENDIR
+ if (NULL != dir)
+ __mf_unregister (dir, 4 /*sizeof (*dir)*/);
+#endif
+ return closedir (dir);
+}
+#endif
+
+#undef MF_REGISTER_READDIR
+
+#ifdef WRAP_readdir
+#include <dirent.h>
+WRAPPER2(struct dirent *, readdir, DIR *dir)
+{
+ struct dirent *p;
+ MF_VALIDATE_EXTENT(dir, 4 /*sizeof (*dir)*/, __MF_CHECK_READ, "readdir dir");
+ p = readdir (dir);
+#ifdef MF_REGISTER_READDIR
+ if (NULL != p)
+ __mf_register (p, sizeof (*p), __MF_TYPE_STATIC, "readdir result");
+#endif
+ return p;
+}
+#endif
+
+#ifdef WRAP_recv
+#include <sys/socket.h>
+WRAPPER2(int, recv, int s, void *buf, size_t len, int flags)
+{
+ MF_VALIDATE_EXTENT(buf, len, __MF_CHECK_WRITE, "recv buf");
+ return recv (s, buf, len, flags);
+}
+#endif
+
+#ifdef WRAP_recvfrom
+#include <sys/socket.h>
+WRAPPER2(int, recvfrom, int s, void *buf, size_t len, int flags,
+ struct sockaddr *from, socklen_t *fromlen)
+{
+ MF_VALIDATE_EXTENT(buf, len, __MF_CHECK_WRITE, "recvfrom buf");
+ MF_VALIDATE_EXTENT(from, (size_t)*fromlen, __MF_CHECK_WRITE, "recvfrom from");
+ return recvfrom (s, buf, len, flags, from, fromlen);
+}
+#endif
+
+#ifdef WRAP_recvmsg
+#include <sys/socket.h>
+WRAPPER2(int, recvmsg, int s, struct msghdr *msg, int flags)
+{
+ MF_VALIDATE_EXTENT(msg, sizeof (*msg), __MF_CHECK_WRITE, "recvmsg msg");
+ return recvmsg (s, msg, flags);
+}
+#endif
+
+#ifdef WRAP_send
+#include <sys/socket.h>
+WRAPPER2(int, send, int s, const void *msg, size_t len, int flags)
+{
+ MF_VALIDATE_EXTENT(msg, len, __MF_CHECK_READ, "send msg");
+ return send (s, msg, len, flags);
+}
+#endif
+
+#ifdef WRAP_sendto
+#include <sys/socket.h>
+WRAPPER2(int, sendto, int s, const void *msg, size_t len, int flags,
+ const struct sockaddr *to, socklen_t tolen)
+{
+ MF_VALIDATE_EXTENT(msg, len, __MF_CHECK_READ, "sendto msg");
+ MF_VALIDATE_EXTENT(to, (size_t)tolen, __MF_CHECK_WRITE, "sendto to");
+ return sendto (s, msg, len, flags, to, tolen);
+}
+#endif
+
+#ifdef WRAP_sendmsg
+#include <sys/socket.h>
+WRAPPER2(int, sendmsg, int s, const void *msg, int flags)
+{
+ MF_VALIDATE_EXTENT(msg, sizeof (*msg), __MF_CHECK_READ, "sendmsg msg");
+ return sendmsg (s, msg, flags);
+}
+#endif
+
+#ifdef WRAP_setsockopt
+#include <sys/socket.h>
+WRAPPER2(int, setsockopt, int s, int level, int optname, const void *optval,
+ socklen_t optlen)
+{
+ MF_VALIDATE_EXTENT(optval, (size_t)optlen, __MF_CHECK_READ,
+ "setsockopt optval");
+ return setsockopt (s, level, optname, optval, optlen);
+}
+#endif
+
+#ifdef WRAP_getsockopt
+#include <sys/socket.h>
+WRAPPER2(int, getsockopt, int s, int level, int optname, void *optval,
+ socklen_t *optlen)
+{
+ MF_VALIDATE_EXTENT(optval, (size_t)*optlen, __MF_CHECK_WRITE,
+ "getsockopt optval");
+ return getsockopt (s, level, optname, optval, optlen);
+}
+#endif
+
+#ifdef WRAP_accept
+#include <sys/socket.h>
+WRAPPER2(int, accept, int s, struct sockaddr *addr, socklen_t *addrlen)
+{
+ MF_VALIDATE_EXTENT(addr, (size_t)*addrlen, __MF_CHECK_WRITE, "accept addr");
+ return accept (s, addr, addrlen);
+}
+#endif
+
+#ifdef WRAP_bind
+#include <sys/socket.h>
+WRAPPER2(int, bind, int sockfd, struct sockaddr *addr, socklen_t addrlen)
+{
+ MF_VALIDATE_EXTENT(addr, (size_t)addrlen, __MF_CHECK_WRITE, "bind addr");
+ return bind (sockfd, addr, addrlen);
+}
+#endif
+
+#ifdef WRAP_connect
+#include <sys/socket.h>
+WRAPPER2(int, connect, int sockfd, const struct sockaddr *addr,
+ socklen_t addrlen)
+{
+ MF_VALIDATE_EXTENT(addr, (size_t)addrlen, __MF_CHECK_READ,
+ "connect addr");
+ return connect (sockfd, addr, addrlen);
+}
+#endif
+
+#ifdef WRAP_gethostname
+WRAPPER2(int, gethostname, char *name, size_t len)
+{
+ MF_VALIDATE_EXTENT(name, len, __MF_CHECK_WRITE, "gethostname name");
+ return gethostname (name, len);
+}
+#endif
+
+#ifdef WRAP_sethostname
+WRAPPER2(int, sethostname, const char *name, size_t len)
+{
+ MF_VALIDATE_EXTENT(name, len, __MF_CHECK_READ, "sethostname name");
+ return sethostname (name, len);
+}
+#endif
+
+#ifdef WRAP_gethostbyname
+#include <netdb.h>
+WRAPPER2(struct hostent *, gethostbyname, const char *name)
+{
+ size_t n = strlen (name);
+ MF_VALIDATE_EXTENT(name, CLAMPADD(n, 1), __MF_CHECK_READ,
+ "gethostbyname name");
+ return gethostbyname (name);
+}
+#endif
+
+/* mf-hooks.c.el end */
/* XXX: stpcpy, memccpy */
--- mf-runtime.h.in Sat Apr 26 00:07:01 2003
+++ mf-runtime.h.in.new Fri Apr 25 21:12:44 2003
@@ -88,6 +88,59 @@
#define index __mfwrap_index
#define rindex __mfwrap_rindex
+/* mf-runtime.h.in.el start */
+#define time __mfwrap_time
+#define ctime __mfwrap_ctime
+#define strerror __mfwrap_strerror
+#define fopen __mfwrap_fopen
+#define fclose __mfwrap_fclose
+#define fread __mfwrap_fread
+#define fwrite __mfwrap_fwrite
+#define fgetc __mfwrap_fgetc
+#define fgets __mfwrap_fgets
+#define getc __mfwrap_getc
+#define gets __mfwrap_gets
+#define ungetc __mfwrap_ungetc
+#define fputc __mfwrap_fputc
+#define fputs __mfwrap_fputs
+#define putc __mfwrap_putc
+#define puts __mfwrap_puts
+#define clearerr __mfwrap_clearerr
+#define feof __mfwrap_feof
+#define ferror __mfwrap_ferror
+#define fileno __mfwrap_fileno
+#define access __mfwrap_access
+#define remove __mfwrap_remove
+#define fflush __mfwrap_fflush
+#define fseek __mfwrap_fseek
+#define ftell __mfwrap_ftell
+#define rewind __mfwrap_rewind
+#define fgetpos __mfwrap_fgetpos
+#define fsetpos __mfwrap_fsetpos
+#define stat __mfwrap_stat
+#define fstat __mfwrap_fstat
+#define lstat __mfwrap_lstat
+#define mkfifo __mfwrap_mkfifo
+#define setvbuf __mfwrap_setvbuf
+#define setbuf __mfwrap_setbuf
+#define opendir __mfwrap_opendir
+#define closedir __mfwrap_closedir
+#define readdir __mfwrap_readdir
+#define recv __mfwrap_recv
+#define recvfrom __mfwrap_recvfrom
+#define recvmsg __mfwrap_recvmsg
+#define send __mfwrap_send
+#define sendto __mfwrap_sendto
+#define sendmsg __mfwrap_sendmsg
+#define setsockopt __mfwrap_setsockopt
+#define getsockopt __mfwrap_getsockopt
+#define accept __mfwrap_accept
+#define bind __mfwrap_bind
+#define connect __mfwrap_connect
+#define gethostname __mfwrap_gethostname
+#define sethostname __mfwrap_sethostname
+#define gethostbyname __mfwrap_gethostbyname
+/* mf-runtime.h.in.el end */
/* Disable glibc macros. */
#define __NO_STRING_INLINES