DRAFT lib: Add sysconf stub.
* lib/stub/sysconf.c: New file. * include/unistd.h (sysconf): Add prototype.
This commit is contained in:
parent
3d6af32247
commit
c5cfca2617
|
@ -399,6 +399,7 @@ lib/stub/sin.c
|
||||||
lib/stub/sqrt.c
|
lib/stub/sqrt.c
|
||||||
lib/stub/strftime.c
|
lib/stub/strftime.c
|
||||||
lib/stub/sys_siglist.c
|
lib/stub/sys_siglist.c
|
||||||
|
lib/stub/sysconf.c
|
||||||
lib/stub/system.c
|
lib/stub/system.c
|
||||||
lib/stub/times.c
|
lib/stub/times.c
|
||||||
lib/stub/ttyname.c
|
lib/stub/ttyname.c
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2017,2018,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -90,6 +90,7 @@ char *sbrk (ptrdiff_t delta);
|
||||||
void *sbrk (intptr_t delta);
|
void *sbrk (intptr_t delta);
|
||||||
#endif
|
#endif
|
||||||
int symlink (char const *old_name, char const *new_name);
|
int symlink (char const *old_name, char const *new_name);
|
||||||
|
long sysconf (int name);
|
||||||
int unlink (char const *file_name);
|
int unlink (char const *file_name);
|
||||||
ssize_t write (int filedes, void const *buffer, size_t size);
|
ssize_t write (int filedes, void const *buffer, size_t size);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* GNU Mes is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <mes/lib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
long
|
||||||
|
sysconf (int name)
|
||||||
|
{
|
||||||
|
static int stub = 0;
|
||||||
|
if (__mes_debug () && !stub)
|
||||||
|
eputs ("sysconf stub\n");
|
||||||
|
stub = 1;
|
||||||
|
return -1;
|
||||||
|
}
|
Loading…
Reference in New Issue