svn commit: r303451 - in head: include lib/libc/gen

2016-07-28 Thread Ed Schouten
Author: ed Date: Thu Jul 28 16:20:27 2016 New Revision: 303451 URL: https://svnweb.freebsd.org/changeset/base/303451 Log: Fix up prototypes of basename(3) and dirname(3) to comply to POSIX. POSIX allows these functions to be implemented in a way that the resulting string is stored in the

svn commit: r303450 - head/usr.bin/xinstall

2016-07-28 Thread Ed Schouten
Author: ed Date: Thu Jul 28 16:06:37 2016 New Revision: 303450 URL: https://svnweb.freebsd.org/changeset/base/303450 Log: Pull a copy of the input string before calling basename() and dirname(). POSIX allows implementations of these functions to modify their input. Modified: head/usr.bin

svn commit: r303449 - head/usr.sbin/newsyslog

2016-07-28 Thread Ed Schouten
Author: ed Date: Thu Jul 28 16:02:30 2016 New Revision: 303449 URL: https://svnweb.freebsd.org/changeset/base/303449 Log: Clean up use of basename() and dirname(). Pull copies of the input pathname string before calling basename() and dirname() to make this comply to POSIX. Free these cop

svn commit: r303445 - head/usr.sbin/uathload

2016-07-28 Thread Ed Schouten
Author: ed Date: Thu Jul 28 15:33:19 2016 New Revision: 303445 URL: https://svnweb.freebsd.org/changeset/base/303445 Log: Call basename() and dirname() in the POSIXly correct way. Pull copies of the input string, as these functions are allowed to modify them. Free the copies after creatin

svn commit: r303444 - head/usr.bin/grep

2016-07-28 Thread Ed Schouten
Author: ed Date: Thu Jul 28 15:19:47 2016 New Revision: 303444 URL: https://svnweb.freebsd.org/changeset/base/303444 Log: Call basename() in a portable way. Pull a copy of the filename string before calling basename(). Change the loop to not return on its own, so we can put a free() state

svn commit: r303443 - head/usr.bin/sed

2016-07-28 Thread Ed Schouten
Author: ed Date: Thu Jul 28 15:17:12 2016 New Revision: 303443 URL: https://svnweb.freebsd.org/changeset/base/303443 Log: Don't call basename() and dirname() in an unportable way. POSIX allows these functions to modify their input buffer, so that they have storage for the return value. Pu

Re: svn commit: r303342 - in head: include lib/libc/stdlib

2016-07-28 Thread Ed Schouten
e first thing it does is cast the argument to an uint32_t, so even if we didn't properly zero/size extend this, it wouldn't end up being used. Best regards, -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-sr

svn commit: r303435 - in head: lib/libc/sys sys/kern sys/sys

2016-07-28 Thread Ed Schouten
Author: ed Date: Thu Jul 28 12:22:01 2016 New Revision: 303435 URL: https://svnweb.freebsd.org/changeset/base/303435 Log: Change the return type of msgrcv() to ssize_t as required by POSIX. It looks like the msgrcv() system call is already written in such a way that the size is internally

svn commit: r303436 - in head/sys: kern sys

2016-07-28 Thread Ed Schouten
Author: ed Date: Thu Jul 28 12:22:34 2016 New Revision: 303436 URL: https://svnweb.freebsd.org/changeset/base/303436 Log: Regenerate system call table for r303435. Modified: head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/

svn commit: r303428 - in head: include lib/libc/net

2016-07-28 Thread Ed Schouten
Author: ed Date: Thu Jul 28 10:05:41 2016 New Revision: 303428 URL: https://svnweb.freebsd.org/changeset/base/303428 Log: Add NI_NUMERICSCOPE. POSIX also declares NI_NUMERICSCOPE, which makes getnameinfo() return a numerical scope identifier. The interesting thing is that support for th

svn commit: r303427 - in head/include: . xlocale

2016-07-28 Thread Ed Schouten
Author: ed Date: Thu Jul 28 09:50:19 2016 New Revision: 303427 URL: https://svnweb.freebsd.org/changeset/base/303427 Log: Change type of MB_CUR_MAX and MB_CUR_MAX_L() to size_t. POSIX requires that MB_CUR_MAX expands to an expression of type size_t. It currently expands to an int. As thes

Re: svn commit: r303342 - in head: include lib/libc/stdlib

2016-07-26 Thread Ed Schouten
nly that. This change only changes arguments from one integer type to the other. As far as I know, such a change would not cause a compiler to generate (substantially) different diagnostics. If it turns out I'm mistaken I'll reconsider, but for now this should do. :-) -- Ed Schout

svn commit: r303342 - in head: include lib/libc/stdlib

