diff options
author | jasone <jasone@FreeBSD.org> | 2000-01-12 09:23:48 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-01-12 09:23:48 +0000 |
commit | 75903038bc52105bc7479fe5f2b75f22f10c1c50 (patch) | |
tree | c9e28eda650bbd7eaa3eb22c8d7c75d00a96a451 /lib/libc/db/recno | |
parent | 688bb99b3f790aad607b949661d0361486bbe346 (diff) | |
download | FreeBSD-src-75903038bc52105bc7479fe5f2b75f22f10c1c50.zip FreeBSD-src-75903038bc52105bc7479fe5f2b75f22f10c1c50.tar.gz |
Add three-tier symbol naming in support of POSIX thread cancellation
points. For library functions, the pattern is __sleep() <--
_libc_sleep() <-- sleep(). The arrows represent weak aliases. For
system calls, the pattern is _read() <-- _libc_read() <-- read().
Diffstat (limited to 'lib/libc/db/recno')
-rw-r--r-- | lib/libc/db/recno/rec_close.c | 7 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_open.c | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/libc/db/recno/rec_close.c b/lib/libc/db/recno/rec_close.c index 1c124de..d1f50938 100644 --- a/lib/libc/db/recno/rec_close.c +++ b/lib/libc/db/recno/rec_close.c @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #if defined(LIBC_SCCS) && !defined(lint) @@ -84,7 +86,7 @@ __rec_close(dbp) if (fclose(t->bt_rfp)) status = RET_ERROR; } else - if (close(t->bt_rfd)) + if (_libc_close(t->bt_rfd)) status = RET_ERROR; if (__bt_close(dbp) == RET_ERROR) @@ -150,7 +152,8 @@ __rec_sync(dbp, flags) */ status = (dbp->seq)(dbp, &key, &data, R_FIRST); while (status == RET_SUCCESS) { - if (write(t->bt_rfd, data.data, data.size) != data.size) + if (_libc_write(t->bt_rfd, data.data, data.size) != + data.size) return (RET_ERROR); status = (dbp->seq)(dbp, &key, &data, R_NEXT); } diff --git a/lib/libc/db/recno/rec_open.c b/lib/libc/db/recno/rec_open.c index 8f8eff2..55da040 100644 --- a/lib/libc/db/recno/rec_open.c +++ b/lib/libc/db/recno/rec_open.c @@ -32,6 +32,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #if defined(LIBC_SCCS) && !defined(lint) @@ -66,7 +68,7 @@ __rec_open(fname, flags, mode, openinfo, dflags) int rfd, sverrno; /* Open the user's file -- if this fails, we're done. */ - if (fname != NULL && (rfd = open(fname, flags, mode)) < 0) + if (fname != NULL && (rfd = _libc_open(fname, flags, mode)) < 0) return (NULL); /* Create a btree in memory (backed by disk). */ @@ -213,7 +215,7 @@ err: sverrno = errno; if (dbp != NULL) (void)__bt_close(dbp); if (fname != NULL) - (void)close(rfd); + (void)_libc_close(rfd); errno = sverrno; return (NULL); } |