1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-06-21 03:42:35 +03:00
Files
aout
argp
assert
bare
bits
catgets
conf
csu
ctype
db
db2
debug
dirent
elf
gmon
gnulib
grp
hesiod
hurd
iconv
iconvdata
include
inet
intl
io
libio
linuxthreads
locale
localedata
login
mach
malloc
manual
math
md5-crypt
misc
nis
nscd
nss
po
posix
pwd
resolv
resource
rpm
rt
scripts
setjmp
shadow
signal
socket
stdio
stdio-common
stdlib
streams
string
sunrpc
sysdeps
alpha
am29k
arm
generic
gnu
hppa
i370
i386
i860
i960
ieee754
libm-i387
libm-ieee754
m68k
m88k
mach
mips
mvs
posix
powerpc
rs6000
sparc
standalone
tahoe
unix
alpha
arm
bsd
common
i386
inet
mips
mman
sparc
sysv
bits
i386
irix4
isc2.2
linux
alpha
arm
bits
i386
m68k
mips
net
netash
netatalk
netax25
netinet
netipx
netpacket
netrom
netrose
nfs
powerpc
scsi
sparc
sys
Dist
Implies
Makefile
Versions
_G_config.h
a.out.h
accept.S
adjtime.c
aio_sigqueue.c
bind.S
clock.c
cmsg_nxthdr.c
configure
configure.in
connect.S
dl-origin.h
dl-sysdep.c
errlist.c
errlist.h
fstatvfs.c
ftime.c
fxstat.c
fxstat64.c
getcwd.c
getdents.c
getdents64.c
gethostid.c
gethostname.c
getpeername.S
getpriority.c
getpt.c
getresgid.c
getresuid.c
getsockname.S
getsockopt.S
getsysstats.c
glob64.c
grantpt.c
if_index.c
init-first.c
init-first.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
ldd-rewrite.sed
lddlibc4.c
listen.S
llseek.c
lseek64.c
lxstat.c
lxstat64.c
madvise.c
msgctl.c
msgget.c
msgrcv.c
msgsnd.c
paths.h
poll.c
pread.c
pread64.c
profil.c
ptrace.c
ptsname.c
pwrite.c
pwrite64.c
readdir64.c
readdir64_r.c
readv.c
reboot.c
recv.S
recvfrom.S
recvmsg.S
rt_sigaction.c
rt_sigpending.c
rt_sigprocmask.c
rt_sigqueueinfo.c
rt_sigreturn.c
rt_sigsuspend.c
rt_sigtimedwait.c
s_pread64.c
s_pwrite64.c
sa_len.c
semctl.c
semget.c
semop.c
send.S
sendmsg.S
sendto.S
setegid.c
seteuid.c
sethostid.c
setsockopt.S
shmat.c
shmctl.c
shmdt.c
shmget.c
shutdown.S
sigaction.c
siglist.c
siglist.h
signal.c
sigpending.c
sigprocmask.c
sigqueue.c
sigreturn.c
sigset-cvt-mask.h
sigstack.c
sigsuspend.c
sigtimedwait.c
sigwaitinfo.c
sizes.h
sleep.c
socketcall.h
socketpair.S
speed.c
statvfs.c
syscalls.list
sysctl.c
system.c
tcdrain.c
tcflow.c
tcflush.c
tcgetattr.c
tcgetpgrp.c
tcsetattr.c
tcsetpgrp.c
termio.h
testrtsig.h
ttyname.c
ttyname_r.c
ualarm.c
ulimit.c
umount.S
umount2.S
unlockpt.c
updwtmp.c
usleep.c
ustat.c
utmp_file.c
vfork.c
wait.c
wait3.c
waitpid.c
writev.c
xmknod.c
xstat.c
xstat64.c
xstatconv.c
minix
sco3.2
sco3.2.4
sysv4
Dist
Makefile
Versions
direct.h
getdents.c
gethostname.c
setrlimit.c
settimeofday.c
sigaction.c
syscalls.list
sysd-stdio.c
sysv_termio.h
tcdrain.c
tcflow.c
tcflush.c
tcgetattr.c
tcgetpgrp.c
tcsendbrk.c
tcsetattr.c
tcsetpgrp.c
Dist
Implies
Makefile
Subdirs
_exit.S
alarm.c
closedir.c
configure
configure.in
confstr.h
dirfd.c
dirstream.h
errnos-tmpl.c
errnos.awk
execve.S
fork.S
fxstat.c
getdents.c
getegid.S
geteuid.S
getlogin.c
getlogin_r.c
getpagesize.c
getppid.S
grantpt.c
ioctls-tmpl.c
ioctls.awk
make-syscalls.sh
make_errlist.c
mk-local_lim.c
mkdir.c
mkfifo.c
nice.c
nlist.c
opendir.c
pipestream.c
readdir.c
readdir_r.c
rewinddir.c
rmdir.c
s-proto.S
seekdir.c
siglist.c
snarf-ioctls
start.c
stime.c
syscall.S
syscalls.list
sysdep.h
system.c
telldir.c
time.c
utime.c
xmknod.c
xstat.c
vax
wordsize-32
wordsize-64
z8000
sysvipc
termios
time
timezone
wcsmbs
wctype
.cvsignore
BUGS
CONFORMANCE
ChangeLog
ChangeLog.1
ChangeLog.2
ChangeLog.3
ChangeLog.4
ChangeLog.5
ChangeLog.6
ChangeLog.7
ChangeLog.8
FAQ
FAQ.in
INSTALL
Make-dist
MakeTAGS
Makeconfig
Makefile
Makefile.in
Makerules
NEWS
NOTES
PROJECTS
README
README-alpha
README.libm
README.template
Rules
Versions.def
abi-tags
aclocal.m4
config-name.in
config.h.in
config.make.in
configure
configure.in
extra-lib.mk
glibcbug.in
o-iterator.mk
shlib-versions
test-skeleton.c
version.h
glibc/sysdeps/unix/sysv/linux/pwrite.c
Ulrich Drepper 36ecfe5690 Update.
1998-06-03 03:09  Geoff Keating  <geoffk@ozemail.com.au>

	* sysdeps/unix/sysv/linux/pread.c: Detect missing syscall, like poll().
	* sysdeps/unix/sysv/linux/pread64.c: Likewise.
	* sysdeps/unix/sysv/linux/pwrite.c: Likewise.
	* sysdeps/unix/sysv/linux/pwrite64.c: Likewise.

