git » libfiu » commit 2be43a7

preload/posix: Remove stat() and friends

author Alberto Bertogli
2012-09-04 23:30:40 UTC
committer Alberto Bertogli
2012-09-04 23:48:23 UTC
parent 8b8713b2bf6f44c88c5a2936ceceebed865ae35f

preload/posix: Remove stat() and friends

These functions were wrapped with #ifdefs in 2dafdf7, but it turns out they're
also often defined as inline functions in headers, which also prevents the
preloading from working correctly.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

preload/posix/modules/posix.io.mod +26 -26

diff --git a/preload/posix/modules/posix.io.mod b/preload/posix/modules/posix.io.mod
index 474e1fb..0f4d4a5 100644
--- a/preload/posix/modules/posix.io.mod
+++ b/preload/posix/modules/posix.io.mod
@@ -112,32 +112,32 @@ int rename(const char *oldpath, const char *newpath);
 		ENOENT ENOMEM ENOSPC ENOTDIR ENOTEMPTY EPERM EROFS EXDEV
 
 
-# NOTE: These are #ifdef'ed because stat() and friends are usually defined as
-# macros within one of the standard headers, which (besides being ugly) makes
-# overriding them this way much harder.
-
-fiu name base: posix/io/stat/
-
-v: #ifndef stat
-int stat(const char *path, struct stat *buf);
-	on error: -1
-	valid errnos: EACCES EBADF EFAULT ELOOP ENAMETOOLONG ENOENT ENOMEM \
-		ENOTDIR EOVERFLOW
-v: #endif
-
-v: #ifndef fstat
-int fstat(int fd, struct stat *buf);
-	on error: -1
-	valid errnos: EACCES EBADF EFAULT ELOOP ENAMETOOLONG ENOENT ENOMEM \
-		ENOTDIR EOVERFLOW
-v: #endif
-
-v: #ifndef lstat
-int lstat(const char *path, struct stat *buf);
-	on error: -1
-	valid errnos: EACCES EBADF EFAULT ELOOP ENAMETOOLONG ENOENT ENOMEM \
-		ENOTDIR EOVERFLOW
-v: #endif
+# NOTE: These are commented because stat() and friends are usually defined as
+# either macros or inline functions within one of the standard headers, which
+# makes overriding them this way much harder.
+#
+#fiu name base: posix/io/stat/
+#
+#v: #ifndef stat
+#int stat(const char *path, struct stat *buf);
+#	on error: -1
+#	valid errnos: EACCES EBADF EFAULT ELOOP ENAMETOOLONG ENOENT ENOMEM \
+#		ENOTDIR EOVERFLOW
+#v: #endif
+#
+#v: #ifndef fstat
+#int fstat(int fd, struct stat *buf);
+#	on error: -1
+#	valid errnos: EACCES EBADF EFAULT ELOOP ENAMETOOLONG ENOENT ENOMEM \
+#		ENOTDIR EOVERFLOW
+#v: #endif
+#
+#v: #ifndef lstat
+#int lstat(const char *path, struct stat *buf);
+#	on error: -1
+#	valid errnos: EACCES EBADF EFAULT ELOOP ENAMETOOLONG ENOENT ENOMEM \
+#		ENOTDIR EOVERFLOW
+#v: #endif
 
 
 fiu name base: posix/io/net/