-/* Copyright (C) 1991-2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2000, 2003-2005, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
# define dirfd(dirp) _DIR_dirfd (dirp)
# endif
-# ifndef MAXNAMLEN
+# if defined __USE_BSD || defined __USE_MISC
+# ifndef MAXNAMLEN
/* Get the definitions of the POSIX.1 limits. */
# include <bits/posix1_lim.h>
/* `MAXNAMLEN' is the BSD name for what POSIX calls `NAME_MAX'. */
-# ifdef NAME_MAX
-# define MAXNAMLEN NAME_MAX
-# else
-# define MAXNAMLEN 255
+# ifdef NAME_MAX
+# define MAXNAMLEN NAME_MAX
+# else
+# define MAXNAMLEN 255
+# endif
# endif
# endif
-/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005
- Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006,2007, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
extern int lockf (int __fd, int __cmd, __off_t __len);
libc_hidden_proto(lockf)
# else
-# ifdef __REDIRECT
+# ifdef __REDIRECT
extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64);
-# else
-# define lockf lockf64
-# endif
+# else
+# define lockf lockf64
+# endif
# endif
# ifdef __USE_LARGEFILE64
extern int lockf64 (int __fd, int __cmd, __off64_t __len);
extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
int __advise) __THROW;
# else
-# ifdef __REDIRECT_NTH
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (posix_fadvise, (int __fd, __off64_t __offset,
- __off64_t __len, int __advise),
- posix_fadvise64);
-# else
-# define posix_fadvise posix_fadvise64
-# endif
+ __off64_t __len, int __advise),
+ posix_fadvise64);
+# else
+# define posix_fadvise posix_fadvise64
+# endif
# endif
# ifdef __USE_LARGEFILE64
extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
# ifndef __USE_FILE_OFFSET64
extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len);
# else
-# ifdef __REDIRECT
+# ifdef __REDIRECT
extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset,
__off64_t __len),
posix_fallocate64);
-# else
-# define posix_fallocate posix_fallocate64
+# else
+# define posix_fallocate posix_fallocate64
+# endif
# endif
+# ifdef __USE_LARGEFILE64
+extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
# endif
+#endif
#ifdef __UCLIBC_HAS_THREADS_NATIVE__
extern int __fcntl_nocancel (int fd, int cmd, ...);
#endif
-# ifdef __USE_LARGEFILE64
-extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
-# endif
-#endif
-
__END_DECLS
#endif /* fcntl.h */
-/* Copyright (C) 1991-2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
# endif
/* This is the type of the argument to `wait'. The funky union
- causes redeclarations with ether `int *' or `union wait *' to be
+ causes redeclarations with either `int *' or `union wait *' to be
allowed without complaint. __WAIT_STATUS_DEFN is the type used in
the actual function definitions. */
# endif /* Use BSD. */
/* Define the macros <sys/wait.h> also would define this way. */
-# define WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status))
-# define WTERMSIG(status) __WTERMSIG(__WAIT_INT(status))
-# define WSTOPSIG(status) __WSTOPSIG(__WAIT_INT(status))
-# define WIFEXITED(status) __WIFEXITED(__WAIT_INT(status))
-# define WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status))
-# define WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status))
+# define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status))
+# define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status))
+# define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status))
+# define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status))
+# define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status))
+# define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status))
# if 0 /* def __WIFCONTINUED */
-# define WIFCONTINUED(status) __WIFCONTINUED(__WAIT_INT(status))
+# define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status))
# endif
#endif /* X/Open and <sys/wait.h> not included. */
#if 0 /* def __USE_GNU */
/* Return a malloc'd string containing the canonical absolute name of the
- named file. The last file name component need not exist, and may be a
- symlink to a nonexistent file. */
+ existing named file. */
extern char *canonicalize_file_name (__const char *__name)
__THROW __nonnull ((1)) __wur;
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
-/* Return the canonical absolute name of file NAME. The last file name
- component need not exist, and may be a symlink to a nonexistent file.
- If RESOLVED is null, the result is malloc'd; otherwise, if the canonical
- name is PATH_MAX chars or more, returns null with `errno' set to
- ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the
- name in RESOLVED. */
+/* Return the canonical absolute name of file NAME. If RESOLVED is
+ null, the result is malloc'd; otherwise, if the canonical name is
+ PATH_MAX chars or more, returns null with `errno' set to
+ ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
+ returns the name in RESOLVED. */
/* we choose to handle __resolved==NULL as crash :) */
extern char *realpath (__const char *__restrict __name,
char *__restrict __resolved) __THROW __wur __nonnull((2));
-/* Copyright (C) 1991-1994,1996-2002,2003,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1994,1996-2003,2005,2006,2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
NOTE: `timercmp' does not work for >= or <=. */
# define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
# define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
-# define timercmp(a, b, CMP) \
- (((a)->tv_sec == (b)->tv_sec) ? \
- ((a)->tv_usec CMP (b)->tv_usec) : \
+# define timercmp(a, b, CMP) \
+ (((a)->tv_sec == (b)->tv_sec) ? \
+ ((a)->tv_usec CMP (b)->tv_usec) : \
((a)->tv_sec CMP (b)->tv_sec))
# define timeradd(a, b, result) \
do { \