summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2015-02-09Protect fgetwln(), wcslcat() and wcslcpy() with __BSD_VISIBLETodd C. Miller
OK tedu@ kettenis@
2015-02-08add restrict to strtol like functions. ok guentherTed Unangst
2015-01-21Delete option COMPAT_43: support for pre-sa_len binaries has been obsoletePhilip Guenther
for a couple decades. Keep the OSIOCGIFCONF ioctl to support COMPAT_LINUX but move the rest of the Linux-specific ioctl() handling into linux_socket.c This lets struct osockaddr finally move from sys/socket.h to protocols/talkd.h ok krw@ deraadt@ mpi@
2015-01-20increase TMP_MAX to the equivalent of INT_MAX. it's actually more,Ted Unangst
but safer not to wraparound by accident. ok deraadt millert miod
2015-01-19Make some $OpenBSD$ lines prettier/standardier by eliminatingKenneth R Westerback
superflous '*' after '/*' and adding blank after terminating '$'. Also eases parsing of the lines by simple awk scripts. Aesthetic approval from tedu@.
2015-01-18Stop including <sys/param.h> from <netdb.h>. Portable software must eitherTheo de Raadt
include <sys/param.h> (to operate in legacy mode) or if it wishes to operate in the POSIX world use <limits.h> ok guenther millert doug naddy
2015-01-17remove des.h. it somehow escaped from ssleay into /usr/include, but noneTed Unangst
of the functions prototyped here exist in libc, making it useless.
2015-01-16Since <netdb.h> soon won't include <sys/param.h>, MAXHOSTNAMELEN mayTheo de Raadt
not be in scope, so hardcode as 256. Other options have more downside.
2015-01-16Switch to including <sys/types.h> instead of <sys/param.h>Theo de Raadt
This hides the unavoidably cruddy sys/param.h namespace in some programs. Little impact, because many programs are cruddy and still get it via other includes. ports testing thanks to sthen and naddy ok guenther millert
2015-01-15we don't have an alloca() symbol anywhere in libc, don't prototype it.Ted Unangst
instead, #define to __builtin_alloca. if that doesn't work, you're hosed. from an old discussion about the perils of alloca. (don't use alloca!)
2015-01-12Add fgetwln(3) from FreeBSD and bump libc minor revision.Todd C. Miller
2014-12-20$OpenBSD for our rev herePhilip Guenther
2014-12-13claim posix 2008 compat. apparently people look at this and get scaredTed Unangst
when it's really old. but no actual ports fallout in espie's build. ok deraadt
2014-12-11update swab() to match the current posix definition. "rationale: none."Ted Unangst
rewrite the function to be simpler as well. the compiler can unroll the loop for us if necessary. ok schwarze
2014-12-08Change rand(), random(), drand48(), lrand48(), mrand48(), and srand48()Theo de Raadt
to returning strong random by default, source from arc4random(3). Parameters to the seeding functions are ignored, and the subsystems remain in strong random mode. If you wish the standardized deterministic mode, call srand_deterministic(), srandom_determistic(), srand48_deterministic(), seed48_deterministic() or lcong48_deterministic() instead. The re-entrant functions rand_r(), erand48(), nrand48(), jrand48() are unaffected by this change and remain in deterministic mode (for now). Verified as a good roadmap forward by auditing 8800 pieces of software. Roughly 60 pieces of software will need adaptation to request the deterministic mode. Violates POSIX and C89, which violate best practice in this century. ok guenther tedu millert
2014-12-08header changes for recent libc changes:Ted Unangst
add siphash delete setkey, encrypt, cfree
2014-11-21change prototype for crypt_newhash. the login_cap_t is a holdover from itsTed Unangst
pwd_gensalt origins, but a string argument works equally work and is more friendly to consumers beyond local user accounts. ok deraadt
2014-11-19prototype for crypt_newhash(). adding it here because this is whereTed Unangst
login_cap_t lives and i don't want to forward declare it in unistd.h
2014-11-17Add prototype for stravis().Todd C. Miller
2014-10-31Rename libressl to libtls to avoid confusion and to make it easier toJoel Sing
distinguish between LibreSSL (the project) and libressl (the library). Discussed with many.
2014-10-29Add prototypes for xdr_{accepted,rejected}_reply() and svcudp_enablecache()Philip Guenther
(Both NetBSD and FreeBSD provide these prototypes) ok millert@
2014-09-18Our setpgrp() is the BSD version with two args and not the XSIPhilip Guenther
version with zero args, so it should only be visible if __BSD_VISIBLE (and not also for __XPG_VISIBLE). Contrawise, readlink() has been part of base POSIX since 1995, so move to proper #if area for that. Move crypt_checkpass() to the pure-BSD section of the file. setpgrp() issue noted by Matti Karnaattu (mkarnaattu (at) gmail.com) ok millert@
2014-09-16Missed this sendmail reference in the sendmail removalMatthieu Herrb
2014-09-01Sync readlink(2) with IEEE Std 1003.1-2008.Doug Hogan
discussion, help and ok guenther@
2014-08-31Add uuid support routines to libc. From FreeBSD via NetBSD via Bitrig viaMiod Vallat
Markus Mueller.
2014-08-31setgrfile() isn't implementedPhilip Guenther
2014-08-31inet_nsap_{addr,ntoa}() were removed on 2013/12/17Philip Guenther
2014-08-31Declare and document getthrid()Philip Guenther
indirectly prodded by krw@
2014-08-31Add additional userland interfaces for setting close-on-exec on fdsPhilip Guenther
when creating them: mkostemp(), mkostemps(), the 'e' mode letter for fopen(), freopen(), fdopen(), and popen(). The close-on-exec flag will be cleared by the action created by posix_spawn_file_actions_adddup2(). Also, add support for the C11 'x' mode letter for fopen() and freopen(), setting O_EXCL when possibly creating files. Note: this requires kernel support for pipe2() and dup3()! ok millert@
2014-08-31Add additional kernel interfaces for setting close-on-exec on fdsPhilip Guenther
when creating them: pipe2(), dup3(), accept4(), MSG_CMSG_CLOEXEC, SOCK_CLOEXEC. Includes SOCK_NONBLOCK support. ok matthew@
2014-08-10Delete duplicate conditionalPhilip Guenther
diff from frantisek holop (minusf (at) obiit.org)
2014-07-18Change lsearch()'s "base" argument to require a non-const pointer toMatthew Dempsky
align with POSIX and other systems. Pointed out by Elliott Hughes on tech ok deraadt
2014-07-14international currency locale rules as per POSIX.1-2008Martin Pelikan
required for libc++ ok guenther afresh1
2014-07-14enter libressl for make includesTheo de Raadt
2014-07-12Tackle the endian.h mess. Make it so that:Philip Guenther
* you can #include <sys/endian.h> instead of <machine/endian.h>, and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first) * those will always export the symbols that POSIX specified for <endian.h>, including the new {be,le}{16,32,64}toh() set. c.f. http://austingroupbugs.net/view.php?id=162 if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h> currently exports (ntohs, NTOHS, dlg's bemtoh*, etc) * when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and <arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER and betoh* ok deraadt@
2014-07-12Welcome to 1989: assume the compiler support constPhilip Guenther
2014-07-12Per C99, wchar.h has to forward declare struct tmPhilip Guenther
2014-07-11stop installing netbt headersTed Unangst
2014-07-11make dump support DUIDs for command line arguments and /etc/dumpdates (usingAlexander Hall
the new shiny -U switch) dumpdates part originating from, and discussed with, Maximilian Fillinger seems reasonable to krw@, "get it in" deraadt@
2014-07-09Clean up after arc4random u_int32_t uint32_t changeBob Beck
ok jsing@
2014-07-08update _POSIX2_FORT_RUN, so that sysconf(_SC_2_FORT_RUN) remains correct.Ted Unangst
because you care. reminded by matthew.
2014-06-14Change return value of getentropy() to int 0 for success. MaximumTheo de Raadt
buffersize is enforced strictly, this supplies sufficient entropy payload to act as seed material. Discourage general use of this API, but lock down this function name as the go-to for userland PRNG seeding. Improve documentation. ok miod matthew
2014-06-13Add new getentropy() system call. Code and pressure from matthew.Theo de Raadt
I accepted that he's right (again) to seperate this out from heavy sysctl API and this will simply a variety of things. Functionname is not used by anyone in the ports tree, so we guess we can use it. Shocking that no application has a function called this. ok matthew & others who pushed him to start this early on
2014-06-13Add timingsafe_memcmp().Matthew Dempsky
ok deraadt, jmc, tedu
2014-05-26Can't use a variable 'c' in a standard include; rename it to '_c'Philip Guenther
ok deraadt@ millert@
2014-05-16add prototypes for new crypt functionsTed Unangst
2014-05-12these files have moved to libutilMarc Espie
2014-05-12no md5cryptTed Unangst
2014-05-12move the ohash functions into libutil by popular demand.Marc Espie
It's not a standard interface, so it doesn't belong in libc. I hate duplicating the code in client programs, so do beck@, kettenis@, schwarze@, millert@, miod@... and they agree with libutil.
2014-05-12tweak interface to do the right thing, after useful comments from millert@Marc Espie
(mostly use a calloc function to avoid potential integer overflow)