1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00

Fix stub setrlimit implementation.

This commit is contained in:
Roland McGrath
2013-05-06 14:58:00 -07:00
parent c74058300c
commit b99b892f68
2 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,8 @@
2013-05-06 Roland McGrath <roland@hack.frob.com> 2013-05-06 Roland McGrath <roland@hack.frob.com>
* resource/setrlimit.c (__setrlimit): Renamed from setrlimit.
(setrlimit): Define as weak alias.
* sysdeps/posix/truncate.c (__truncate): Renamed from truncate. * sysdeps/posix/truncate.c (__truncate): Renamed from truncate.
Call __ names for open, ftruncate, and close. Call __ names for open, ftruncate, and close.
For LENGTH==0 case, just use O_TRUNC rather than calling ftruncate. For LENGTH==0 case, just use O_TRUNC rather than calling ftruncate.

View File

@ -1,4 +1,5 @@
/* Copyright (C) 1991-2013 Free Software Foundation, Inc. /* Set process resource limits. Stub version.
Copyright (C) 1991-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -23,13 +24,11 @@
Only the super-user can increase hard limits. Only the super-user can increase hard limits.
Return 0 if successful, -1 if not (and sets errno). */ Return 0 if successful, -1 if not (and sets errno). */
int int
setrlimit (resource, rlimits) __setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
enum __rlimit_resource resource;
const struct rlimit *rlimits;
{ {
__set_errno (ENOSYS); __set_errno (ENOSYS);
return -1; return -1;
} }
weak_alias (__setrlimit, setrlimit)
stub_warning (setrlimit) stub_warning (setrlimit)