From 1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 3 Mar 2009 19:28:35 -0800 Subject: auto import from //depot/cupcake/@135843 --- libc/unistd/pread.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 libc/unistd/pread.c (limited to 'libc/unistd/pread.c') diff --git a/libc/unistd/pread.c b/libc/unistd/pread.c new file mode 100644 index 0000000..d2f71f7 --- /dev/null +++ b/libc/unistd/pread.c @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Google Inc. nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * +*/ +#include +#include + +extern int __pread64(int fd, void *buf, size_t nbytes, off_t lo, off_t hi); + +ssize_t pread(int fd, void *buf, size_t nbytes, off_t offset) +{ + return __pread64(fd, buf, nbytes, offset, 0); +} + -- cgit v1.1