diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-11-29 19:09:16 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-11-29 19:09:16 +0000 |
commit | 86fe737e5c77e063b373d5d01c693c1fd1062a27 (patch) | |
tree | c35eb41b3e4cf8ad39724e2185d22daa224186f2 /lib | |
parent | 0e6f42e86bc904058928ea4bab27b17e25198a13 (diff) | |
download | paxutils-86fe737e5c77e063b373d5d01c693c1fd1062a27.tar.gz |
* lib/rtapelib.c (encode_oflag): Simplify code, since O_NONBLOCK
is always defined now.
* paxlib/rtape.c (encode_oflag): Likewise.
* lib/system.h (O_DIRCTORY, O_NOATIME, O_NONBLOCK): Define to 0
if not already defined.
* paxlib/error.c (rmdir_error): New function.
* paxlib/error.h (rmdir_error): New decl.
* rmt/rmt.c (decode_oflag): Use '#if O_NONBLOCK", not ifdef.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rtapelib.c | 8 | ||||
-rw-r--r-- | lib/system.h | 13 |
2 files changed, 14 insertions, 7 deletions
diff --git a/lib/rtapelib.c b/lib/rtapelib.c index d75b267..b352762 100644 --- a/lib/rtapelib.c +++ b/lib/rtapelib.c @@ -1,7 +1,7 @@ /* Functions for communicating with a remote tape drive. - Copyright 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2001, 2004 Free - Software Foundation, Inc. + Copyright 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2001, 2004, + 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -340,9 +340,7 @@ encode_oflag (char *buf, int oflag) #ifdef O_NOCTTY if (oflag & O_NOCTTY) strcat (buf, "|O_NOCTTY"); #endif -#ifdef O_NONBLOCK if (oflag & O_NONBLOCK) strcat (buf, "|O_NONBLOCK"); -#endif #ifdef O_RSYNC if (oflag & O_RSYNC) strcat (buf, "|O_RSYNC"); #endif @@ -358,7 +356,7 @@ encode_oflag (char *buf, int oflag) remote pipe number plus BIAS. REMOTE_SHELL may be overridden. On error, return -1. */ int -rmt_open__ (const char *file_name, int open_mode, int bias, +rmt_open__ (const char *file_name, int open_mode, int bias, const char *remote_shell) { int remote_pipe_number; /* pseudo, biased file descriptor */ diff --git a/lib/system.h b/lib/system.h index be2c2eb..a36e061 100644 --- a/lib/system.h +++ b/lib/system.h @@ -109,10 +109,19 @@ extern int errno; #ifndef O_TRUNC # define O_TRUNC 32 /* truncate file on open */ #endif - /* MS-DOG forever, with my love! */ -#ifndef O_BINARY + +#ifndef O_BINARY # define O_BINARY 0 #endif +#ifndef O_DIRECTORY +# define O_DIRECTORY 0 +#endif +#ifndef O_NOATIME +# define O_NOATIME 0 +#endif +#ifndef O_NONBLOCK +# define O_NONBLOCK 0 +#endif /* Declare file status routines and bits. */ |