| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r245428:
Add CLOCK_PROCESS_CPUTIME_ID to <time.h>, to synchronize the CLOCK_*
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
Approved by: re (kib)
Notes:
svn path=/releng/9.2/; revision=255308
|
| |
|
|
|
|
|
| |
Approved by: re
Notes:
svn path=/releng/9.2/; revision=254785
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
range, 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.
This change is binary compatible because range is reduced, not expanded,
so no bump is needed.
Reviewed by: bde
Approved by: re (glebius)
Notes:
svn path=/stable/9/; revision=253607
|
| |
|
|
|
|
|
|
|
|
| |
Add fmemopen(3), open_memstream(3), and open_wmemstream(3) which provide
stdio FILE objects for memory buffers.
port exprun by: bdrewery
Notes:
svn path=/stable/9/; revision=252343
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
241434, 241657, 241658, 241659, 241660, 241661, 241662, 241663,
241664, 241665, 241689, 242420, 243951, 244410, 244411, 244413,
244549, 245136, 247963, 248729, 248730, 248731, 248732, 248733,
248734, 248735, 248736, 248737, 248738, 248739, 248740, 248741,
248746, 248747, 248748, 248749, 248754, 248755, 248756, 248757,
248758, 248759, 248760, 248761, 248762, 248763, 248764, 248765,
248766, 248767, 248768, 248769, 248770, 248771, 248772, 248773,
248780, 248834, 248835, 248913, 248977, 249067, 249416, 249417,
249418, 249419, 249420, 249421, 249422, 249432
Notes:
svn path=/stable/9/; revision=252222
|
| |
|
|
|
|
|
|
| |
- sl_find does not modify 'name'
- make the prototype of sl_find match NetBSD
Notes:
svn path=/stable/9/; revision=249922
|
| |
|
|
|
|
|
| |
Don't install telnet.h if it will be installed by libtelnet.
Notes:
svn path=/stable/9/; revision=248357
|
| |
|
|
|
|
|
|
| |
Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headers
in /usr/include.
Notes:
svn path=/stable/9/; revision=247566
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add UFS writesuspension mechanism, designed to allow userland processes
to modify on-disk metadata for filesystems mounted for write.
Reviewed by: kib, mckusick
Sponsored by: FreeBSD Foundation
MFC r243247:
Add change missed in 243245.
MFC r243250:
Fix build of kdump(1).
MFC r243254:
Fix build on powerpc.
Reviewed by: nwhitehorn
MFC r243305 by marius:
Fix build after r243245.
Submitted by: trasz
MFC r243339 by kib:
Fix module build after r243245.
Notes:
svn path=/stable/9/; revision=246234
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Replace our implementation of the vis(3) and unvis(3) APIs with
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.
Notes:
svn path=/stable/9/; revision=245439
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace our version of the pwcache(3) API with NetBSD's implementation.
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.
Notes:
svn path=/stable/9/; revision=245267
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add aligned_alloc(3).
The C11 folks reinvented the wheel by introducing an aligned version of
malloc(3) called aligned_alloc(3), instead of posix_memalign(3). Instead
of returning the allocation by reference, it returns the address, just
like malloc(3).
I'm MFCing this now, as it seems aligned_alloc(3) is needed to make the
new version of libc++ work, which was merged back to FreeBSD 9 in r243376.
Requested by: dim
Notes:
svn path=/stable/9/; revision=243405
|
| |
|
|
|
|
|
|
|
| |
Use defined() to test macro definitions.
Approved by: theraven
Notes:
svn path=/stable/9/; revision=243331
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
rpc: convert all uid and gid variables to u_int.
Follow a similar change in Solaris and linux where the uid and
gid variables were made more similar to what the system expects.
In our case we use u_int which is what XDR can manage,
Reviewed by: bde
Notes:
svn path=/stable/9/; revision=241309
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Complete revert of r239963 (from head).
The attempt to merge changes from the linux libtirpc caused
rpc.lockd to exit after startup under unclear conditions.
Reported by: David Wolfskill
Notes:
svn path=/stable/9/; revision=241059
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bring some changes from Bull's NFSv4 libtirpc implementation.
____
Fixed infinite loop in svc_run()
____
__rpc_taddr2uaddr_af() assumes the netbuf to always have a
non-zero data. This is a bad assumption and can lead to a
seg-fault. This patch adds a check for zero length and returns
NULL when found.
____
Changed clnt_spcreateerror() to return clearer
and more concise error messages.
____
Converted all uid and gid variables of the type uid_t and gid_t.
____
libtirpc: set r_netid and r_owner in __rpcb_findaddr_timed
These fields in the rpcbind GETADDR call are being passed uninitialized
to CLNT_CALL. In the case of x86_64 at least, this usually leads to a
segfault. On x86, it sometimes causes segfaults and other times causes
garbage to be sent on the wire.
rpcbind generally ignores the r_owner field for calls that come in over
the wire, so it really doesn't matter what we send in that slot. We just
need to send something. The reference implementation from Sun seems to
send a blank string. Have ours follow suit.
____
libtirpc: be sure to free cl_netid and cl_tp
When creating a client with clnt_tli_create, it uses strdup to copy
strings for these fields if nconf is passed in. clnt_dg_destroy frees
these strings already. Make sure clnt_vc_destroy frees them in the same
way.
____
Obtained from: Bull GNU/Linux NFSv4 Project
Notes:
svn path=/stable/9/; revision=240799
|
| |
|
|
|
|
|
|
|
|
| |
Rename __rpc_xdr with XDR. This fixes at least one C++ application and
matches what upstream (Solaris) has done on their xdr.h header.
PR: 137443
Notes:
svn path=/stable/9/; revision=240542
|
| |
|
|
|
|
|
|
|
|
|
| |
MFH r236892: remove mention of auth.conf from programs that don't use it
MFH r236963: remove dead code relating to auth.conf
MFH r236965 r236966 r236967 r237005 r237006 r237011: retire auth.conf
Approved by: re
Notes:
svn path=/stable/9/; revision=238481
|
| |
|
|
| |
Notes:
svn path=/stable/9/; revision=237968
|
| |
|
|
|
|
|
|
|
|
|
| |
229716, 230062, 230225, 230267, 234958
This brings stdatomic.h into -STABLE and includes improvements to tgmath.h that
significantly decrease compile times on a C11 compiler (such as the clang in
the base system).
Notes:
svn path=/stable/9/; revision=236326
|
| |
|
|
|
|
|
|
|
|
|
| |
FreeBSD headers.
Merges changes from: r227472 r227475 r227475 r227476 r227476 r227490 r227490 r228322 r228323 r228329 r228330 r228528 r228529 r228529 r228901 r228918 r228918 r232971 r232971
Also bump __FreeBSD_version for this and the xlocale merge.
Notes:
svn path=/stable/9/; revision=235786
|
| |
|
|
|
|
|
|
|
|
| |
Merged revisions: 227487,227753,227807,227818,227999,228002,228875,230156,231673,232498,232601,232620,232626,232926-232927,232929,232931,232935,233173,233600,234573,234578,235239
This currently defines __NO_TLS on ARM (unlike head), because the required
support function has not been MFC'd.
Notes:
svn path=/stable/9/; revision=235785
|
| |
|
|
|
|
|
|
|
| |
Add a convenience macro for the returns_twice attribute, and apply it to
the prototypes of the appropriate functions (getcontext, savectx,
setjmp, sigsetjmp and vfork).
Notes:
svn path=/stable/9/; revision=235539
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In POSIX.1-2008:
P_tmpdir [OB XSI] Default directory prefix for tempnam().
This macro is used in a lot of places in legacy applications,
and is why we see a lot of programs written for e.g. Linux
store volatile temporary files in /var/tmp and not /tmp.
Notes:
svn path=/stable/9/; revision=232277
|
| |
|
|
|
|
|
|
| |
Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.
Notes:
svn path=/stable/9/; revision=231702
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out our GCC has quite an interesting bug:
typeof(1.0fi) != float _Complex
typeof((float _Complex)1.0fi) != float _Complex
typeof((float _Complex)1.0i) == float _Complex
In other words: if casting to an equal size, GCC seems to take a
shortcut. By casting down from a double to a float, GCC doesn't take
this shortcut, yielding the proper type.
Notes:
svn path=/stable/9/; revision=231282
|
| |
|
|
|
|
|
|
| |
Implement fdlopen(3), an rtld interface to load shared object by file
descriptor.
Notes:
svn path=/stable/9/; revision=230410
|
| |
|
|
|
|
|
|
|
|
| |
- Add restrict keyword to glob(3)
PR: kern/161958
Approved by: jilles
Notes:
svn path=/stable/9/; revision=229823
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Define true and false in sys/types.h for _KERNEL consumers, and
typedef bool. Due to macro expansion it seemed better to use a
typedef for kernel consumers (specifically ofed won't compile
without more changes if a define is used).
- <stdbool.h> should also not re-define bool/true/false if they are
defined by <sys/types.h>. It would probably be a programming error
to define _KERNEL for user-space code, but downstream consumers
like Isilon have already been including <stdbool.h> in kernel
sources, and this protects that usage.
- sizeof(_Bool) is not necessarily the same as sizeof(int), so kernel
modules should be rebuilt with this change. Bump __FreeBSD_version.
No KBI change is expected based on review of the code.
Notes:
svn path=/stable/9/; revision=229285
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an API for alerting internal libc routines to the presence of
"unsafe" paths post-chroot, and use it in ftpd. [11:07]
Fix a buffer overflow in telnetd. [11:08]
Make pam_ssh ignore unpassphrased keys unless the "nullok" option is
specified. [11:09]
Add sanity checking of service names in pam_start. [11:10]
Approved by: so (cperciva)
Approved by: re (bz)
Security: FreeBSD-SA-11:06.bind
Security: FreeBSD-SA-11:07.chroot
Security: FreeBSD-SA-11:08.telnetd
Security: FreeBSD-SA-11:09.pam_ssh
Security: FreeBSD-SA-11:10.pam
Notes:
svn path=/stable/9/; revision=228843
|
| |
|
|
|
|
|
|
|
| |
Avoid accidental conflicts with C++ operator keywords.
Approved by: re (kib)
Notes:
svn path=/stable/9/; revision=226036
|
| |
|
|
|
|
|
|
|
|
| |
Install ciss(4) ioctl header.
PR: kern/109813
Approved by: re (bz)
Notes:
svn path=/stable/9/; revision=225967
|
| |
|
|
|
|
|
| |
Requested by: bde
Notes:
svn path=/head/; revision=223906
|
| |
|
|
|
|
|
|
|
| |
- Document xdr_sizeof(3); from NetBSD
Discussed with: kib
Notes:
svn path=/head/; revision=223877
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
{readline,history}.h are in /usr/include/edit so as to not conflict with
the GNU libreadline versions. To use the libedit readline(3) one should
add "-I/usr/include/edit" to their Makefile
(spelled "-I${DESTDIR}/${INCLUDEDIR}/edit" within the FreeBSD source tree).
* Enable its use in the BSD licensed utilities that support readline(3).
* To make it easier to sync libedit development with NetBSD, histedit.h
is moved into libedit's directory as history shows shown we keep merging
it into that location.
Obtained from: NetBSD
Sponsored by: Juniper Networks
Notes:
svn path=/head/; revision=220370
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new RAID GEOM class, that is going to replace ataraid(4) in supporting
various BIOS-based software RAIDs. Unlike ataraid(4) this implementation
does not depend on legacy ata(4) subsystem and can be used with any disk
drivers, including new CAM-based ones (ahci(4), siis(4), mvs(4), ata(4)
with `options ATA_CAM`). To make code more readable and extensible, this
implementation follows modular design, including core part and two sets
of modules, implementing support for different metadata formats and RAID
levels.
Support for such popular metadata formats is now implemented:
Intel, JMicron, NVIDIA, Promise (also used by AMD/ATI) and SiliconImage.
Such RAID levels are now supported:
RAID0, RAID1, RAID1E, RAID10, SINGLE, CONCAT.
For any all of these RAID levels and metadata formats this class supports
full cycle of volume operations: reading, writing, creation, deletion,
disk removal and insertion, rebuilding, dirty shutdown detection
and resynchronization, bad sector recovery, faulty disks tracking,
hot-spare disks. For Intel and Promise formats there is support multiple
volumes per disk set.
Look graid(8) manual page for additional details.
Co-authored by: imp
Sponsored by: Cisco Systems, Inc. and iXsystems, Inc.
Notes:
svn path=/head/; revision=219974
|
| |
|
|
|
|
|
| |
Not sure why we have math.h in lib/msun/ and complex.h in include/.
Notes:
svn path=/head/; revision=219379
|
| |
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=219343
|
| |
|
|
|
|
|
|
|
|
|
|
| |
it possible for the kernel to track login class the process is assigned to,
which is required for RCTL. This change also make setusercontext(3) call
setloginclass(2) and makes it possible to retrieve current login class using
id(1).
Reviewed by: kib (as part of a larger patch)
Notes:
svn path=/head/; revision=219304
|
| |
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=219271
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Some values changed in POSIX.1-2001; provide the former value if a program
requests compliance to an earlier version of POSIX. [1]
* Add missing _POSIX_CLOCKRES_MIN constant. This is a maximum value but
otherwise works the same as the minimum values.
PR: standards/104743
Submitted by: bde [1] (not exact #ifdefs, but the values)
MFC after: 2 weeks
Notes:
svn path=/head/; revision=219256
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
setting. It can be built by setting the WITH_ICONV knob. While this
knob is unset, the library part, the binaries, the header file and
the metadata files will not be built or installed so it makes no impact
on the system if left turned off.
This work is based on the iconv implementation in NetBSD but a great
number of improvements and feature additions have been included:
- Some utilities have been added. There is a conversion table generator,
which can compare conversion tables to reference data generated by
GNU libiconv. This helps ensuring conversion compatibility.
- UTF-16 surrogate support and some endianness issues have been fixed.
- The rather chaotic Makefiles to build metadata have been refactored
and cleaned up, now it is easy to read and it is also easier to add
support for new encodings.
- A bunch of new encodings and encoding aliases have been added.
- Support for 1->2, 1->3 and 1->4 mappings, which is needed for
transliterating with flying accents as GNU does, like "u.
- Lots of warnings have been fixed, the major part of the code is
now WARNS=6 clean.
- New section 1 and section 5 manual pages have been added.
- Some GNU-specific calls have been implemented:
iconvlist(), iconvctl(), iconv_canonicalize(), iconv_open_into()
- Support for GNU's //IGNORE suffix has been added.
- The "-" argument for stdin is now recognized in iconv(1) as per POSIX.
- The Big5 conversion module has been fixed.
- The iconv.h header files is supposed to be compatible with the
GNU version, i.e. sources should build with base iconv.h and
GNU libiconv. It also includes a macro magic to deal with the
char ** and const char ** incompatibility.
- GNU compatibility: "" or "char" means the current local
encoding in use
- Various cleanups and style(9) fixes.
Approved by: delphij (mentor)
Obtained from: The NetBSD Project
Sponsored by: Google Summer of Code 2009
Notes:
svn path=/head/; revision=219019
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=218881
|
| |
|
|
|
|
|
|
| |
Reviewed by: attilio
MFC after: 1 week
Notes:
svn path=/head/; revision=218772
|
| |
|
|
|
|
|
|
|
|
| |
calling thread's unique integral ID, which is similar to AIX function of
the same name. Bump __FreeBSD_version to note its introduction.
Reviewed by: kib
Notes:
svn path=/head/; revision=218414
|
| |
|
|
|
|
|
|
|
|
|
| |
__assert() is called when an assertion fails. After printing an error
message, it will call abort(). abort() never returns, hence it has the
__dead2 attribute. Also add this attribute to __assert().
MFC after: 3 weeks
Notes:
svn path=/head/; revision=217207
|
| |
|
|
| |
Notes:
svn path=/head/; revision=217039
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Provide function prototype for nlm_syscall
- Don't assign a variable from the stack to a global var[1]
- Remove unused vars
Found by: clang static analyser [1]
Reviewed by: dfr
Notes:
svn path=/head/; revision=216603
|
| |
|
|
|
|
|
|
| |
Obtained from: OpenBSD
MFC after: 2 weeks
Notes:
svn path=/head/; revision=215236
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've noticed various terminal emulators that need to obtain a sane
default termios structure use very complex `hacks'. Even though POSIX
doesn't provide any functionality for this, extend our termios API with
cfmakesane(3), which is similar to the commonly supported cfmakeraw(3),
except that it fills the termios structure with sane defaults.
Change all code in our base system to use this function, instead of
depending on <sys/ttydefaults.h> to provide TTYDEF_*.
Notes:
svn path=/head/; revision=214680
|