Commit Graph

1428 Commits

Author SHA1 Message Date
christos 53cd98be07 Add AI_ADDRCONFIG 2012-03-17 21:57:48 +00:00
christos 1aa0fee779 use __type_fit() instead of locally brewed macro 2012-03-13 21:14:55 +00:00
joerg 4acff4c01b Implement sem_timedwait. 2012-03-08 21:59:24 +00:00
christos 2b01a8ad07 PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
2012-03-02 17:27:48 +00:00
martin 136a5cd515 Use C++ compatible declaration for posix_spawn (instead of the C99 specific
posix one).
2012-02-22 17:51:01 +00:00
martin 74ce3f6bfc Make this include file C++ save, using the new __conly_restrict. 2012-02-21 10:54:07 +00:00
martin 2b8e910c25 Add missing __BEGIN_DECLS, from Henning Petersen in PR misc/46058. 2012-02-20 09:28:43 +00:00
rmind 8dad299218 Remove <sa.h> which has been obsolete since 2007. 2012-02-19 22:32:32 +00:00
joerg 52a4c27e3e Add _dlauxinfo helper function to provide access to the ELF auxilary
vector. This can normally be found via __ps_strings, but libc is
initialised too early when linked dynamically and doesn't have access to
it yet, so provide an alternative mechanism via ld.elf_so.
Bump libc minor.
2012-02-16 23:00:38 +00:00
martin 19f52532ad Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.
2012-02-11 23:31:22 +00:00
matt a99c34e987 Use __INFINITY in preference to __builtin_inff(). Currently only VAX defines
__INFINITY and allows to use __builtin_huge_valf() instead since gcc4.5 will
error out unconditionally if __builtin_inf() is used.
2012-02-05 17:57:17 +00:00
dholland 7609b9bc56 Migrate one last leftover bit (used only by the kernel now) to
sys/ufs/ufs and remove the old quota headers and no-longer-used shared
code. Ok by releng.
2012-02-05 14:19:02 +00:00
dholland 832d4ca72b Be consistent about whether idtype and objtype codes are signed or
unsigned. They are signed. (While unsigned might have been a better
choice, it doesn't really matter and the majority of preexisting uses
were signed. And consistency is good.)
2012-02-01 05:46:45 +00:00
dholland 5f0d2c5f55 Add quota_quotaon() and quota_quotaoff(). Use them in quotaon(8). 2012-01-30 16:45:13 +00:00
dholland f6b247aa3b Add quota_getrestrictions() to report the semantic restrictions
associated with a particular quotahandle.
2012-01-30 16:44:08 +00:00
dholland d87a2031f8 Per the FS-independent schema, get one quotaval at a time from the
filesystem, instead of blocks and files together.

This results in fetching each FS-level quota entry twice and therefore
doing slightly more work, but (1) quota access isn't a critical path
and (2) after fetching the block values the file values will be hot in
the cache, so it won't add much total time.

Also move more of the FS-independent defintions from <quota.h> to
<sys/quota.h> so we can use them internally.

Step 4 of 5 for QUOTACTL_GET.

Note: this change requires a kernel version bump.
2012-01-29 06:40:57 +00:00
dholland 1d762ff060 Move second-layer proplib frobbing within ufs quota code up to the
first layer. (Step 2 of several for QUOTACTL_GET.)
2012-01-29 06:38:23 +00:00
christos 1897181a72 From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
2012-01-22 18:36:14 +00:00
dholland 0d7dfe62fa Add <quota.h> with the new libquota API.
This is the user/application API and does not include the kernel
interface. Definitions shared with the kernel are found in
<sys/quota.h>.