1998-06-03 03:09  Geoff Keating  <geoffk@ozemail.com.au>

	* sysdeps/powerpc/Makefile: Use -G0 on the startup file; this
	makes it easier to undump emacs.
	* sysdeps/powerpc/bits/endian.h: Use more informative error message
	for when the endianness can't be determined.

1998-06-04 13:19  Geoff Keating  <geoffk@ozemail.com.au>

	* nss/Makefile: Add files publickey database support.
	* nss/libnss_files.map: Export the required functions.
	* nss/nss_files/files-key.c: Implement it.
	* sunrpc/rpc/auth_des.h: Correct typos in comments.
1998-06-11 11:32:21 +00:00

57 lines
1.8 KiB
C

/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
#ifdef __NR_pwrite
extern ssize_t __syscall_pwrite64 (int fd, const void *buf, size_t count,
off_t offset_hi, off_t offset_lo);
static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
off_t offset) internal_function;
ssize_t
__pwrite (fd, buf, count, offset)
int fd;
const void *buf;
size_t count;
off_t offset;
{
ssize_t result;
/* First try the syscall. */
result = __syscall_pwrite64 (fd, buf, count, 0, offset);
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite (fd, buf, count, offset);
return result;
}
weak_alias (__pwrite, pwrite)
#define __pwrite(fd, buf, count, offset) \
static internal_function __emulate_pwrite (fd, buf, count, offset)
#endif
#include <sysdeps/posix/pwrite.c>