2016-07-26 Thread Ed Schouten
Author: ed Date: Tue Jul 26 20:11:29 2016 New Revision: 303342 URL: https://svnweb.freebsd.org/changeset/base/303342 Log: Fix typing of srandom() and initstate(). POSIX requires that these functions have an unsigned int for their first argument; not an unsigned long. My reasoning is

svn commit: r303340 - in head/sys: compat/freebsd32 kern sys

2016-07-26 Thread Ed Schouten
Author: ed Date: Tue Jul 26 17:23:49 2016 New Revision: 303340 URL: https://svnweb.freebsd.org/changeset/base/303340 Log: Add shmatt_t. It looks like our "struct shmid_ds::shm_nattch" deviates from the standard in the sense that it is a signed integer, whereas POSIX requires that it is

Re: svn commit: r303338 - head/sys/dev/vt

2016-07-26 Thread Ed Schouten
if (kbd != NULL) > vt_save_kbd_state(vw, kbd); > + mtx_unlock(&Giant); > } Would it make sense to put an mtx_assert(&Giant, MA_OWNED) in kbd_get_keyboard()? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717

Re: svn commit: r303046 - head/lib/libc/locale

2016-07-19 Thread Ed Schouten
ow does this interact with symbol versioning/mapping? Wouldn't our C library's symbol map already make these symbols hidden without any explicit annotation? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src

svn commit: r302448 - in head/sys: amd64/cloudabi64 arm64/cloudabi64

2016-07-08 Thread Ed Schouten
Author: ed Date: Fri Jul 8 20:09:21 2016 New Revision: 302448 URL: https://svnweb.freebsd.org/changeset/base/302448 Log: Don't forget to set sa->narg for CloudABI system calls. It turns out that this value is not used within the system call code under normal conditions, except when using

Re: svn commit: r302364 - head/usr.sbin/bhyve

2016-07-05 Thread Ed Schouten
be proposed after ^/stable/11 is forked. This problem shouldn't exist when using C11's _Static_assert(), right? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src-head@freebsd.org mailing list https:

Re: svn commit: r302252 - head/sys/kern

2016-07-04 Thread Ed Schouten
ipe-padded-areas https://gustedt.wordpress.com/2012/10/24/c11-defects-initialization-of-padding/ -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/lis

Re: svn commit: r302252 - head/sys/kern

2016-07-04 Thread Ed Schouten
2016-07-04 10:26 GMT+02:00 Ed Schouten : > It is valid. The ".field = value" construct is called a 'designator' > in C's grammar specification. Typo: this is called a 'designation'. -- Ed Schouten Nuxi, 's-He

Re: svn commit: r302252 - head/sys/kern

2016-07-04 Thread Ed Schouten
field[124].somethingelse = 789, }; Which is the same as: struct foo bar = { .field = { [123].something = 456, [124].somethingelse = 789, }, }; And: struct foo bar = { .field = { [123] = { .something = 456 }, [124] = { .somethingelse = 789 }, }, }; Best

svn commit: r301696 - head/contrib/atf

2016-06-08 Thread Ed Schouten
Author: ed Date: Wed Jun 8 20:54:56 2016 New Revision: 301696 URL: https://svnweb.freebsd.org/changeset/base/301696 Log: Don't let ATF call basename() and dirname() in a non-standard way. POSIX basename() and dirname() are allowed to overwrite the input buffer. The advantage of implement

svn commit: r301406 - head/sys/sys

2016-06-04 Thread Ed Schouten
Author: ed Date: Sat Jun 4 18:57:00 2016 New Revision: 301406 URL: https://svnweb.freebsd.org/changeset/base/301406 Log: Don't test for INKERNEL to check whether we're in kernel space. It turns out that actually defines a macro under this name, even when we're not in kernelspace. This c

svn commit: r301167 - head/lib/libcasper/services/cap_grp

2016-06-01 Thread Ed Schouten
Author: ed Date: Wed Jun 1 20:45:21 2016 New Revision: 301167 URL: https://svnweb.freebsd.org/changeset/base/301167 Log: Don't call setgrent() in an unportable way. For FreeBSD 12, I'm considering updating setgrent() to have a function prototype that conforms to POSIX. FreeBSD seems to b

Re: svn commit: r301071 - head/sys/sys