Since I've been working on a local branch I have taken the liberty of
moving the latest-so-far version of <quota.h> to the front of the
patch queue. This loses (a small amount of) history but has the
advantage of avoiding unnecessary version bumps of libquota.so.
2012-01-09 15:19:44 +00:00
christos 423a6f5ef0 strspct 2012-01-07 18:41:14 +00:00
christos 80b0f3a562 getfstypename addition 2011-11-13 21:57:14 +00:00
joerg 0b50389a15 Add __returns_twice for the attribute of the same name. This makes the
attribute explicit based on the functions GCC gives it too.
2011-11-05 09:27:06 +00:00
christos d69c1b55d9 Fix pthreads variables:
- Add missing stuff from Issue 6 (some of it commented out)
- Fix _POSIX_THREAD -> PTHREAD variable confusion
- Amend PTHREAD_KEYS_MAX to 256 since this is what libpthread defined internally
2011-10-06 16:02:52 +00:00
jruoho be8b5eb28c Define _PATH_CPUCTL. 2011-09-27 11:24:20 +00:00
christos 711f328e6e add re-entrant versions of the hash api based on the GNU extensions. 2011-09-14 23:34:26 +00:00
christos ea9367e3e4 add kvm_getkernelname() 2011-09-12 21:14:29 +00:00
plunky 76be87e1ac provide a complete prototype for xdrproc_t
(I found no instances where three arguments were actually
used, as per the claim in the comment. If there are any
in third party code then they will need to use a cast)
2011-08-30 17:09:51 +00:00
plunky 87d4f6076b Apply casts to cases where xdrproc_t is expected but is not
strictly passed, for example because the second argument is
a different kind of pointer.
2011-08-30 17:06:20 +00:00
bouyer a47e2eb758 Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
2011-08-30 12:39:49 +00:00
elric 95bd2d4a1e Remove crypto/dist/heimdal and its associated build infrastructure as
it has been replaced by crypto/external/bsd/heimdal.
2011-08-28 16:21:57 +00:00
christos b8788050c4 prototype for strpct 2011-08-28 07:46:13 +00:00
dyoung 9943264696 Build and install ppath(3), property-list paths library. 2011-08-26 21:22:07 +00:00
joerg ed20f4b6ec pw_error is documented to be dead 2011-08-26 01:48:39 +00:00
joerg be47d2fc97 __assert and __assert13 are dead 2011-08-26 01:10:49 +00:00
dholland 112cae6f8e Don't pollute the namespace with stdint.h. (This file is included from
string.h so it can't blithely do whatever it feels like.) PR 45258.
2011-08-22 01:24:15 +00:00
manu 2a4490f2fd Add macros to hide OpenGroup extened API set 2 from GNU configure. This
is a temporary  workaround until the implementation is completed.
2011-08-16 07:55:29 +00:00
manu 9db30be448 First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
2011-08-08 12:08:52 +00:00
joerg 5ccaf4b804 Add ilogbl(3). 2011-07-28 22:32:28 +00:00
joerg afda0f82d1 Add scalbnl to libm. 2011-07-26 16:10:15 +00:00
joerg 3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
manu 319b6ef0ee Import xdr_sizeof() from FreeBSD 2011-07-04 07:54:38 +00:00
christos e2bebf7172 * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

    - Add F_DUPFD_CLOEXEC to fcntl(2).
    - Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
    - Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
      for socket(2) and socketpair(2).
    - Add new paccept(2) syscall that takes an additional sigset_t to alter
      the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
      SOCK_NONBLOCK.
    - Add new mode character 'e' to fopen(3) and popen(3) to open pipes
      and file descriptors for close on exec.
    - Add new kqueue1(2) syscall with a new flags argument to open the
      kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
  (rump_syscallargs.h).

* Bump libc version for the new syscalls.
2011-06-26 16:42:39 +00:00
nonaka c52f9a5df2 PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.
2011-06-25 05:45:10 +00:00
manu 448e1c49b2 Add mount -o extattr option to enable extended attributs (corrently only
for UFS1).
Remove kernel option for EA backing store autocreation and do it by
default. Add a sysctl so that autocreated attriutr size can be modified.
2011-06-17 14:23:50 +00:00
nakayama 88e42b609b Add fenv support for sparc. Mostly copied from sparc64 and share with it. 2011-05-20 21:42:48 +00:00
martin 3f0fc12d5a Actually test for sparc v9 architecture, doesn't matter if we are building
32bit or 64bit (fixes 32bit compat library build on sparc64 - yes, they
differ from native sparc libs!)
2011-05-16 14:50:36 +00:00
he 1fd8e2619a The support of <fenv.h> is actually for __sparc64__, not for __sparc__
(which is also defined on sparc64).  This fixes a build problem for
plain sparc.
2011-05-16 07:59:18 +00:00
mrg be06c07b98 finish the ieeefp.h vs fp_prec_t hack from the previous change and
don't try to define a type when "fp_prec" isn't defined.

this lets my non-x86 (and i presume non-m68k) builds pass again.
2011-03-27 05:13:15 +00:00
christos 2587e6e437 add fpgetprec/fpsetprec 2011-03-26 19:51:41 +00:00
bouyer d9210c2405 Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)
2011-03-24 17:05:39 +00:00