path: root/pseudo_wrappers.c
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_wrappers.c
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_wrappers.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/pseudo_wrappers.c b/pseudo_wrappers.c
index f11f172..a594d2e 100644
--- a/pseudo_wrappers.c
+++ b/pseudo_wrappers.c
@@ -1,7 +1,7 @@
* pseudo_wrappers.c, shared code for wrapper functions
- * Copyright (c) 2008-2011 Wind River Systems, Inc.
+ * Copyright (c) 2008-2012 Wind River Systems, Inc.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License version 2.1 as
@@ -117,7 +117,7 @@ pseudo_init_one_wrapper(pseudo_function *func) {
s += strlen(s) - 2;
/* *at() don't have to exist */
if (!strcmp(s, "at")) {
- continue;
+ return;
if (e != NULL) {