Displaying 20 results from an estimated 25 matches for "__fd".
Did you mean:
__d
2004 Jan 27
4
Re: udevinfo output broken
...value; for FILE *, NULL (0) is error and
+ * non-NULL are valid.
+ */
static __inline__ int fileno(FILE *__f)
{
/* This should really be intptr_t, but size_t should be the same size */
- return (int)(size_t)__f;
+ return (int)(size_t)__f - 1;
}
static __inline__ FILE * __create_file(int __fd)
{
- return (FILE *)(size_t)__fd;
+ return (FILE *)(size_t)(__fd + 1);
}
__extern FILE *fopen(const char *, const char *);
Peter, any reason for doing this? It seems to change the way stdout
works.
thanks,
greg k-h
2003 Jun 19
0
flashpluginwrapper for Flash 6 (Shared Library Tools redux)
..._errno_location(void)
{
return __error ();
}
unsigned long int __strtoul_internal(const char *__nptr, char **__endptr,
int __base, int __group)
{
return strtoul (__nptr, __endptr, __base);
}
void __terminate()
{
fprintf (stderr, "terminate!\n");
}
ssize_t __write (int __fd, const void *__buf, size_t __size)
{
return write (__fd, __buf, __size);
}
int __fxstat(int __ver, int __filedesc, struct stat *__stat_buf)
{
return fstat (__filedesc, __stat_buf);
}
int __xstat(int __ver, const char *__filename, struct stat *__stat_buf)
{
return stat (__filename, __stat...
2012 Sep 25
1
[PATCH] Fix <sys/time.h> for Linux 3.5.1
...is defined.
---
usr/include/sys/time.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/usr/include/sys/time.h b/usr/include/sys/time.h
index 7a2f8b9..178a4c6 100644
--- a/usr/include/sys/time.h
+++ b/usr/include/sys/time.h
@@ -15,6 +15,8 @@
double-underscore ones, except __NFDBITS, __FD_SETSIZE and
__FDSET_LONGS which are defined in <linux/posix_types.h>.
+ From 3.5.1, <linux/time.h> does not even define FD_ZERO etc.
+
Unfortunately, some architectures define the double-underscore ones
as inlines, so we can't use a simple #ifdef test. Thus, the onl...
2012 Oct 01
0
[klibc:master] include: [sys/time.h] fix for Linux 3.5.1
.../include/sys/time.h b/usr/include/sys/time.h
index 7a2f8b9..98497e7 100644
--- a/usr/include/sys/time.h
+++ b/usr/include/sys/time.h
@@ -23,6 +23,7 @@
#undef FD_SET
#undef FD_CLR
#undef FD_ISSET
+#undef FD_SETSIZE
__extern void *memset(void *, int, size_t);
static inline void FD_ZERO(fd_set *__fdsetp)
@@ -45,6 +46,8 @@ static inline int FD_ISSET(int __fd, fd_set *__fdsetp)
(__fd % BITS_PER_LONG)) & 1;
}
+#define FD_SETSIZE __FD_SETSIZE
+
__extern int gettimeofday(struct timeval *, struct timezone *);
__extern int settimeofday(const struct timeval *, const struct timezone *);
__...
2014 Oct 01
2
Re: [libvirt] increase number of libvirt threads by starting tansient guest doamin - is it a bug?
..../sysdeps/unix/syscall-template.S:81
>> 81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
>> (gdb) bt
>> #0 0x00007f1906e6684d in read () at
>> ../sysdeps/unix/syscall-template.S:81
>> #1 0x00007f18f8c415be in read (__nbytes=16, __buf=0x7f18d4000c50,
>> __fd=26) at /usr/include/bits/unistd.h:44
>> #2 read_all (fd=26, data=data@entry =0x7f18d4000c50, len=len@entry =16,
>> nonblocking=nonblocking@entry =0) at xs.c:374
>> #3 0x00007f18f8c41675 in read_message (h=h@entry =0x7f18e8001070,
>> nonblocking=nonblocking@entry =0) at xs....
2014 Sep 27
2
[PATCH 1/2] Implement realpath()
This is needed as the basis for the readlink -f option.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
--- a/usr/include/stdlib.h
+++ b/usr/include/stdlib.h
@@ -92,4 +92,6 @@ static __inline__ int grantpt(int __fd)
return 0; /* devpts does this all for us! */
}
+__extern char *realpath(const char *, char *);
+
#endif /* _STDLIB_H */
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -60,7 +60,7 @@ klib-y += vsnprintf.o snprintf.o vsprint
send.o recv.o \
access.o chmod.o chown.o dup2.o mknod.o...
2014 Oct 01
2
Re: [libvirt] increase number of libvirt threads by starting tansient guest doamin - is it a bug?
...d700 (LWP 20883))]
#0 0x00007f1906e6684d in read () at ../sysdeps/unix/syscall-template.S:81
81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
(gdb) bt
#0 0x00007f1906e6684d in read () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007f18f8c415be in read (__nbytes=16, __buf=0x7f18d4000c50, __fd=26) at /usr/include/bits/unistd.h:44
#2 read_all (fd=26, data=data@entry =0x7f18d4000c50, len=len@entry =16, nonblocking=nonblocking@entry =0) at xs.c:374
#3 0x00007f18f8c41675 in read_message (h=h@entry =0x7f18e8001070, nonblocking=nonblocking@entry =0) at xs.c:1139
#4 0x00007f18f8c41e90 in read_t...
2014 Oct 01
0
Re: [libvirt] increase number of libvirt threads by starting tansient guest doamin - is it a bug?
...0 0x00007f1906e6684d in read () at ../sysdeps/unix/syscall-template.S:81
> 81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
> (gdb) bt
> #0 0x00007f1906e6684d in read () at ../sysdeps/unix/syscall-template.S:81
> #1 0x00007f18f8c415be in read (__nbytes=16, __buf=0x7f18d4000c50, __fd=26) at /usr/include/bits/unistd.h:44
> #2 read_all (fd=26, data=data@entry =0x7f18d4000c50, len=len@entry =16, nonblocking=nonblocking@entry =0) at xs.c:374
> #3 0x00007f18f8c41675 in read_message (h=h@entry =0x7f18e8001070, nonblocking=nonblocking@entry =0) at xs.c:1139
> #4 0x00007f18f8c...
2014 Oct 02
0
Re: [libvirt] increase number of libvirt threads by starting tansient guest doamin - is it a bug?
...emplate.S:81
>>> 81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
>>> (gdb) bt
>>> #0 0x00007f1906e6684d in read () at
>>> ../sysdeps/unix/syscall-template.S:81
>>> #1 0x00007f18f8c415be in read (__nbytes=16, __buf=0x7f18d4000c50,
>>> __fd=26) at /usr/include/bits/unistd.h:44
>>> #2 read_all (fd=26, data=data@entry =0x7f18d4000c50, len=len@entry =16,
>>> nonblocking=nonblocking@entry =0) at xs.c:374
>>> #3 0x00007f18f8c41675 in read_message (h=h@entry =0x7f18e8001070,
>>> nonblocking=nonblocking@...
2011 Jul 29
3
[PATCH 1/3] klibc: Add scandir() and alphasort() support.
...changed, 84 insertions(+), 1 deletions(-)
create mode 100644 usr/klibc/scandir.c
diff --git a/usr/include/dirent.h b/usr/include/dirent.h
index e324474..3b1ff59 100644
--- a/usr/include/dirent.h
+++ b/usr/include/dirent.h
@@ -30,4 +30,11 @@ static __inline__ int dirfd(DIR * __d)
return __d->__fd;
}
+__extern int scandir(const char *dirp, struct dirent ***namelist,
+ int (*filter)(const struct dirent *),
+ int (*compar)(const struct dirent **,
+ const struct dirent **));
+
+int alphasort(const struct dirent **a, const struct dirent **b);
+
#endif /* _DIRENT_H */
dif...
2016 Jan 06
0
[klibc:master] Remove obsolete getpt() function
...c647..c2d6264 100644
--- a/usr/include/stdlib.h
+++ b/usr/include/stdlib.h
@@ -83,7 +83,6 @@ static __inline__ void srandom(unsigned int __s)
__extern int unlockpt(int);
__extern char *ptsname(int);
-__extern int getpt(void);
__extern int posix_openpt(int);
static __inline__ int grantpt(int __fd)
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index 7d95e87..5521038 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -52,7 +52,7 @@ klib-y += vsnprintf.o snprintf.o vsprintf.o sprintf.o \
getenv.o setenv.o putenv.o __put_env.o unsetenv.o \
clearenv.o nullenv.o \
getopt.o get...
2016 Jan 27
0
[klibc:master] Make posix_openpt() an inline
...ckpt(int);
__extern char *ptsname(int);
-__extern int posix_openpt(int);
+
+static __inline__ int posix_openpt(int __mode)
+{
+ __extern int open(const char *, int, ...);
+
+ __mode &= ~(O_CREAT | O_TMPFILE);
+ return open("/dev/ptmx", __mode);
+}
static __inline__ int grantpt(int __fd)
{
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index a0e440d..eba6add 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -52,7 +52,7 @@ klib-y += vsnprintf.o snprintf.o vsprintf.o sprintf.o \
getenv.o setenv.o putenv.o __put_env.o unsetenv.o \
clearenv.o nullenv.o \
getopt.o...
2018 Apr 04
1
Tinc 1.1_pre15 compilation issue witrh glibc 2.25
...de/netdb.h:27,
from have.h:109,
from system.h:26,
from uml_device.c:21:
/usr/include/sys/socket.h:131:12: note: expected ‘__CONST_SOCKADDR_ARG {aka union <anonymous>}’ but argument is of type ‘const struct sockkadr *’
extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
^~~~~~~
-----------------------------------------
/usr/include/sys/socket.h is from glibc 2.25, I am using gcc 6.4.0.
Changing the problematic line as follows:
-----------------------------------------
- if(connect(...
2004 Jan 22
0
Re: klibc fopen fix
Gerd Knorr wrote:
> Hi,
>
> klibc's fopen() doesn't handle the __fd == 0 case right,
> quick fix below (untested).
>
Fixed in klibc-0.96.
-hpa
2014 Sep 29
0
[PATCH v2 1/2] Implement realpath()
...<ben at decadent.org.uk>
---
v2: Don't implement the BSD/GNU extension of allowing a non-existent
last part.
Use open(O_PATH) and procfs to get resolved name from the kernel.
--- a/usr/include/stdlib.h
+++ b/usr/include/stdlib.h
@@ -92,4 +92,6 @@ static __inline__ int grantpt(int __fd)
return 0; /* devpts does this all for us! */
}
+__extern char *realpath(const char *, char *);
+
#endif /* _STDLIB_H */
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -60,7 +60,7 @@ klib-y += vsnprintf.o snprintf.o vsprint
send.o recv.o \
access.o chmod.o chown.o dup2.o mknod.o...
2016 Jan 06
0
[klibc:master] Implement realpath()
...| 49 +++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/usr/include/stdlib.h b/usr/include/stdlib.h
index 406f446..856c647 100644
--- a/usr/include/stdlib.h
+++ b/usr/include/stdlib.h
@@ -92,4 +92,6 @@ static __inline__ int grantpt(int __fd)
return 0; /* devpts does this all for us! */
}
+__extern char *realpath(const char *, char *);
+
#endif /* _STDLIB_H */
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index d3e2b9f..7d95e87 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -61,7 +61,7 @@ klib-y += vsnprintf.o snp...
2011 Aug 10
1
[PATCH v2] dirent.h add fdopendir()
...urn NULL;
+ if (!S_ISDIR(st.st_mode)) {
+ errno = ENOTDIR;
+ return NULL;
+ }
+
+ flags = fcntl(fd, F_GETFL);
+ if (flags == -1)
+ return NULL;
+ if ((flags & O_ACCMODE) == O_WRONLY) {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ dp = malloc(sizeof(DIR));
+
+ if(!dp)
+ return NULL;
+
+ dp->__fd = fd;
+ dp->next = NULL;
+ dp->bytes_left = 0;
+ return dp;
+}
diff --git a/usr/klibc/tests/Kbuild b/usr/klibc/tests/Kbuild
index a3e0254..5e6e073 100644
--- a/usr/klibc/tests/Kbuild
+++ b/usr/klibc/tests/Kbuild
@@ -14,6 +14,7 @@ static-y := $(test-files:.c=)
shared-y := $(addsuffix .shared,...
2014 Sep 26
3
Re: [libvirt] increase number of libvirt threads by starting tansient guest doamin - is it a bug?
Hi Michal,
thank you for your answer.
so if i understand that correctly, no matter if i shutdown or destroy the domain and no matter if it is a transient or an persistent vm, the thread should disappear, right?
in my case they still exist, also an hour after i destroy the domain (and don´t start any new one).
i use libvirt-1.1.35 on fedora core 20, for information.
all the best
max
2016 Jan 06
3
[PATCH klibc 0/3] Changes to support initramfs-tools 0.117
initramfs-tools version 0.117 requires 'readlink -f' and
'mount -o defaults' to work.
The first two patches were previously submitted but not applied.
Ben.
Ben Hutchings (3):
Implement realpath()
readlink: Add -f option
mount: Implement -o defaults
usr/include/stdlib.h | 2 ++
usr/klibc/Kbuild | 2 +-
usr/klibc/realpath.c | 49
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...rn rv;
+}
diff --git a/com32/lib/fdopendir.c b/com32/lib/fdopendir.c
new file mode 100644
index 0000000..83a7ac6
--- /dev/null
+++ b/com32/lib/fdopendir.c
@@ -0,0 +1,13 @@
+/*
+ * fdopendir.c
+ */
+
+#include <dirent.h>
+#include <stdio.h>
+#include <errno.h>
+
+DIR *fdopendir(int __fd)
+{
+ errno = ENOSYS;
+ return NULL;
+}
diff --git a/com32/lib/getcwd.c b/com32/lib/getcwd.c
new file mode 100644
index 0000000..95008bb
--- /dev/null
+++ b/com32/lib/getcwd.c
@@ -0,0 +1,29 @@
+/*
+ * getcwd.c
+ */
+
+#include <syslinux/config.h>
+#include <klibc/compiler.h>
+#include &...