mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-14 21:47:19 +02:00
RISC OS specific changes
This commit is contained in:
parent
c530d811c6
commit
70618e5175
13 changed files with 81 additions and 156 deletions
13
util/iobuf.c
13
util/iobuf.c
|
@ -208,7 +208,20 @@ direct_open (const char *fname, const char *mode)
|
|||
else {
|
||||
oflag = O_RDONLY;
|
||||
}
|
||||
#ifndef __riscos__
|
||||
return open (fname, oflag, cflag );
|
||||
#else
|
||||
{
|
||||
struct stat buf;
|
||||
int rc = stat( fname, &buf );
|
||||
|
||||
/* Don't allow iobufs on directories */
|
||||
if( !rc && S_ISDIR(buf.st_mode) && !S_ISREG(buf.st_mode) )
|
||||
return __set_errno( EISDIR );
|
||||
else
|
||||
return open( fname, oflag, cflag );
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue