summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* MFC r258283 - move iconv* symbols out of libc.so.7 namespace withpeter2013-11-201-6/+1
| | | | | | compatibility symbols to aid transition for existing 10.x installs. Approved by: re (kib)
* MFC r257583, r258012, r258013:gjb2013-11-162-28/+1
| | | | | | | | | | | | | | | | | | | r257583 (peter): Remove the WITH_LIBICONV_COMPAT hack that seems to do more harm than good. This caused libc to spoof the ports libiconv namespace and provide a colliding libiconv.so.3 to fool rtld. This should have been removed some time ago. r258012: Remove WITH_LIBICONV_COMPAT file to chase after r257583. r258013: Regenerate src.conf.5 after removal of WITH_LIBICONV_COMPAT. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Sponsored by: The FreeBSD Foundation
* MFC r256925:tijl2013-10-251-0/+1
| | | | | | | | | | | Add a dummy statement to the beginning of the pthread_cleanup_pop() macro to allow a call of the macro to be labelled as in: label: pthread_cleanup_pop(); Reviewed by: imp Approved by: re (glebius)
* Set proper permissions on the generated osreldate.h file; a file readableian2013-09-301-0/+1
| | | | | | | only by root can cause install problems, especially over nfs. Submitted by: jilles@ Approved by: re (gjb)
* Remove BIND.des2013-09-301-5/+0
| | | | Approved by: re (gjb)
* Allow the path to the system source directory to be passed in toian2013-09-281-2/+4
| | | | | | | | | | | | | | | | newvers.sh. Pass it in from include/Makefile. If it isn't passed in, fall back to the old logic of using dirname $0. Using dirname $0 does not yield the path to the script if it was sourced in from another script in another directory; you end up with the parent script's path. That was causing newvers.sh to look one level below the FreeBSD src/ directory when building osreldate.h and it may find something like a git or svn repo there that has nothing to do with FreeBSD. PR: 174422 Approved by: re () MFC after: 2 weeks
* Prevent the set -e from mk-osreldate.sh from propagating into newvers.sh.nwhitehorn2013-09-281-1/+3
| | | | | | | | | This would cause detection of old versions of SVN to cause fatal errors instead of being caught and handled, which would make the build fail if the tree had been checked out with an older version of SVN (e.g. 1.6). Discussed with: gjb Approved by: re (marius)
* Launch the bourne shell using "sh" rather than "${SHELL}", as the latterian2013-09-231-1/+1
| | | | | | | | | | may come in from the environment and reflect the user's interactive shell. Using bare "sh" is the dominant pattern in existing makefiles. MFC this together with r255775. Approved by: re () MFC after: 2 weeks
* Launch the shell, passing it the path to the mk-osreldate script, ratherian2013-09-221-1/+1
| | | | | | | | | | than launching the script directly and relying on #! to launch the shell. This avoids problems when the source is mounted with the noexec flag. MFC this together with r255775. Approved by: re (kib) MFC after: 2 weeks
* Create a separate script to generate osreldate.h rather than sourcingian2013-09-212-13/+59
| | | | | | | | | | | | | | | | | newvers.sh into a temporary subshell with inline make rules. Using a separate script fixes a variety of problems, including establishing the correct dependencies in the makefiles. It also eliminates a problem with the way newvers.sh uses `realpath $0`, because $0 expands differently within a script sourced into a rule in a makefile depending on the version of make and of /bin/sh being used. The latter can cause build breakage in a cross-build environment, and can also make it difficult to compile 10.0 on older pre-10.0 systems. PR: 160646 174422 Submitted by: Garrett Cooper <yaneurabeya@gmail.com> Approved by: re (gjb) MFC after: 2 weeks
* Assume that the -f argument is /dev/gpioc0 if it is not passed.sbruno2013-09-171-0/+1
| | | | | | | | hrs@ provided this verison of the patch and showed me where all the needed changes were to be made outside of gpioctl.c Approved by: re (hrs) MFC after: 2 weeks
* Fix the namespace pollution caused by iconv.h including stdbool.htheraven2013-09-061-2/+8
| | | | | This broke any C89 ports that defined bool themselves, including things like gcc, gtk, and so on.
* Implement fdclosedir(3) function, which is equivalent to the closedir(3)pjd2013-08-181-0/+1
| | | | | | | function, but returns directory file descriptor instead of closing it. Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org> Sponsored by: Google Summer of Code 2013
* Add dup3(), based on F_DUP2FD and F_DUP2FD_CLOEXEC fcntls.jilles2013-08-161-0/+1
| | | | | | | | I removed functionality not proposed for POSIX in Austin group issue #411. A man page (my own) and test cases will follow in later commits. PR: 176233 Submitted by: Jukka Ukkonen
* The iconv in libc did two things - implement the standard APIs, the GNUpeter2013-08-132-19/+40
| | | | | | | | | | | | | | | | | | | | | | | | extensions and also tried to be link time compatible with ports libiconv. This splits that functionality and enables the parts that shouldn't interfere with the port by default. WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc. WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker symbols and even a stub libiconv.so.3 that are good enough to be able to 'pkg delete -f libiconv' on a running system and reasonably expect it to work. I have tortured many machines over the last few days to try and reduce the possibilities of foot-shooting as much as I can. I've successfully recompiled to enable and disable the libiconv_compat modes, ports that use libiconv alongside system iconv etc. If you don't enable the WITH_LIBICONV_COMPAT switch, they don't share symbol space. This is an extension of behavior on other system. iconv(3) is a standard libc interface and libiconv port expects to be able to run alongside it on systems that have it. Bumped osreldate.
* Add mkostemp() and mkostemps().jilles2013-08-091-0/+2
| | | | | These are like mkstemp() and mkstemps() but allow passing open(2) flags like O_CLOEXEC.
* stdlib.h: Add correct POSIX version for POSIX extensions to C.jilles2013-07-051-6/+8
|
* 1) POSIX requires rand(3) return values to be in the [0, RAND_MAX] range,ache2013-07-031-1/+1
| | | | | | | | | | | | | | | | but ACM formula we use have internal state (and return value) in the [1, 0x7ffffffe] range, so our RAND_MAX (0x7fffffff) is never reached because it is off by one, zero is not reached too. Correct both RAND_MAX and rand(3) return value, shifting last one to the 0 by 1 subtracted, resulting POSIXed [0, 0x7ffffffd(=new RAND_MAX)] range. 2) Add a checks for not overflowing on too big seeds. It may happens on the machines, where sizeof(unsigned int) > 32 bits. Reviewed by: bde [1] MFC after: 2 weeks
* Replace the #define for "iconv" so it is for the function name instead ofpeter2013-07-031-3/+3
| | | | | | a macro with parameters. Remove a __DECONST hack and add consts instead for gnu libiconv API compatability. This makes it work with things like devel/boost-libs that expects to use "iconv" as though it were a pointer.
* Fix gssapi/gssapi_krb5.h after Heimdal 1.5.1 import.hrs2013-06-301-0/+27
| | | | Reviewed by: dfr
* - Trim an unused and bogus Makefile for mount_smbfs.davide2013-06-281-2/+3
| | | | | | - Reconnect with some minor modifications, in particular now selsocket() internals are adapted to use sbintime units after recent'ish calloutng switch.
* - Add vnode-backed swap space specification support. This is enabled whenhrs2013-06-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device names "md" or "md[0-9]*" and a "file" option are specified in /etc/fstab like this: md none swap sw,file=/swap.bin 0 0 - Add GBDE/GELI encrypted swap space specification support, which rc.d/encswap supported. The /etc/fstab lines are like the following: /dev/ada1p1.bde none swap sw 0 0 /dev/ada1p2.eli none swap sw 0 0 .eli devices accepts aalgo, ealgo, keylen, and sectorsize as options. swapctl(8) can understand an encrypted device in the command line like this: # swapctl -a /dev/ada2p1.bde - "-L" flag is added to support "late" option to defer swapon until rc.d/mountlate runs. - rc.d script change: rc.d/encswap -> removed rc.d/addswap -> just display a warning message if $swapfile is defined rc.d/swap1 -> renamed to rc.d/swap rc.d/swaplate -> newly added to support "late" option These changes alleviate a race condition between device creation/removal and swapon/swapoff. MFC after: 1 week Reviewed by: wblock (manual page)
* Move <stdatomic.h> into sys/sys/.ed2013-06-012-328/+3
| | | | | This will allow us to use C11 atomics in kernelspace, although it will need to be included as <sys/stdatomic.h>.
* Fix misspelling of structure field name.ed2013-05-311-1/+1
|
* I'm happy to finally commit stephen@'s implementations of cacos,das2013-05-301-0/+12
| | | | | | | | cacosh, casin, casinh, catan, and catanh. Thanks to stephen@ and bde@ for working on these. Submitted by: stephen@ Reviewed by: bde
* Make the malloc(3) family of functions weak and make their non-weakmarcel2013-05-251-0/+12
| | | | | | | | | | | | | | implementations visible for use by applications. The functions $F that are now weak symbols are: allocm, calloc, dallocm, free, malloc, malloc_usable_size, nallocm, posix_memalign, rallocm, realloc, sallocm The non-weak implementations of $F are exported as __$F. Submitted by: stevek@juniper.net Reviewed by: jasone@, kib@ Approved by: jasone@ (jemalloc) Obtained from: juniper Networks, Inc
* Add C11 macros CMPLX(), CMPLXF() and CMPLXL().ed2013-05-251-0/+12
| | | | | | Clang allows us to initialize complex numbers using an array initializer, casted to a complex type. GCC has a builtin called __builtin_complex().
* Fix <uchar.h> in for C++11.ed2013-05-251-3/+10
| | | | | | | | | | | It turns out that in C++11, char16_t and char32_t are built-in types; language keywords. Just fix this by putting traditional _*_T_DECLARED blocks around the definitions. We'll just predefine these in <sys/_types.h>. This also opens up the possibility to define char16_t in other header files, if ever needed (e.g. if we would gain a <ctype.h> for char16_t/char32_t).
* Add proper prerequisites for even two more headers.ed2013-05-211-1/+3
| | | | Spotted by: http://hacks.owlfolio.org/header-survey/
* Allow certain headers to be included more easily.ed2013-05-213-9/+13
| | | | Spotted by: http://hacks.owlfolio.org/header-survey/
* Add <uchar.h>.ed2013-05-215-4/+108
| | | | | | | | | | | | The <uchar.h> header, part of C11, adds a small number of utility functions for 16/32-bit "universal" characters, which may or may not be UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight wrappers around wcrtomb() and mbrtowc(). While there, also add (non-yet-standard) _l functions, similar to the ones we already have for the other locale-dependent functions. Reviewed by: theraven
* Add pipe2() system call.jilles2013-05-011-0/+1
| | | | | | | | | | | | | The pipe2() function is similar to pipe() but allows setting FD_CLOEXEC and O_NONBLOCK (on both sides) as part of the function. If p points to two writable ints, pipe2(p, 0) is equivalent to pipe(p). If the pointer is not valid, behaviour differs: pipe2() writes into the array from the kernel like socketpair() does, while pipe() writes into the array from an architecture-specific assembler wrapper. Reviewed by: kan, kib
* Enable improved <tgmath.h> for Clang even when not using C11.ed2013-04-271-1/+2
| | | | | | | | By using __has_extension(c_generic_selections), we can explicitly test whether we're dealing with a version of Clang that supports _Generic(). That way we can use the improved <tgmath.h> code, even when not using -std=c11. This massively reduces the compilation time when invoking these functions.
* - sl_find does not modify 'name'eadler2013-04-231-1/+1
| | | | | | | | - make the prototype of sl_find match NetBSD Reviewed by: jilles Approved by: cperciva (mentor) MFC After: 3 days
* - Correct mispellings of the word necessarygabor2013-04-171-1/+1
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
* Add static/const keywords to the arrays.ed2013-04-091-1/+3
| | | | | | | | | This theoretically allows a compiler to optimize (parts of) the array away if unused. While there, make the array size implicit and use a _Static_assert() to ensure that the definition matches up with the number of elements in the list.
* Add an implementation of open_memstream() and open_wmemstream(). Thesejhb2013-02-272-0/+2
| | | | | | | | | routines provide write-only stdio FILE objects that store their data in a dynamically allocated buffer. They are a string builder interface somewhat akin to a completely dynamic sbuf. Reviewed by: bde, jilles (earlier versions) MFC after: 1 month
* FreeBSD uses #if __BSD_VISIBLE to hide non-standard functions, fix this.zeising2013-02-141-1/+1
| | | | | Noticed by: kib Approved by: kib
* Add strchrnul(), a GNU function similar to strchr(), except that it returnszeising2013-02-131-0/+3
| | | | | | | a pointer to the end of the string, rather than NULL, if the character was not found. Approved by: theraven
* Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headersjhb2013-02-051-4/+21
| | | | | | in /usr/include. MFC after: 2 weeks
* Add fmemopen(3), an interface to get a FILE * from a buffer in memory, alonggahr2013-01-301-0/+1
| | | | | | | | with the respective regression test. See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html Reviewed by: cognet Approved by: cognet
* MK_* variable should be compared to "no" not "NO".brooks2013-01-251-1/+1
| | | | Submitted by: "b.f." <bf1783@googlemail.com>
* Don't install telnet.h if it will be installed by libtelnet.brooks2013-01-241-1/+6
|
* Add CLOCK_PROCESS_CPUTIME_ID to <time.h>, to synchronize the CLOCK_*dim2013-01-141-0/+1
| | | | | | | | | values with those in <sys/time.h>. Otherwise, if a program includes <time.h> before <sys/time.h>, the CLOCK_PROCESS_CPUTIME_ID macro never gets defined. Reviewed by: davidxu X-MFC-With: 239347
* Replace our implementation of the vis(3) and unvis(3) APIs withbrooks2012-12-182-92/+4
| | | | | | | | | NetBSD's. This output size limited versions of vis and unvis functions as well as a set of vis variants that allow arbitrary characters to be specified for encoding. Finally, MIME Quoted-Printable encoding as described in RFC 2045 is supported.
* Add change missed in 243245.trasz2012-11-181-0/+1
|
* Use defined() to test macro definitions.demon2012-11-141-1/+1
| | | | Approved by: theraven
* Replace our version of the pwcache(3) API with NetBSD's implementation.brooks2012-10-192-0/+8
| | | | | | | | | This adds two features: * uid_from_user() and gid_from_group() as the reverse of user_from_uid() and groups_from_gid(). * pwcache_userdb() and pwcache_groupdb() which allow alternative lookup functions to be used. For example lookups from passwd and group databases in a non-standard location.
* Disconnect non-MPSAFE SMBFS from the build in preparation for droppingattilio2012-10-181-3/+2
| | | | | | | | | | | | | GIANT from VFS. In addition, disconnect also netsmb, which is a base requirement for SMBFS. In the while SMBFS regular users can use FUSE interface and smbnetfs port to work with their SMBFS partitions. Also, there are ongoing efforts by vendor to support in-kernel smbfs, so there are good chances that it will get relinked once properly locked. This is not targeted for MFC.
* Include a piece that was left out during r241629.attilio2012-10-171-1/+1
| | | | Pointy hat to: me
OpenPOWER on IntegriCloud