Re: [PATCH 00/46] Support for cut-down Linux syscalls
On Tuesday 13 November 2012 06:31:09 Markos Chandras wrote: The following patches prefer the old system call if both syscalls are present. For example, if __NR_open and __NR_openat are defined, then open() will use the __NR_open syscall. If the __NR_open syscall is not defined, then open() will use __NR_openat internally. This way we protect existing architectures and preserve old behavior. a semi-quick scan shows that you're missing hidden symbol aliases for example, in your chmod change, you call fchmodat (which is fine), but there's no addition of libc_hidden_{proto,def} for fchmodat. to check for this, you can run `readelf -r` on the libc.so file and look at all the function relocs. the only ones in that list you should see are malloc related (malloc/free/calloc/etc...). if you see other symbols, they're most likely missing the libc_hidden stuff. -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 01/46] chmod: Use fchmodat if arch does not have the chmod syscall
On Tuesday 13 November 2012 06:31:10 Markos Chandras wrote: +int chmod(const char* path, mode_t mode) const char *path, not const char* path. seems to apply to many patches in this series. -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 01/46] chmod: Use fchmodat if arch does not have the chmod syscall
On Tuesday 13 November 2012 06:31:10 Markos Chandras wrote: +#if defined(__NR_fchmodat) ! defined(__NR_chmod) also, !defined rather than ! defined -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 01/46] chmod: Use fchmodat if arch does not have the chmod syscall
On Sat, Nov 17, 2012 at 8:25 PM, Mike Frysinger vap...@gentoo.org wrote: On Tuesday 13 November 2012 06:31:10 Markos Chandras wrote: +#if defined(__NR_fchmodat) ! defined(__NR_chmod) also, !defined rather than ! defined -mike Hi Mike, Thanks for the review. I will do the necessary coding-style fixes in the next revision of my patches -- Regards, Markos ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 15/46] dup3: Add dup3 syscall
On Tuesday 13 November 2012 06:31:24 Markos Chandras wrote: --- /dev/null +++ b/libc/sysdeps/linux/common/dup3.c ah, i already added dup3 +#if defined(__NR_dup3) i forgot this though ... just added -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 22/46] fork: Use clone if arch does not have the fork syscall
On Tuesday 13 November 2012 06:31:31 Markos Chandras wrote: +pid_t __libc_fork(void) +{ + pid_t pid; + pid = INLINE_SYSCALL(clone, 4, SIGCHLD, NULL, NULL, NULL); merge the definition assignment + if (pid0) { if (pid 0) { + __set_errno(-pid); + return -1; + } although, is this really necessary ? seems to me that INLINE_SYSCAL() already takes care of setting errno correctly ... return INLINE_SYSCALL(clone, 4, SIGCHLD, NULL, NULL, NULL); +weak_alias(__libc_fork,fork) space after the comma -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 33/46] ustat: Return ENOSYS if ustat syscall is not defined
On Tuesday 13 November 2012 06:31:42 Markos Chandras wrote: +#if ! defined(__NR_ustat) +/* + * ustat syscall is deprecated and statfs or fstatfs should + * be used instead. There is no way to provide a wrapper for the + * newer syscalls, so just mark this syscall as unimplemented + */ +int ustat(dev_t dev, struct ustat* ubuf) +{ + __set_errno (ENOSYS); + return -1; +} NAK: use libc/sysdeps/linux/common/stubs.c -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 38/46] llseek: Use the llseek system call if defined
On Tuesday 13 November 2012 06:31:47 Markos Chandras wrote: -#if defined __NR__llseek defined __UCLIBC_HAS_LFS__ +#if (defined __NR__llseek ||defined __NR_llseek) defined needs a space after that || loff_t lseek64(int fd, loff_t offset, int whence) { loff_t result; +#if defined(__NR_llseek) + return (loff_t)(INLINE_SYSCALL(llseek, 5, fd, (off_t)(offset 32), + (off_t)(offset 0x), result, whence) ? : result); +#else return (loff_t)(INLINE_SYSCALL(_llseek, 5, fd, (off_t) (offset 32), (off_t) (offset 0x), result, whence) ?: result); +#endif } only difference is first arg ? so rather than this, put above the func: # ifndef __NR__llseek # define __NR__llseek __NR_llseek # endif -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 46/46] Config.in: Introduce symbol for arches without deprecated syscalls
On Tuesday 13 November 2012 06:31:55 Markos Chandras wrote: --- a/extra/Configs/Config.in.arch +++ b/extra/Configs/Config.in.arch +config ARCH_HAS_NO_DEPRECATED_SYSCALLS where is this actually used ? i didn't see it in the patches posted. also, let's avoid xxx_NO_xxx from now on. it makes reading logic a pita since it's an implicit ! in the middle. just change the default to y. -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 45/46] libc/ipc: Don't pass IPC_64 to arches that don't need it
On Thursday 15 November 2012 22:56:58 Rich Felker wrote: On Tue, Nov 13, 2012 at 11:31:54AM +, Markos Chandras wrote: --- a/extra/Configs/Config.in.arch +++ b/extra/Configs/Config.in.arch +config ARCH_HAS_NO_OLD_IPC + bool Disable support for the old IPC interface + default n + help + New architectures do not define the ARCH_WANT_IPC_PARSE_VERSION + in their kernel, which means they have no support for the old IPC + interface. For these architectures, these symbol must be defined + in order to have functional semctl, shmctl and msgctl system calls + Why is this a configure option? It's constant for a given arch... correct. this is what uClibc_arch_features.h is for. -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 46/46] Config.in: Introduce symbol for arches without deprecated syscalls
On Sat, Nov 17, 2012 at 8:40 PM, Mike Frysinger vap...@gentoo.org wrote: On Tuesday 13 November 2012 06:31:55 Markos Chandras wrote: --- a/extra/Configs/Config.in.arch +++ b/extra/Configs/Config.in.arch +config ARCH_HAS_NO_DEPRECATED_SYSCALLS where is this actually used ? i didn't see it in the patches posted. also, let's avoid xxx_NO_xxx from now on. it makes reading logic a pita since it's an implicit ! in the middle. just change the default to y. -mike Nowhere yet. It should be used by arches that have no deprecated syscalls. So when one of them is merged, it should use this symbol. -- Regards, Markos ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 45/46] libc/ipc: Don't pass IPC_64 to arches that don't need it
On Sat, Nov 17, 2012 at 8:41 PM, Mike Frysinger vap...@gentoo.org wrote: On Thursday 15 November 2012 22:56:58 Rich Felker wrote: On Tue, Nov 13, 2012 at 11:31:54AM +, Markos Chandras wrote: --- a/extra/Configs/Config.in.arch +++ b/extra/Configs/Config.in.arch +config ARCH_HAS_NO_OLD_IPC + bool Disable support for the old IPC interface + default n + help + New architectures do not define the ARCH_WANT_IPC_PARSE_VERSION + in their kernel, which means they have no support for the old IPC + interface. For these architectures, these symbol must be defined + in order to have functional semctl, shmctl and msgctl system calls + Why is this a configure option? It's constant for a given arch... correct. this is what uClibc_arch_features.h is for. -mike Right but the logic in libc/misc/sysvipc/ipc.h should change because currently it does not check whether this macro is already defined. I will do that in the next revision -- Regards, Markos ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH] string/microblaze: Fix for little-endian
On Friday 21 September 2012 01:38:41 Steve Bennett wrote: --- a/libc/string/microblaze/memcpy.S +++ b/libc/string/microblaze/memcpy.S +#ifdef __MICROBLAZEEL__ + #define BSLLI bsrli + #define BSRLI bslli +#else + #define BSLLI bslli + #define BSRLI bsrli +#endif for future reference, we do not indent preprocessor tokens #ifdef foo # define cow moo #else # define cow woof #endif -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: utils/getconf.c on MacOS X
On Thursday 20 September 2012 04:38:20 Waldemar Brodkorb wrote: What might be the best solution to resolve this? don't bother building it ? i can't see why it would be useful. -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: [PATCH 45/46] libc/ipc: Don't pass IPC_64 to arches that don't need it
On Saturday 17 November 2012 15:44:23 Markos Chandras wrote: On Sat, Nov 17, 2012 at 8:41 PM, Mike Frysinger vap...@gentoo.org wrote: On Thursday 15 November 2012 22:56:58 Rich Felker wrote: On Tue, Nov 13, 2012 at 11:31:54AM +, Markos Chandras wrote: --- a/extra/Configs/Config.in.arch +++ b/extra/Configs/Config.in.arch +config ARCH_HAS_NO_OLD_IPC + bool Disable support for the old IPC interface + default n + help + New architectures do not define the ARCH_WANT_IPC_PARSE_VERSION + in their kernel, which means they have no support for the old IPC + interface. For these architectures, these symbol must be defined + in order to have functional semctl, shmctl and msgctl system calls + Why is this a configure option? It's constant for a given arch... correct. this is what uClibc_arch_features.h is for. Right but the logic in libc/misc/sysvipc/ipc.h should change because currently it does not check whether this macro is already defined. I will do that in the next revision that's fine, but the point is that these defines should live in that arch header rather than in Config.in since the ability to turn it on/off doesn't make sense. -mike signature.asc Description: This is a digitally signed message part. ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc