path: root/pseudo_ipc.h
diff options
authorPeter Seebach <peter.seebach@windriver.com>2012-08-02 18:09:17 -0500
committerPeter Seebach <peter.seebach@windriver.com>2012-08-02 18:33:53 -0500
commit400e1a09e98cc11e18e418ece0a78acfd226b381 (patch)
tree07d7a682d3dbf89033b1069c3e0316d29b398aa5 /pseudo_ipc.h
parent9b792e4cb91bc22374f47d0b0902dbc4ecd7d6dd (diff)
Remove the _plain thing, use PSEUDO_STATBUF everywhere.
The _plain thing was added because of clashes between Linux ("struct stat64 for 64-bit file sizes") and Darwin ("struct stat is already 64 bits"). But it turns out not to be enough, because stat will *fail* if it cannot represent a file size, so when something like unlinkat() calls a non-64-bit stat in order to determine whether a file exists, it gets the wrong answer if the file is over 2GB in size. Solution: Continue using PSEUDO_STATBUF, and also provide defines for base_stat() which can be either real_stat() or real_stat64(), etcetera. This eliminates any reason to need the _plain functions. It also suggests that the other real___fxstatat() calls should someday go away because that is an ugly, ugly, implementation detail. As part of testing this, fix up some bitrot which affected Darwin (such as the continue outside of a loop, but inside an #ifdef; that was left over from the conversion of init_one_wrapper to a separate function).
Diffstat (limited to 'pseudo_ipc.h')
1 files changed, 0 insertions, 7 deletions
diff --git a/pseudo_ipc.h b/pseudo_ipc.h
index 48aaa38..46277bc 100644
--- a/pseudo_ipc.h
+++ b/pseudo_ipc.h
@@ -66,10 +66,3 @@ extern int pseudo_msg_send(int fd, pseudo_msg_t *, size_t, const char *);
void pseudo_msg_stat(pseudo_msg_t *msg, const PSEUDO_STATBUF *buf);
void pseudo_stat_msg(PSEUDO_STATBUF *buf, const pseudo_msg_t *msg);
-void pseudo_stat_msg_plain(struct stat *buf, const pseudo_msg_t *msg);
-void pseudo_msg_stat_plain(pseudo_msg_t *msg, const struct stat *buf);
-#define pseudo_stat_msg_plain pseudo_stat_msg
-#define pseudo_msg_stat_plain pseudo_msg_stat