2016-06-01 Thread Ed Schouten
owing pollution (which breaks almost everything since > includes this header: > - struct tag names pthread* > - struct member names state and mutex Yes. It would have made so much more sense if a header like would have defined all pthread types as __pthread_t, __pthread_mutex_t, etc. That way

svn commit: r301110 - head/sys/sys

2016-06-01 Thread Ed Schouten
Author: ed Date: Wed Jun 1 07:45:03 2016 New Revision: 301110 URL: https://svnweb.freebsd.org/changeset/base/301110 Log: Define the id_t type as required by POSIX. It seems that all versions of POSIX that I could find require that defines id_t. Define it together with rlim_t. While th

svn commit: r301071 - head/sys/sys

2016-05-31 Thread Ed Schouten
Author: ed Date: Tue May 31 19:05:41 2016 New Revision: 301071 URL: https://svnweb.freebsd.org/changeset/base/301071 Log: Improve POSIX conformance of . - This header file has always depended on pthread_t, pthread_attr_t, struct timespec, size_t and uid_t. Only as of POSIX 2008, these

svn commit: r301081 - head/sys/sys

2016-05-31 Thread Ed Schouten
Author: ed Date: Tue May 31 21:34:02 2016 New Revision: 301081 URL: https://svnweb.freebsd.org/changeset/base/301081 Log: Make RLIM_INFINITY usable without including . By using __uint64_t instead of uint64_t, this constant can also be used if is included on its own. Modified: head/sys

svn commit: r301074 - head/sys/sys

2016-05-31 Thread Ed Schouten
Author: ed Date: Tue May 31 19:24:32 2016 New Revision: 301074 URL: https://svnweb.freebsd.org/changeset/base/301074 Log: Add missing dependency on . The SHMLBA definition provided by this header file is defined as PAGE_SIZE. PAGE_SIZE is only available when is included. Modified: h

svn commit: r301066 - in head: include lib/libc/db/hash lib/libc/db/man

2016-05-31 Thread Ed Schouten
Author: ed Date: Tue May 31 18:32:57 2016 New Revision: 301066 URL: https://svnweb.freebsd.org/changeset/base/301066 Log: Fix prototype of dbm_open(). The last argument of dbm_open() should be a mode_t according to POSIX; not an int. Reviewed by: pfg, kib Differential Revision:

Re: svn commit: r300999 - in head: include lib/libc/db/man

2016-05-31 Thread Ed Schouten
.freebsd.org/D6660 If anyone wants to share their thoughts on the proposed change, feel free to leave a comment. I'll hold off for a couple of days before submitting. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 __

svn commit: r301038 - head/sys/sys

2016-05-31 Thread Ed Schouten
Author: ed Date: Tue May 31 13:32:33 2016 New Revision: 301038 URL: https://svnweb.freebsd.org/changeset/base/301038 Log: Make CMSG_*() work without having NULL available. The is not supposed to declare NULL, according to POSIX. Our implementation complies with that, meaning that we need

svn commit: r301037 - head/sys/x86/include

2016-05-31 Thread Ed Schouten
Author: ed Date: Tue May 31 13:31:19 2016 New Revision: 301037 URL: https://svnweb.freebsd.org/changeset/base/301037 Log: Implement _ALIGN() using internal integer types. The existing version depends on register_t and uintptr_t, which are only available when including headers such as . As

svn commit: r301035 - head/include

2016-05-31 Thread Ed Schouten
Author: ed Date: Tue May 31 12:29:21 2016 New Revision: 301035 URL: https://svnweb.freebsd.org/changeset/base/301035 Log: Make strfmon_l() work without requiring the use of . The strfmon_l() function provided by is also part of POSIX 2008's , so it should be exposed by default. Chan

svn commit: r301030 - head/sys/x86/include

2016-05-31 Thread Ed Schouten
Author: ed Date: Tue May 31 08:38:24 2016 New Revision: 301030 URL: https://svnweb.freebsd.org/changeset/base/301030 Log: Add missing dependency on . In r227474, this header file was changed to define SIG_ATOMIC_{MIN,MAX} in terms of LONG_{MIN,MAX}. Unlike all of the definitions in this h

svn commit: r301029 - head/sys/x86/include

2016-05-31 Thread Ed Schouten
Author: ed Date: Tue May 31 08:36:39 2016 New Revision: 301029 URL: https://svnweb.freebsd.org/changeset/base/301029 Log: Add missing dependency on . This header uses __INT_MIN and __INT_MAX, which is provided by . This is needed to make 's WCHAR_MIN and WCHAR_MAX work without including

svn commit: r301026 - head/sys/sys

2016-05-31 Thread Ed Schouten
Author: ed Date: Tue May 31 08:07:40 2016 New Revision: 301026 URL: https://svnweb.freebsd.org/changeset/base/301026 Log: Let define struct timespec. POSIX 2004 doesn't require that this header defines struct timespec, but does allow it. For FreeBSD, we would at least need a forward decl

svn commit: r301024 - head/sbin/swapon

2016-05-30 Thread Ed Schouten
Author: ed Date: Tue May 31 06:45:19 2016 New Revision: 301024 URL: https://svnweb.freebsd.org/changeset/base/301024 Log: Stop using the non-standard basename_r() function. This change makes the code use the POSIX basename() function. It has the advantage that (if implemented correctly),

Re: svn commit: r300998 - head/include

2016-05-30 Thread Ed Schouten
ated tests of POSIX header file conformance and this just happened to pop up. Do you want me to MFC it? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/ma

svn commit: r300999 - in head: include lib/libc/db/man

2016-05-30 Thread Ed Schouten
Author: ed Date: Mon May 30 16:52:23 2016 New Revision: 300999 URL: https://svnweb.freebsd.org/changeset/base/300999 Log: Let dbm's datum::dptr use the right type. According to POSIX, it should use void *, not char *. Unfortunately, the dsize field also has the wrong type. It should be si

svn commit: r300998 - head/include

2016-05-30 Thread Ed Schouten
Author: ed Date: Mon May 30 16:26:34 2016 New Revision: 300998 URL: https://svnweb.freebsd.org/changeset/base/300998 Log: Add missing va_list to . It looks like va_list should always be defined when XSI is enabled. It moved over to the POSIX base in the 2008 edition. Modified: head/inc

svn commit: r300997 - in head: include lib/libc/gen

2016-05-30 Thread Ed Schouten
Author: ed Date: Mon May 30 13:51:27 2016 New Revision: 300997 URL: https://svnweb.freebsd.org/changeset/base/300997 Log: Fix the signature of the psignal() function. POSIX 2008 added the psignal() function which has already been part of the BSDs for a long time. The only difference is, t

svn commit: r300996 - head/include

2016-05-30 Thread Ed Schouten
Author: ed Date: Mon May 30 13:37:11 2016 New Revision: 300996 URL: https://svnweb.freebsd.org/changeset/base/300996 Log: Add missing types and constants to . According to POSIX, the netdb.h header must also provide in_addr_t and in_port_t. It should also provide IPPORT_RESERVED. Copy ove

svn commit: r300991 - head/sys/sys

2016-05-30 Thread Ed Schouten
Author: ed Date: Mon May 30 09:18:12 2016 New Revision: 300991 URL: https://svnweb.freebsd.org/changeset/base/300991 Log: Add missing restrict keywords to lio_listio(). Modified: head/sys/sys/aio.h Modified: head/sys/sys/aio.h =

svn commit: r300986 - head/include

2016-05-30 Thread Ed Schouten
Author: ed Date: Mon May 30 07:50:57 2016 New Revision: 300986 URL: https://svnweb.freebsd.org/changeset/base/300986 Log: Add missing declaration of ino_t. POSIX requires that provides ino_t in the XSI case. In our case, this wasn't being exposed, as d_ino is a macro that expands to d_

svn commit: r300960 - head/contrib/binutils/include

2016-05-29 Thread Ed Schouten
Author: ed Date: Sun May 29 16:10:01 2016 New Revision: 300960 URL: https://svnweb.freebsd.org/changeset/base/300960 Log: Replace local prototype of basename() with an inclusion of . libiberty currently defines the prototype for basename() itself instead of using . It still uses the BSD-s

svn commit: r300955 - head/include

2016-05-29 Thread Ed Schouten
Author: ed Date: Sun May 29 12:21:54 2016 New Revision: 300955 URL: https://svnweb.freebsd.org/changeset/base/300955 Log: Fix style of the libgen.h header. - Remove unneeded declarations of removed/unimplemented features. - Add missing tab after #define. - Add missing ! before trailing

svn commit: r300952 - head/usr.sbin/services_mkdb

2016-05-29 Thread Ed Schouten
Author: ed Date: Sun May 29 10:41:27 2016 New Revision: 300952 URL: https://svnweb.freebsd.org/changeset/base/300952 Log: Invoke the dirname() function in a POSIX compliant way. POSIX requires that the argument of dirname() is of type "char *". In other words, the input buffer can be modi

Re: svn commit: r300935 - head/usr.sbin/rpc.statd

2016-05-29 Thread Ed Schouten
tely no meaning. Also, as we already live in the year 2016, please use the following construct in case you really want to mark this function as no-return: #include static noreturn void usage(void) { ... } In public header files where you likely don't want to pollute the namespace, use

Re: svn commit: r300824 - head/lib/libmd

2016-05-27 Thread Ed Schouten
ret C code as C++. We have quite a lot of public header files that contain static inline functions that also work well in C++ mode. is a good example. > Your proposed macro seems ok, although it is pretty long for where it > would be used. Maybe __min_size()? Sure! -- Ed Schouten Nuxi,

Re: svn commit: r300824 - head/lib/libmd

2016-05-26 Thread Ed Schouten
(n) static (n) #endif That way we can annotate this everwhere we'd want, without needing to care about compiler versions, languages, etc. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src-head@freebsd.or

svn commit: r300775 - head/lib/libc/stdlib

2016-05-26 Thread Ed Schouten
Author: ed Date: Thu May 26 20:55:15 2016 New Revision: 300775 URL: https://svnweb.freebsd.org/changeset/base/300775 Log: Let l64a() properly null terminate its result. Though the buffer used by l64a() is initialized with null bytes, repetetive calls may end up having trailing garbage of

svn commit: r300741 - head/usr.bin/ar

2016-05-26 Thread Ed Schouten
Author: ed Date: Thu May 26 13:49:40 2016 New Revision: 300741 URL: https://svnweb.freebsd.org/changeset/base/300741 Log: Make code compile when basename() is POSIX compliant. In addition to the previous change I made to ar.c, pull in another basename() related fix. This change is similar

Re: svn commit: r300731 - head/sys/netinet

2016-05-26 Thread Ed Schouten
g to it as a "bit-slice sorter algorithm"? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubsc

svn commit: r300669 - head/usr.sbin/pmcstat

2016-05-25 Thread Ed Schouten
Author: ed Date: Wed May 25 08:45:03 2016 New Revision: 300669 URL: https://svnweb.freebsd.org/changeset/base/300669 Log: Make code compile when basename() is POSIX compliant. The POSIX basename() function is allowed to modify its input buffer, which means its argument is "char *". Pull a

Re: svn commit: r300322 - head/bin/ed

2016-05-20 Thread Ed Schouten
arc4random_buf() on pvec, right? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to &q

Re: svn commit: r300301 - head/contrib/gcc

2016-05-20 Thread Ed Schouten
Hi Pedro, 2016-05-20 16:36 GMT+02:00 Pedro F. Giffuni : > + tree anon = NULL_TREE; This initialization shouldn't be needed, right? The value is always assigned before used. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-

svn commit: r300227 - head/usr.bin/ar

2016-05-19 Thread Ed Schouten
Author: ed Date: Thu May 19 20:03:01 2016 New Revision: 300227 URL: https://svnweb.freebsd.org/changeset/base/300227 Log: Make code compile when basename() is POSIX compliant. If basename() uses "char *", we shouldn't do the intermediate assignment, as that field is of type "const char *"

svn commit: r298876 - in head: lib/libutil sbin/hastd usr.bin/newgrp

2016-05-01 Thread Ed Schouten
Author: ed Date: Sun May 1 08:22:11 2016 New Revision: 298876 URL: https://svnweb.freebsd.org/changeset/base/298876 Log: Remove useless calls to basename(). There are a couple of places in the source three where we call basename() on constant strings. This is bad, because the prototype

svn commit: r298624 - head/usr.sbin/bsdinstall/partedit

2016-04-26 Thread Ed Schouten
Author: ed Date: Tue Apr 26 10:04:06 2016 New Revision: 298624 URL: https://svnweb.freebsd.org/changeset/base/298624 Log: Remove unportable calls to basename(). The POSIX version of basename() doesn't use a 'const char *' argument; the function may overwrite its input buffer. Instead of c

Re: svn commit: r297602 - in head: sys/sys usr.bin/sed

2016-04-06 Thread Ed Schouten
2016-04-06 2:55 GMT+02:00 Pedro F. Giffuni : > Fix sed functions 'i' and 'a' from discarding leading white space. Thank you! -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src-head@fr

svn commit: r297613 - in head/sys: amd64/cloudabi64 arm64/cloudabi64 compat/cloudabi64 contrib/cloudabi

2016-04-06 Thread Ed Schouten
Author: ed Date: Wed Apr 6 11:11:31 2016 New Revision: 297613 URL: https://svnweb.freebsd.org/changeset/base/297613 Log: Make CloudABI's way of doing TLS more friendly to userspace emulators. We're currently seeing how hard it would be to run CloudABI binaries on operating systems cannot

svn commit: r297470 - in head/sys: amd64/cloudabi64 arm64/cloudabi64 compat/cloudabi64

2016-03-31 Thread Ed Schouten
Author: ed Date: Thu Mar 31 18:52:00 2016 New Revision: 297470 URL: https://svnweb.freebsd.org/changeset/base/297470 Log: Make Position Independent Executables work for CloudABI. - Set BI_CAN_EXEC_DYN, so we can execute ET_DYN ELF files in addition to regular ET_EXECs. - Provide an AT

svn commit: r297469 - head/sys/compat/cloudabi64

2016-03-31 Thread Ed Schouten
Author: ed Date: Thu Mar 31 18:50:52 2016 New Revision: 297469 URL: https://svnweb.freebsd.org/changeset/base/297469 Log: Regenerate system call table after r297468. Modified: head/sys/compat/cloudabi64/cloudabi64_proto.h head/sys/compat/cloudabi64/cloudabi64_syscall.h head/sys/compat/clo

svn commit: r297468 - in head/sys: compat/cloudabi compat/cloudabi64 contrib/cloudabi

2016-03-31 Thread Ed Schouten
Author: ed Date: Thu Mar 31 18:50:06 2016 New Revision: 297468 URL: https://svnweb.freebsd.org/changeset/base/297468 Log: Sync in the latest CloudABI system call definitions. Some time ago I made a change to merge together the memory scope definitions used by mmap (MAP_{PRIVATE,SHARED}) a

svn commit: r297253 - head/sys/compat/cloudabi64

2016-03-24 Thread Ed Schouten
Author: ed Date: Thu Mar 24 21:49:39 2016 New Revision: 297253 URL: https://svnweb.freebsd.org/changeset/base/297253 Log: Regenerate system call table after r297247. Modified: head/sys/compat/cloudabi64/cloudabi64_proto.h head/sys/compat/cloudabi64/cloudabi64_syscall.h head/sys/compat/clo

svn commit: r297252 - head/sys/contrib/cloudabi

2016-03-24 Thread Ed Schouten
Author: ed Date: Thu Mar 24 21:48:41 2016 New Revision: 297252 URL: https://svnweb.freebsd.org/changeset/base/297252 Log: Turn on $FreeBSD$ keyword expansion to the system call table. Modified: Directory Properties: head/sys/contrib/cloudabi/syscalls.master (props changed) _

svn commit: r297247 - in head: lib/libsysdecode sys/compat/cloudabi sys/compat/cloudabi64 sys/contrib/cloudabi usr.bin/truss

2016-03-24 Thread Ed Schouten
Author: ed Date: Thu Mar 24 21:47:15 2016 New Revision: 297247 URL: https://svnweb.freebsd.org/changeset/base/297247 Log: Replace the CloudABI system call table by a machine generated version. The type definitions and constants that were used by COMPAT_CLOUDABI64 are a literal copy of som

svn commit: r296092 - head/sys/kern

2016-02-26 Thread Ed Schouten
Author: ed Date: Fri Feb 26 12:46:34 2016 New Revision: 296092 URL: https://svnweb.freebsd.org/changeset/base/296092 Log: Remove the errno argument from unp_drop(). While there, add a comment to clarify that ECONNRESET should always be returned for POSIX conformance. Suggested by: St

Re: svn commit: r295974 - head/sys/kern

2016-02-24 Thread Ed Schouten
NRESET unconditionally, meaning we can simplify the code a bit. What do you think of the following patch? http://80386.nl/pub/20160224-socket-econnreset.txt Thanks, -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ s

svn commit: r295974 - head/sys/kern

2016-02-24 Thread Ed Schouten
Author: ed Date: Wed Feb 24 17:10:32 2016 New Revision: 295974 URL: https://svnweb.freebsd.org/changeset/base/295974 Log: Make asynchronous connection failures on UNIX sockets fail with ECONNRESET. While making CloudABI work well on Linux, I discovered that I had a FreeBSD-ism in one of m

svn commit: r295965 - head/sys/compat/cloudabi

2016-02-24 Thread Ed Schouten
Author: ed Date: Wed Feb 24 10:54:26 2016 New Revision: 295965 URL: https://svnweb.freebsd.org/changeset/base/295965 Log: Call cap_rights_init() properly. Even though or'ing the individual rights works in this specific case, it may not work in general. Pass them in as varargs. Modified:

svn commit: r295917 - head/sys/compat/cloudabi

2016-02-23 Thread Ed Schouten
Author: ed Date: Tue Feb 23 09:22:00 2016 New Revision: 295917 URL: https://svnweb.freebsd.org/changeset/base/295917 Log: Make handling of mmap()'s prot argument more strict. - Make the system call fail if prot contains bits other than read, write and exec. - Similar to OpenBSD's W^X,

svn commit: r293879 - head/lib/libc/stdlib

2016-01-13 Thread Ed Schouten
Author: ed Date: Thu Jan 14 07:27:42 2016 New Revision: 293879 URL: https://svnweb.freebsd.org/changeset/base/293879 Log: Remove an unneeded assignment of the return value. tdelete() is supposed to return the address of the parent node that has been deleted. We already keep track of this

svn commit: r292767 - in head: include lib/libc/stdlib

2015-12-26 Thread Ed Schouten
Author: ed Date: Sun Dec 27 07:50:11 2015 New Revision: 292767 URL: https://svnweb.freebsd.org/changeset/base/292767 Log: Replace implementation of hsearch() by one that scales. Traditionally the hcreate() function creates a hash table that uses chaining, using a fixed user-provided size.

Re: svn commit: r292723 - in head: lib/libc share/mk

2015-12-26 Thread Ed Schouten
lems... Well, they're both equally simple, right? An empty .a file is only a couple of bytes in size, likely not larger than a symlink. But I'm digressing. Thanks, -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 __

Re: svn commit: r292723 - in head: lib/libc share/mk

2015-12-25 Thread Ed Schouten
an empty .a file instead? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "

svn commit: r292613 - in head: include lib/libc/stdlib lib/libc/tests/stdlib

2015-12-22 Thread Ed Schouten
Author: ed Date: Tue Dec 22 18:12:11 2015 New Revision: 292613 URL: https://svnweb.freebsd.org/changeset/base/292613 Log: Let tsearch()/tdelete() use an AVL tree. The existing implementations of POSIX tsearch() and tdelete() don't attempt to perform any balancing at all. Testing reveals t

svn commit: r290186 - head/usr.bin/truss

2015-10-30 Thread Ed Schouten
Author: ed Date: Fri Oct 30 08:11:37 2015 New Revision: 290186 URL: https://svnweb.freebsd.org/changeset/base/290186 Log: Make truss work for CloudABI processes on aarch64. This change copies over amd64-cloudabi64.c to aarch64-cloudabi.c and adjusts it to fetch the proper registers on aar

svn commit: r289752 - in head: share/man/man4 sys/arm64/cloudabi64 sys/conf sys/modules

2015-10-22 Thread Ed Schouten
Author: ed Date: Thu Oct 22 11:09:25 2015 New Revision: 289752 URL: https://svnweb.freebsd.org/changeset/base/289752 Log: Add support for CloudABI on ARM64. It turns out that it is pretty easy to make CloudABI work on ARM64. We essentially only need to copy over the sysvec from AMD64 and

svn commit: r289748 - in head/sys: kern sys

2015-10-22 Thread Ed Schouten
Author: ed Date: Thu Oct 22 09:33:34 2015 New Revision: 289748 URL: https://svnweb.freebsd.org/changeset/base/289748 Log: Add a way to distinguish between forking and thread creation in schedtail. For CloudABI we need to initialize the registers of new threads differently based on whether

svn commit: r289747 - in head/sys: amd64/cloudabi64 compat/cloudabi64 conf modules/cloudabi64

2015-10-22 Thread Ed Schouten
Author: ed Date: Thu Oct 22 09:07:53 2015 New Revision: 289747 URL: https://svnweb.freebsd.org/changeset/base/289747 Log: Refactoring: move out generic bits from cloudabi64_sysvec.c. In order to make it easier to support CloudABI on ARM64, move out all of the bits from the AMD64 cloudabi_

svn commit: r289706 - head/sys/sys

2015-10-21 Thread Ed Schouten
Author: ed Date: Wed Oct 21 16:32:01 2015 New Revision: 289706 URL: https://svnweb.freebsd.org/changeset/base/289706 Log: Add missing forward declaration of struct image_params. Modified: head/sys/sys/imgact_elf.h Modified: head/sys/sys/imgact_elf.h ==

svn commit: r289417 - head/sys/modules/cloudabi64

2015-10-16 Thread Ed Schouten
Author: ed Date: Fri Oct 16 10:26:15 2015 New Revision: 289417 URL: https://svnweb.freebsd.org/changeset/base/289417 Log: Use the right variable name. MACHINE_CPUARCH expands to aarch64 for arm64, whereas MACHINE always corresponds to the directory name under sys/ that contains the source

svn commit: r289373 - head/sys/arm64/arm64

2015-10-15 Thread Ed Schouten
Author: ed Date: Thu Oct 15 17:50:28 2015 New Revision: 289373 URL: https://svnweb.freebsd.org/changeset/base/289373 Log: Properly set the return value for casueword to 0 upon success. While trying to get multithreading working for CloudABI on aarch64, I noticed that compare-and-exchange

svn commit: r289004 - in head: sys/compat/cloudabi usr.bin/truss

2015-10-07 Thread Ed Schouten
Author: ed Date: Thu Oct 8 05:27:45 2015 New Revision: 289004 URL: https://svnweb.freebsd.org/changeset/base/289004 Log: Properly format pointer size independent CloudABI system calls. CloudABI has approximately 50 system calls that do not depend on the pointer size of the system. As the

svn commit: r288487 - head/usr.bin/truss

2015-10-02 Thread Ed Schouten
Author: ed Date: Fri Oct 2 11:17:15 2015 New Revision: 288487 URL: https://svnweb.freebsd.org/changeset/base/288487 Log: Make truss print CloudABI system call names. This change adds the bits that are necessary to fetch system call arguments and return values from trapframes for CloudABI

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-30 Thread Ed Schouten
far as to say that GCC/Clang should just throw warnings if _Noreturn is used on a function that is static or used on a definition instead of a declaration. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src-head@

svn commit: r287209 - in head: share/man/man4 sys/compat/cloudabi sys/kern sys/sys usr.bin/procstat

2015-08-27 Thread Ed Schouten
Author: ed Date: Thu Aug 27 15:16:41 2015 New Revision: 287209 URL: https://svnweb.freebsd.org/changeset/base/287209 Log: Decompose linkat()/renameat() rights to source and target. To make it easier to understand how Capsicum interacts with linkat() and renameat(), rename the rights to CA

svn commit: r287125 - head/lib/libc/locale

2015-08-25 Thread Ed Schouten
Author: ed Date: Tue Aug 25 09:16:09 2015 New Revision: 287125 URL: https://svnweb.freebsd.org/changeset/base/287125 Log: Make UTF-8 parsing and generation more strict. - in mbrtowc() we need to disallow codepoints above 0x10. - In wcrtomb() we need to disallow codepoints between 0xd8

svn commit: r287098 - head/sys/teken

2015-08-24 Thread Ed Schouten
Author: ed Date: Mon Aug 24 07:49:27 2015 New Revision: 287098 URL: https://svnweb.freebsd.org/changeset/base/287098 Log: Sync HPA and VPA implementations with CUP. After fixing the 16-bits integer arithmetic overflow in 286981, we should also make sure to fix the VPA sequence. Bring HPA

Re: svn commit: r286170 - head/share/man/man9

2015-08-20 Thread Ed Schouten
ot;-std=iso9899:1999" according to "conf/kern.mk:CFLAGS" in -current. So > technically it shouldn't work, and it throws up compile errors with certain > other C tools I'm using at work which are more strict than clang. In practice it does. --

svn commit: r286981 - head/sys/teken

2015-08-20 Thread Ed Schouten
Author: ed Date: Fri Aug 21 06:30:13 2015 New Revision: 286981 URL: https://svnweb.freebsd.org/changeset/base/286981 Log: Don't truncate cursor arithmetic to 16 bits. When updating the row number when the cursor position escape sequence is issued, we should make sure to store the intermed

svn commit: r286844 - head/sys/compat/cloudabi

2015-08-17 Thread Ed Schouten
Author: ed Date: Mon Aug 17 13:07:12 2015 New Revision: 286844 URL: https://svnweb.freebsd.org/changeset/base/286844 Log: Don't forget to invoke pre_execve() and post_execve(). CloudABI's proc_exec() was implemented before r282708 introduced pre_execve() and post_execve(). Sync up by addi

svn commit: r286827 - head/sys/teken

2015-08-16 Thread Ed Schouten
Author: ed Date: Sun Aug 16 13:59:11 2015 New Revision: 286827 URL: https://svnweb.freebsd.org/changeset/base/286827 Log: Pick UINT_MAX / 100 as an upperbound. The fix that I applied in r286798 is already good, but it assumes that sizeof(int) > sizeof(short). Express the upperbound in ter

svn commit: r286798 - head/sys/teken

2015-08-15 Thread Ed Schouten
Author: ed Date: Sat Aug 15 08:42:33 2015 New Revision: 286798 URL: https://svnweb.freebsd.org/changeset/base/286798 Log: Stop parsing digits if the value already exceeds USHRT_MAX. There is no need for us to support parsing values that are larger than the maximum terminal window size. In

svn commit: r286797 - head/sys/teken/demo

2015-08-15 Thread Ed Schouten
Author: ed Date: Sat Aug 15 08:29:13 2015 New Revision: 286797 URL: https://svnweb.freebsd.org/changeset/base/286797 Log: Add missing 'static' keyword to keep build at WARNS=6 happy. MFC after:1 month Modified: head/sys/teken/demo/teken_demo.c Modified: head/sys/teken/demo/teken_dem

Re: svn commit: r286667 - in head/sys: amd64/amd64 conf dev/vt/hw/efifb dev/vt/hw/vga i386/i386 x86/include x86/x86

2015-08-12 Thread Ed Schouten
2015-08-12 22:02 GMT+02:00 Marcel Moolenaar : > Maybe upgrading to 4.3.30 resolves the issue? I just upgraded to 4.3.30 and 5.0.0. Both fail the same way. I've just attached a screenshot. Will open a bug. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-

svn commit: r286681 - head/sys/kern

2015-08-12 Thread Ed Schouten
Author: ed Date: Wed Aug 12 17:46:26 2015 New Revision: 286681 URL: https://svnweb.freebsd.org/changeset/base/286681 Log: Perform cleanups in response to D3307. - Document the kern_kevent_anonymous() function. - Add assertions to ensure that we don't silently leave the kqueue linked f

svn commit: r286680 - head/sys/compat/cloudabi64

2015-08-12 Thread Ed Schouten
Author: ed Date: Wed Aug 12 17:42:20 2015 New Revision: 286680 URL: https://svnweb.freebsd.org/changeset/base/286680 Log: Add the last remaining system calls: send() and recv(). There is still one TODO item for these calls: add file descriptor passing. The data structures are already prep

<    1   2   3   4   5   6   7   8   9   10   >