search for: __extern

Displaying 20 results from an estimated 90 matches for "__extern".

2013 Nov 12
0
[klibc:master] syscalls: Fixup some of the -at syscall declarations
...+++- usr/include/unistd.h | 8 ++++---- usr/klibc/SYSCALLS.def | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/usr/include/sys/stat.h b/usr/include/sys/stat.h index 4850429..c4b378e 100644 --- a/usr/include/sys/stat.h +++ b/usr/include/sys/stat.h @@ -69,8 +69,10 @@ __extern int fstatat(int, const char *, struct stat *, int); __extern int lstat(const char *, struct stat *); __extern mode_t umask(mode_t); __extern int mknod(const char *, mode_t, dev_t); -__extern int mknodat(int, const char *, const char *, mode_t, dev_t); +__extern int mknodat(int, const char *, mod...
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...fflush.c | 2 +- usr/klibc/stdio/fgetc.c | 1 + usr/klibc/stdio/fileno.c | 1 + 12 files changed, 32 insertions(+), 1 deletion(-) diff --git a/usr/include/stdio.h b/usr/include/stdio.h index 1d45fe1a..521213df 100644 --- a/usr/include/stdio.h +++ b/usr/include/stdio.h @@ -48,17 +48,24 @@ __extern int fseek(FILE *, off_t, int); #define fseeko fseek __extern void rewind(FILE *); __extern int fputs(const char *, FILE *); +__extern int fputs_unlocked(const char *, FILE *); __extern int puts(const char *); __extern int fputc(int, FILE *); +__extern int fputc_unlocked(int, FILE *); #define...
2003 Nov 24
1
[PATCH] library functions
....o strdup.o strlen.o \ strncat.o strstr.o strncmp.o strncpy.o strrchr.o strspn.o \ strsep.o strtok.o \ diff -Nru a/klibc/include/string.h b/klibc/include/string.h --- a/klibc/include/string.h Mon Nov 24 11:33:52 2003 +++ b/klibc/include/string.h Mon Nov 24 11:33:52 2003 @@ -16,12 +16,15 @@ __extern void *memset(void *, int, size_t); __extern void *memmem(const void *, size_t, const void *, size_t); __extern void memswap(void *, void *, size_t); +__extern int strcasecmp(const char *, const char *); +__extern int strncasecmp(const char *, const char *, size_t); __extern char *strcat(char *,...
2013 Oct 09
0
[PATCH 1/1] Porting klibc to AArch64
...e3c170 100644 --- a/usr/include/sys/stat.h +++ b/usr/include/sys/stat.h @@ -56,12 +56,6 @@ #endif -#ifdef _STATBUF_ST_NSEC - /* struct stat has struct timespec instead of time_t */ -# define st_atime st_atim.tv_sec -# define st_mtime st_mtim.tv_sec -# define st_ctime st_ctim.tv_sec -#endif __extern int stat(const char *, struct stat *); __extern int fstat(int, struct stat *); @@ -69,7 +63,7 @@ __extern int fstatat(int, const char *, struct stat *, int); __extern int lstat(const char *, struct stat *); __extern mode_t umask(mode_t); __extern int mknod(const char *, mode_t, dev_t); -__exter...
2004 Sep 11
1
[PATCH] fchdir syscall, opendir function
...chmod(const char *, mode_t) diff -purNx linux ../klibc-0.172/klibc/include/dirent.h ./klibc/include/dirent.h --- ../klibc-0.172/klibc/include/dirent.h 2002-08-11 06:35:43.000000000 +0200 +++ ./klibc/include/dirent.h 2004-09-11 20:57:27.268620024 +0200 @@ -16,5 +16,6 @@ typedef struct _IO_dir DIR; __extern DIR *opendir(const char *); __extern struct dirent *readdir(DIR *); __extern int closedir(DIR *); +__extern int dirfd (DIR *); #endif /* _DIRENT_H */ diff -purNx linux ../klibc-0.172/klibc/include/unistd.h ./klibc/include/unistd.h --- ../klibc-0.172/klibc/include/unistd.h 2004-08-25 23:56:50.0...
2007 Sep 03
2
[git patch] minor fixes
...ototype for 'tolower' Signed-off-by: maximilian attems <max at stro.at> diff --git a/usr/include/ctype.h b/usr/include/ctype.h index 670aec9..b205489 100644 --- a/usr/include/ctype.h +++ b/usr/include/ctype.h @@ -28,6 +28,22 @@ enum { __ctype_cntrl = (1 << 7), }; +__extern int isalnum(int); +__extern int isalpha(int); +__extern int isascii(int); +__extern int isblank(int); +__extern int iscntrl(int); +__extern int isdigit(int); +__extern int isgraph(int); +__extern int islower(int); +__extern int isprint(int); +__extern int ispunct(int); +__extern int isspace(int); +...
2011 Jan 29
2
another bugfix
Hi, number three, where I first thought it was a GCC bug but is apparently bad code in klibc. Submitted with permission: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47533#c6 Patch attached again (sorry) not just because that is easier with my mail system but also to keep original author intact. bye, //mirabilos -- > emacs als auch vi zum Kotzen finde (joe rules) und pine f?r den einzig >
2011 Aug 29
0
[PATCH] include: [sys/socket.h] Fix bind and connect attributes
...| 4 ++-- usr/klibc/SOCKETCALLS.def | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/include/sys/socket.h b/usr/include/sys/socket.h index fbc7711..38cfef6 100644 --- a/usr/include/sys/socket.h +++ b/usr/include/sys/socket.h @@ -244,8 +244,8 @@ struct ucred { __extern int socket(int, int, int); -__extern int bind(int, struct sockaddr *, int); -__extern int connect(int, struct sockaddr *, socklen_t); +__extern int bind(int, const struct sockaddr *, int); +__extern int connect(int, const struct sockaddr *, socklen_t); __extern int listen(int, int); __extern int...
2011 Aug 29
0
[PATCH] Add mempcpy() as wrapper around memcpy
...| 2 +- usr/klibc/mempcpy.c | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletions(-) create mode 100644 usr/klibc/mempcpy.c diff --git a/usr/include/string.h b/usr/include/string.h index 0c8c046..270fddd 100644 --- a/usr/include/string.h +++ b/usr/include/string.h @@ -13,6 +13,7 @@ __extern void *memchr(const void *, int, size_t); __extern void *memrchr(const void *, int, size_t); __extern int memcmp(const void *, const void *, size_t); __extern void *memcpy(void *, const void *, size_t); +__extern void *mempcpy(void *, const void *, size_t); __extern void *memmove(void *, const v...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...POSIX calls will work properly. I've checked it with scripts/checkpatch.pl but can't seem to figure out how to eliminate the four remaining errors. The typedef warning I think is justified. ERROR: need consistent spacing around '*' (ctx:WxV) #37: FILE: com32/include/dirent.h:31: +__extern DIR *opendir(const char *); ^ ERROR: need consistent spacing around '*' (ctx:WxB) #38: FILE: com32/include/dirent.h:32: +__extern struct dirent *readdir(DIR *); ^ ERROR: need consistent spacing around '*' (ctx:WxB) #39: FILE: com3...
2020 Aug 28
0
[klibc:ia64-signal-fix] signal: Move rt_sigaction() argument mangling to arch directories
...CHREQFLAGS) \ diff --git a/usr/klibc/arch/alpha/sigaction.c b/usr/klibc/arch/alpha/sigaction.c new file mode 100644 index 00000000..53e830b5 --- /dev/null +++ b/usr/klibc/arch/alpha/sigaction.c @@ -0,0 +1,16 @@ +/* + * sigaction.c + */ + +#include <signal.h> +#include <sys/syscall.h> + +__extern void __sigreturn(void); +__extern int ____rt_sigaction(int, const struct sigaction *, struct sigaction *, + size_t, void (*)(void)); + +int __rt_sigaction(int sig, const struct sigaction *act, + struct sigaction *oact, size_t size) +{ + return ____rt_sigaction(sig, act, oact, size, &amp...
2013 Nov 11
5
[PATCH V2 0/3] Introduce arm64 support
Hello, Here is V2 of the arm64 support for klibc patch set. Notable changes since the original series: * fp regs dropped from setjmp/longjmp * chmod, lstat and stat re-implemented with *at functions. * open64 merged into open. As with the original, this series is to be applied against the latest klibc, just after 25a66fa README.klibc: update build information V2 has been tested on x86_64
2011 Sep 06
0
[PATCH] include: [sys/file.h] define flock(2) there
...e mode 100644 usr/include/sys/file.h diff --git a/usr/include/sys/file.h b/usr/include/sys/file.h new file mode 100644 index 0000000..7b580f3 --- /dev/null +++ b/usr/include/sys/file.h @@ -0,0 +1,9 @@ +#ifndef _SYS_FILE_H +#define _SYS_FILE_H + +/* LOCK_ definitions */ +#include <fcntl.h> + +__extern int flock(int, int); + +#endif /* _SYS_FILE_H */ diff --git a/usr/include/unistd.h b/usr/include/unistd.h index f286c33..3eaeaee 100644 --- a/usr/include/unistd.h +++ b/usr/include/unistd.h @@ -105,7 +105,6 @@ __extern int dup(int); __extern int dup2(int, int); __extern int fcntl(int, int, ...);...
2013 Nov 08
9
[PATCH 0/3] Introduce arm64 support
Hello, This series introduces arm64 support to klibc. I've rebased the work from Neil Williams and Anil Singhar into the following three patches. Most of the code changes are due to new syscall implementations being needed for arm64 as a only a minimal set of syscalls are defined in the arm64 kernel. This series is to be applied against the latest klibc, just after 25a66fa README.klibc:
2016 Jan 06
0
[klibc:master] Add accept4(), handle fallback from accept () to accept4()
...| 16 ++++++++++++++++ usr/klibc/socketcalls.pl | 15 +++++++++++++-- 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/usr/include/sys/socket.h b/usr/include/sys/socket.h index 3334212..d0ba9eb 100644 --- a/usr/include/sys/socket.h +++ b/usr/include/sys/socket.h @@ -251,6 +251,7 @@ __extern int bind(int, const struct sockaddr *, int); __extern int connect(int, const struct sockaddr *, socklen_t); __extern int listen(int, int); __extern int accept(int, struct sockaddr *, socklen_t *); +__extern int accept4(int, struct sockaddr *, socklen_t *, int); __extern int getsockname(int, str...
2010 Apr 16
0
[PATCH] add minimal faccessat()
...; has actually been defined with a long off_t, so it's really "struct flock64". It just happens to work. Gag. Barf. diff --git a/usr/include/unistd.h b/usr/include/unistd.h index 547e717..8cb2877 100644 --- a/usr/include/unistd.h +++ b/usr/include/unistd.h @@ -58,7 +58,7 @@ __extern int setfsuid(uid_t); #define F_OK 0 /* Existence */ __extern int access(const char *, int); -__extern int faccessat(int, const char *, int); +__extern int faccessat(int, const char *, int, int); __extern int link(const char *, const char *); __extern int linkat(int, const char *, int, const...
2005 Mar 02
1
[PATCH] signal.h
...h> +/* Kernel defines SIGRTMAX as _NSIG, then keeps _NSIG + hidden under ifdefs... */ +#ifndef _NSIG +#undef SIGRTMIN +#undef SIGRTMAX +#endif + #include <klibc/archsignal.h> /* glibc seems to use sig_atomic_t as "int" pretty much on all architectures. @@ -67,6 +74,8 @@ __extern __sighandler_t __signal(int, __sighandler_t, int); __extern __sighandler_t sysv_signal(int, __sighandler_t); __extern __sighandler_t bsd_signal(int, __sighandler_t); +/* make sure classic code works */ +#define signal bsd_signal __extern int sigaction(int, const struct sigaction *, struct sigact...
2004 Feb 08
3
Re: klibc - setenv broken
Kay Sievers wrote: > Hi, > this simple program compiled with klibc: > > #include <stdio.h> > int main(int argc, char* argv[]) > { > setenv("TESTENV", "happy", 1); > printf("TESTENV='%s'\n", getenv("TESTENV")); > } > > prints: > > ./env > TESTENV='(null)' > >
2016 Jan 15
0
[klibc:master] Remove open_cloexec()
...2 +- usr/klibc/open_cloexec.c | 18 ------------------ usr/klibc/shm_open.c | 2 +- 5 files changed, 4 insertions(+), 23 deletions(-) diff --git a/usr/include/unistd.h b/usr/include/unistd.h index 6c08d4e..0e26f5e 100644 --- a/usr/include/unistd.h +++ b/usr/include/unistd.h @@ -90,7 +90,6 @@ __extern int open(const char *, int, ...); __extern int openat(int, const char *, int, ...); #endif __extern int creat(const char *, mode_t); -__extern int open_cloexec(const char *, int, mode_t); __extern int close(int); __extern off_t lseek(int, off_t, int); /* off_t is 64 bits now even on 32-bit pl...
2013 May 13
0
[klibc:sysconf] Framework and trivial implementation of sysconf(3)
...ngs that require a lot of code, create an out-of-line function + * and put it in a .c file in the sysconf directory. + */ + +#ifndef _SYS_SYSCONF_H +#define _SYS_SYSCONF_H + +#ifndef _UNISTD_H +# include <unistd.h> +#endif +#include <errno.h> + +enum sysconf { + _SC_PAGESIZE = 1, +}; + +__extern long sysconf(int); + +__must_inline long __sysconf_inline(int __val) +{ + switch (__val) { + case _SC_PAGESIZE: + return getpagesize(); + default: + errno = EINVAL; + return -1; + } +} + +#define sysconf(x) \ + (__builtin_constant_p(x) ? __sysconf_inline(x) : sysconf(x)) + +#endif /* _SYS_SYSCON...