summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Diff reduction against OpenBSD: ANSI'fy prototypes.delphij2009-03-0228-485/+196
| | | | | | | | (This is part of a larger changeset which is intended to reduce diff only, thus some prototypes were left intact since they will be changed in the future). Verified with: md5(1)
* Correct types of variables used to track amount of allocated SysV sharedkib2009-03-021-0/+9
| | | | | | | | | | | | | | memory from int to size_t. Implement a workaround for current ABI not allowing to properly save size for and report more then 2Gb sized segment of shared memory. This makes it possible to use > 2 Gb shared memory segments on 64bit architectures. Please note the new BUGS section in shmctl(2) and UPDATING note for limitations of this temporal solution. Reviewed by: csjp Tested by: Nikolay Dzham <i levsha org ua> MFC after: 2 weeks
* Rewrite asprintf() as a wrapper around vasprintf(), thus reducing thedas2009-03-021-43/+22
| | | | | number of functions that have an incestuous relationship with the arcane innards of stdio.
* The argument corresponding to %zn is supposed to be an ssize_t *, notdas2009-03-022-6/+6
| | | | a size_t *, although the distinction is moot in practice.
* Use C99-style initializers. No functional change.das2009-03-011-4/+9
| | | | Reviewed by: md5(1)
* Add a missing .El.delphij2009-03-011-0/+1
|
* "-isoC-99" should be spelled without 'c'.delphij2009-03-011-1/+1
|
* Add missing POSIX 1003.1-2008 open(2) flag; O_TTY_INIT.ed2009-02-281-1/+15
| | | | | | | On FreeBSD, this is the default behaviour. According to the spec, we may give this flag a value of zero, but I'd rather not do this. If we define it to a non-zero value, we can always change default behaviour without changing the ABI. This is very unlikely to happen, though.
* Replace a dozen lines of code with a call to strnlen() / wcsnlen().das2009-02-282-33/+2
|
* Add restrict qualifiers.das2009-02-281-1/+1
| | | | I missed this file in my previous commit.
* - Add getdelim(), getline(), stpncpy(), strnlen(), wcsnlen(),das2009-02-2818-26/+689
| | | | | | | | | | | | wcscasecmp(), and wcsncasecmp(). - Make some previously non-standard extensions visible if POSIX_VISIBLE >= 200809. - Use restrict qualifiers in stpcpy(). - Declare off_t and size_t in stdio.h. - Bump __FreeBSD_version in case the new symbols (particularly getline()) cause issues with ports. Reviewed by: standards@
* Add restrict qualifiers to the parameters to strlcpy() and strlcat().das2009-02-283-4/+4
| | | | | The annotation mainly just serves as a hint that they're not intended for use with overlapping strings.
* Make sure %zd treats negative arguments properly on 32-bit platforms.das2009-02-283-5/+8
| | | | | | | Fix harmless but related bugs in %_$zd and %_$tu. PR: 131880 MFC after: 1 week
* Change USB over to make_dev() for all device nodes, previously it hooked intothompsa2009-02-275-534/+5
| | | | | | | | | | | | | | | the devfs clone handler to open the (invisible) devices on the fly. The /dev entries are layed out as follows, /dev/usbctl = master device /dev/usb/0.1.0.5 = usb device, (<bus>.<dev>.<iface>.<endpoint>) /dev/ugen0.1 -> usb/0.1.0.0 = ugen link to ctrl endpoint This also removes the custom permissions model from USB. Bump __FreeBSD_version to 800066. Submitted by: rink (earlier version)
* Fix HID_COMPAT7 handling around the USB_GET_REPORT_DESC ioctl.thompsa2009-02-271-2/+4
| | | | | Submitted by: daichi Pointy hat: me
* Rename all symbols in libmp(3) to mp_*, just like Solaris.ed2009-02-266-86/+104
| | | | | | | | | | | | The function pow() in libmp(3) clashes with pow(3) in libm. We could rename this single function, but we can just take the same approach as the Solaris folks did, which is to prefix all function names with mp_. libmp(3) isn't really popular nowadays. I suspect not a single application in ports depends on it. There's still a chance, so I've increased the SHLIB_MAJOR and __FreeBSD_version. Reviewed by: deischen, rdivacky
* Use ANSI function declarations in librpcsvc.ed2009-02-265-36/+12
| | | | | | | | | When compiling librpcsvc with LLVM, we get a compiler error, because hexval() uses an ANSI prototype, but a K&R declaration. I could have just changed hexval(), but I'd rather keep this consistent. It's not that much code. Submitted by: Pawel Worach <pawel worach gmail com>
* Add a missing parameter to ruserpass(). According to C99 6.9.1p7rdivacky2009-02-261-2/+4
| | | | | | | K&R function is not a prototype but this is a bad style. GCC accepts this other compilers warn or reject this. Approved by: kib (mentor)
* With only one threading library, simplify the logic of setting SHLIBDIR.ru2009-02-241-4/+2
|
* MFp4 //depot/projects/usb@157974thompsa2009-02-244-0/+59
| | | | | | | Add support for setting and getting the USB template value through libusb20 and usbconfig. Submitted by: Hans Petter Selasky
* Build fixups for the new USB stack.thompsa2009-02-234-6/+16
|
* Fix build when WITH_SSP is set explicitly.ru2009-02-213-4/+5
| | | | Submitted by: Jeremie Le Hen
* These warnings are only relevant on NetBSD it seems. They don't seemimp2009-02-192-6/+0
| | | | to be relevant to FreeBSD at all.
* These symbols don't belong here. Remove them. Since mips hasn't hadimp2009-02-191-4/+0
| | | | | | a release, I think there's no impact here... Reviewed by: cognet@
* Don't try to auto-detect dynamic linking; it fails on mips. The Makefiledes2009-02-171-0/+3
| | | | | | part of the patch is an ugly (and hopefully temporary) hack. Discussed with: imp@
* MFp4 //depot/projects/usb@157783thompsa2009-02-161-3/+11
| | | | | | | libusb20: Make return value compatible with libusb0.12.x in case of a USB transfer timeout. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@157699thompsa2009-02-145-52/+146
| | | | | | | | | | | | | | | | Add two new functions to the libusb20 API and required kernel ioctls. - libusb20_dev_get_iface_desc - libusb20_dev_get_info New command to usbconfig, "show_ifdrv", which will print out the kernel driver attached to the given USB device aswell. See "man libusb20" for a detailed description. Some minor style corrections long-line wrapping. Submitted by: Hans Petter Selasky
* Honor WITHOUT_INSTALLLIB in some places.jkim2009-02-133-0/+6
|
* Properly invalidate highest pts number when calling setttyent().ed2009-02-121-5/+4
| | | | | | | | | When calling setttyent() after calling endttyent(), pts_valid will never be set to 1, because the readdir()-loop will likely never vind a pts that has a higher number than before. Simplify the code by removing pts_valid. We'll just set maxpts to -1 when we don't have a valid count yet.
* Make ttyslot(3) work with pts(4) devices.ed2009-02-121-6/+5
| | | | | | | It seems ttyslot() calls rindex(), to strip the device name to the last slash, but this is obviously invalid. /dev/pts/0 should be stripped until pts/0. Because /etc/ttys only supports TTY names in /dev/, just strip this piece of the pathname.
* Add two new routines: fdevname() and fdevname_r().ed2009-02-116-20/+88
| | | | | | | | | | | | | | A more elegant way of obtaining a name of a character device by its file descriptor on FreeBSD, is to use the FIODGNAME ioctl. Because a valid file descriptor implies a file descriptor is visible in /dev, it will always resolve a valid device name. I'm adding a more friendly wrapper for this ioctl, called fdevname(). It is a lot easier to use than devname() and also has better error handling. When a device name cannot be resolved, it will just return NULL instead of a generated device name that makes no sense. Discussed with: kib
* - Sanitize disk parameters retrieved from GEOM, as they are not guaranteed tolulf2009-02-091-0/+3
| | | | | | | have sane values. It caused sysinstall to crash when installing on certain SD cards. Discussed with: marcel
* Shutup warning for DNAME RR.ume2009-02-082-2/+3
| | | | | | PR: bin/127591 Submitted by: "Eugene M. Kim" <20080111.freebsd.org__at__ab.ote.we.lv> MFC after: 1 week
* Fix language on atol(3) manpage. Add a COMPATIBILITY sectionkeramida2009-02-081-3/+32
| | | | | | | | | | stating that in FreeBSD the atol() and atoll() functions affect errno in the same way as strtol() and stroll(). PR: docs/126487 Submitted by: edwin Reviewed by: trhodes, gabor MFC after: 1 week
* Fix leak of kqueue() file descriptors when linked with staticdeischen2009-02-081-0/+1
| | | | | | | libc_r. PR: 58687 Submitted by: Jonathon Lennox <lennox at cs dot columbia dot edu>
* Make sure the comparison is done with an unsigned char.imp2009-02-071-1/+1
|
* C99 TC2 now wants FP_FAST_FMA* to be defined to 1, if the macros aredas2009-02-071-3/+3
| | | | defined at all. See also: defect report #223.
* Standardize the various prison_foo_ip[46] functions and prison_if tojamie2009-02-051-2/+2
| | | | | | | | | | | | | | | return zero on success and an error code otherwise. The possible errors are EADDRNOTAVAIL if an address being checked for doesn't match the prison, and EAFNOSUPPORT if the prison doesn't have any addresses in that address family. For most callers of these functions, use the returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or EINVAL. Always include a jailed() check in these functions, where a non-jailed cred always returns success (and makes no changes). Remove the explicit jailed() checks that preceded many of the function calls. Approved by: bz (mentor)
* Fix the functions to match prototypes. The K&R definitions differimp2009-02-033-3/+3
| | | | from the ANSI-C prototype due to the 'int promotion' rule.
* - ANSIfy function definitionsdanger2009-02-0333-110/+41
| | | | | | - use nul when we are looking for a terminating character where appropriate Approved by: imp
* Provide a type for the argument.rdivacky2009-02-021-1/+1
| | | | Approved by: kib (mentor)
* src/usr.bin/usbhidaction/usbhidaction.calfred2009-02-026-7/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/usr.bin/usbhidctl/usbhid.c src/sys/dev/usb2/include/usb2_hid.h src/sys/dev/usb2/input/uhid2.c src/lib/libusbhid/Makefile src/lib/libusbhid/descr.c src/lib/libusbhid/descr_compat.c src/lib/libusbhid/usbhid.3 src/lib/libusbhid/usbhid.h src/lib/libusbhid/usbvar.h Patches to make libusbhid and HID userland utilities compatible with the new USB stack. All HID ioctls should go through the libusbhid library to ensure compatibility. I have found at least one piece of software in /usr/ports which needs to get updated before USB HID devices will work. This is the X joystick input driver. Reported and tested by: Daichi GOTO and Masanori OZAWA. src/sys/dev/usb2/core/usb2_process.c Correct USB process names. Reported by: Andre Guibert de Bruet src/sys/dev/usb2/serial/uftdi2.c Integrate changes from old USB stack. Submitted by: hps
* Permit ` as a pad character in the filename table.kientzle2009-02-011-4/+3
| | | | | This seems to fix the devel/zziplib port, which distributes its man pages in an ar archive.
* - Remove superfluous commentgabor2009-01-301-2/+0
| | | | | PR: docs/129400 Submitted by: Gavin Atkinson <gavin@freebsd.org>
* Update the description of KERN_PROC.trhodes2009-01-281-5/+3
| | | | | PR: 100242 Reviewed by: jhb
* Better wording for clearing EOF indicator.trhodes2009-01-281-0/+4
| | | | Submitted by: keramida and jhb
* Remove another comment about clearing EOF indicator.trhodes2009-01-281-4/+1
| | | | Noticed by: bde
* Update the manpage to reflect r145172.das2009-01-281-2/+1
|
* Remove comment about clearerr() being the only method of clearingtrhodes2009-01-281-3/+1
| | | | | | | | | the EOF indicator, fseek() may also be used for this. Bump document date. PR: 76333 Submitted by: Yoshihiko Sarumaru <mistral@imasy.or.jp>
* - Add support for nehalem/corei7 cpus. This supports all of the corejeff2009-01-271-1/+23
| | | | | | | | counters defined in the reference manual. It does not support the 'uncore' events. Reviewed by: jkoshy Sponsored by: Nokia
OpenPOWER on IntegriCloud