summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/arpa/inet.h2
-rw-r--r--include/fcntl.h77
-rw-r--r--include/features.h2
-rw-r--r--include/libc-internal.h4
-rw-r--r--include/ssp-internal.h15
5 files changed, 50 insertions, 50 deletions
diff --git a/include/arpa/inet.h b/include/arpa/inet.h
index 30af9757d..fe3373b88 100644
--- a/include/arpa/inet.h
+++ b/include/arpa/inet.h
@@ -71,7 +71,7 @@ extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
#ifdef __USE_MISC
/* Convert Internet host address from numbers-and-dots notation in CP
into binary data and store the result in the structure INP. */
-extern in_addr_t inet_aton (__const char *__cp, struct in_addr *__inp) __THROW;
+extern int inet_aton (__const char *__cp, struct in_addr *__inp) __THROW;
/* Format a network number NET into presentation format and place result
in buffer starting at BUF with length of LEN bytes. */
diff --git a/include/fcntl.h b/include/fcntl.h
index 2f2fb99dd..444b359c0 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1994-2001,2003,2004 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
@@ -56,13 +56,15 @@ __BEGIN_DECLS
#endif /* XPG */
/* Do the file control operation described by CMD on FD.
- The remaining arguments are interpreted depending on CMD. */
+ The remaining arguments are interpreted depending on CMD.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
#ifndef __USE_FILE_OFFSET64
-extern int fcntl (int __fd, int __cmd, ...) __THROW;
+extern int fcntl (int __fd, int __cmd, ...);
#else
# ifdef __REDIRECT
-extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...) __THROW,
- fcntl64);
+extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
# else
# define fcntl fcntl64
# endif
@@ -70,36 +72,41 @@ extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...) __THROW,
/* Open FILE and return a new file descriptor for it, or -1 on error.
OFLAG determines the type of access used. If O_CREAT is on OFLAG,
- the third argument is taken as a `mode_t', the mode of the created file. */
+ the third argument is taken as a `mode_t', the mode of the created file.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
#ifndef __USE_FILE_OFFSET64
-extern int open (__const char *__file, int __oflag, ...) __THROW;
+extern int open (__const char *__file, int __oflag, ...) __nonnull ((1));
#else
# ifdef __REDIRECT
-extern int __REDIRECT (open, (__const char *__file, int __oflag, ...) __THROW,
- open64);
+extern int __REDIRECT (open, (__const char *__file, int __oflag, ...), open64)
+ __nonnull ((1));
# else
# define open open64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern int open64 (__const char *__file, int __oflag, ...) __THROW;
+extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1));
#endif
-/* Create and open FILE, with mode MODE.
- This takes an `int' MODE argument because that is
- what `mode_t' will be widened to. */
+/* Create and open FILE, with mode MODE. This takes an `int' MODE
+ argument because that is what `mode_t' will be widened to.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
#ifndef __USE_FILE_OFFSET64
-extern int creat (__const char *__file, __mode_t __mode) __THROW;
+extern int creat (__const char *__file, __mode_t __mode) __nonnull ((1));
#else
# ifdef __REDIRECT
-extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode) __THROW,
- creat64);
+extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode),
+ creat64) __nonnull ((1));
# else
# define creat creat64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern int creat64 (__const char *__file, __mode_t __mode) __THROW;
+extern int creat64 (__const char *__file, __mode_t __mode) __nonnull ((1));
#endif
#if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
@@ -118,64 +125,64 @@ extern int creat64 (__const char *__file, __mode_t __mode) __THROW;
# define F_TEST 3 /* Test a region for other processes locks. */
# ifndef __USE_FILE_OFFSET64
-extern int lockf (int __fd, int __cmd, __off_t __len) __THROW;
+extern int lockf (int __fd, int __cmd, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len) __THROW,
- lockf64);
+extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64);
# else
# define lockf lockf64
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int lockf64 (int __fd, int __cmd, __off64_t __len) __THROW;
+extern int lockf64 (int __fd, int __cmd, __off64_t __len);
# endif
#endif
-
-#if 0
-
-/* FIXME -- uClibc should probably implement these... */
-
#ifdef __USE_XOPEN2K
/* Advice the system about the expected behaviour of the application with
respect to the file associated with FD. */
# ifndef __USE_FILE_OFFSET64
-extern int posix_fadvise (int __fd, __off_t __offset, size_t __len,
+extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
int __advise) __THROW;
# else
# ifdef __REDIRECT
extern int __REDIRECT (posix_fadvise, (int __fd, __off64_t __offset,
- size_t __len, int __advise) __THROW,
+ __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, size_t __len,
+extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
int __advise) __THROW;
# endif
+#endif
+
+#if 0
-/* Reserve storage for the data of the file associated with FD. */
+/* FIXME -- uClibc should probably implement these... */
+
+/* Reserve storage for the data of the file associated with FD.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
-extern int posix_fallocate (int __fd, __off_t __offset, size_t __len) __THROW;
+extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset,
- size_t __len) __THROW,
+ __off64_t __len),
posix_fallocate64);
# else
# define posix_fallocate posix_fallocate64
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int posix_fallocate64 (int __fd, __off64_t __offset, size_t __len)
- __THROW;
+extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
# endif
#endif
-#endif
__END_DECLS
diff --git a/include/features.h b/include/features.h
index 07680a09e..0f4921b9f 100644
--- a/include/features.h
+++ b/include/features.h
@@ -266,7 +266,7 @@
# define __USE_REENTRANT 1
#endif
-#if _FORTIFY_SOURCE > 0 && __GNUC_PREREQ (4, 1) && __OPTIMIZE__ > 0
+#if _FORTIFY_SOURCE > 0 && __GNUC_PREREQ (4, 1) && defined(__OPTIMIZE__)
# if _FORTIFY_SOURCE == 1
# define __USE_FORTIFY_LEVEL 1
# elif _FORTIFY_SOURCE > 1
diff --git a/include/libc-internal.h b/include/libc-internal.h
index f5bc9bb0c..b00a8775c 100644
--- a/include/libc-internal.h
+++ b/include/libc-internal.h
@@ -70,6 +70,10 @@
# define internal_function /* empty */
#endif
+#ifndef NOT_IN_libc
+# define IS_IN_libc 1
+#endif
+
/* Prepare for the case that `__builtin_expect' is not available. */
#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
#define __builtin_expect(x, expected_value) (x)
diff --git a/include/ssp-internal.h b/include/ssp-internal.h
index c82debbd5..81a83f70c 100644
--- a/include/ssp-internal.h
+++ b/include/ssp-internal.h
@@ -21,21 +21,10 @@
#include <signal.h>
#include <linux/unistd.h>
-#ifdef __SSP_USE_ERANDOM__
-# include <sys/sysctl.h>
-#if 1
-# define SYSCTL __sysctl
-#else
-#define __NR__kernel_sysctl __NR_sysctl
-static __always_inline _syscall6(int,__kernel_sysctl,int *,name,int,nlen,void *,oldval,size_t *,oldlenp,void *,newval,size_t,newlen);
-#define SYSCTL(name,nlen,oldval,oldlenp,newval,newlen) __kernel_sysctl(name,nlen,oldval,oldlenp,newval,newlen)
-#endif
-#endif
-
#ifndef __SSP_QUICK_CANARY__
#define __NR___kernel_open __NR_open
-static __always_inline _syscall2(int,__kernel_open,const char *,path,int,flags);
-#define OPEN(path, flags) __kernel_open(path, flags)
+static __always_inline _syscall3(int,__kernel_open,const char *,path,int,flags,__kernel_mode_t,mode);
+#define OPEN(path, flags, mode) __kernel_open(path, flags, mode)
/* void * = __ptr_t */
#define __NR___kernel_read __NR_read