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/btree | |
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/btree')
-rw-r--r-- | lib/libc/db/btree/bt_close.c | 4 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_open.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/libc/db/btree/bt_close.c b/lib/libc/db/btree/bt_close.c index 27f9ab6..fbe6a21 100644 --- a/lib/libc/db/btree/bt_close.c +++ b/lib/libc/db/btree/bt_close.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) @@ -103,7 +105,7 @@ __bt_close(dbp) fd = t->bt_fd; free(t); free(dbp); - return (close(fd) ? RET_ERROR : RET_SUCCESS); + return (_libc_close(fd) ? RET_ERROR : RET_SUCCESS); } /* diff --git a/lib/libc/db/btree/bt_open.c b/lib/libc/db/btree/bt_open.c index 1b034ce..d306993 100644 --- a/lib/libc/db/btree/bt_open.c +++ b/lib/libc/db/btree/bt_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) @@ -201,7 +203,7 @@ __bt_open(fname, flags, mode, openinfo, dflags) goto einval; } - if ((t->bt_fd = open(fname, flags, mode)) < 0) + if ((t->bt_fd = _libc_open(fname, flags, mode)) < 0) goto err; } else { @@ -212,13 +214,13 @@ __bt_open(fname, flags, mode, openinfo, dflags) F_SET(t, B_INMEM); } - if (fcntl(t->bt_fd, F_SETFD, 1) == -1) + if (_libc_fcntl(t->bt_fd, F_SETFD, 1) == -1) goto err; if (fstat(t->bt_fd, &sb)) goto err; if (sb.st_size) { - if ((nr = read(t->bt_fd, &m, sizeof(BTMETA))) < 0) + if ((nr = _libc_read(t->bt_fd, &m, sizeof(BTMETA))) < 0) goto err; if (nr != sizeof(BTMETA)) goto eftype; @@ -334,7 +336,7 @@ err: if (t) { if (t->bt_dbp) free(t->bt_dbp); if (t->bt_fd != -1) - (void)close(t->bt_fd); + (void)_libc_close(t->bt_fd); free(t); } return (NULL); |