diff --git a/include/limits.h b/include/limits.h index 5a19b10f..4e79c5b0 100644 --- a/include/limits.h +++ b/include/limits.h @@ -33,6 +33,7 @@ #define UCHAR_MAX 255 #define CHAR_MAX 255 #define UINT_MAX 4294967295U +#define ULONG_MAX 4294967295U #define INT_MIN -2147483648 #define INT_MAX 2147483647 #define MB_CUR_MAX 1 diff --git a/include/locale.h b/include/locale.h index 18eb2914..fd9bbdc6 100644 --- a/include/locale.h +++ b/include/locale.h @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2017 Jan (janneke) Nieuwenhuizen + * Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -28,7 +28,13 @@ #include_next #else // ! WITH_GLIBC -char* dirname (char*); + +#ifndef LC_ALL +#define LC_ALL "LC_ALL" +#define LC_NUMERIC "LC_NUMERIC" +#endif +char * setlocale (int category, char const *locale); + #endif // ! WITH_GLIBC #endif // __MES_LOCALE_H diff --git a/include/signal.h b/include/signal.h index 3d7f69c5..bd7e0404 100644 --- a/include/signal.h +++ b/include/signal.h @@ -210,6 +210,7 @@ typedef struct ucontext int kill (pid_t pid, int signum); int sigaction (int signum, struct sigaction const *act, struct sigaction *oldact); +int sigaddset (sigset_t *set, int signum); #if __MESC__ void* signal (int signum, void * action); #else diff --git a/lib/libc+gnu.c b/lib/libc+gnu.c index 9fb90018..4f997e2f 100644 --- a/lib/libc+gnu.c +++ b/lib/libc+gnu.c @@ -111,3 +111,5 @@ #include #include #include +#include +#include diff --git a/lib/stub/setlocale.c b/lib/stub/setlocale.c new file mode 100644 index 00000000..e4fe783f --- /dev/null +++ b/lib/stub/setlocale.c @@ -0,0 +1,28 @@ +/* -*-comment-start: "//";comment-end:""-*- + * GNU Mes --- Maxwell Equations of Software + * Copyright © 2018 Jan (janneke) Nieuwenhuizen + * + * 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 . + */ + +#include +#include + +char * +setlocale (int category, char const *locale) +{ + return "C"; +} diff --git a/lib/stub/sigaddset.c b/lib/stub/sigaddset.c new file mode 100644 index 00000000..063c5ac9 --- /dev/null +++ b/lib/stub/sigaddset.c @@ -0,0 +1,28 @@ +/* -*-comment-start: "//";comment-end:""-*- + * GNU Mes --- Maxwell Equations of Software + * Copyright © 2018 Jan (janneke) Nieuwenhuizen + * + * 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 . + */ + +#include +#include + +int +sigaddset (sigset_t *set, int signum) +{ + return 0; +}