From 156deb8fa7c56e4809d6bc0b4f1075742cdde5e4 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sat, 29 Oct 2005 21:43:45 +1000 Subject: [SYSTEM] Added dummy sysconf implementation Add a dummy sysconf implementation that always fails for klibc. --- src/bltin/times.c | 5 ++--- src/system.c | 8 ++++++++ src/system.h | 5 +++++ 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/bltin/times.c b/src/bltin/times.c index aca579f..8eabc1f 100644 --- a/src/bltin/times.c +++ b/src/bltin/times.c @@ -10,10 +10,9 @@ #else #include "bltin.h" #endif +#include "system.h" -#define main timescmd - -int main() { +int timescmd() { struct tms buf; long int clk_tck = sysconf(_SC_CLK_TCK); diff --git a/src/system.c b/src/system.c index d986efd..4c281ed 100644 --- a/src/system.c +++ b/src/system.c @@ -28,6 +28,7 @@ #include #include +#include "error.h" #include "output.h" #include "system.h" @@ -89,3 +90,10 @@ void *bsearch(const void *key, const void *base, size_t nmemb, return 0; } #endif + +#ifndef HAVE_SYSCONF +long sysconf(int name) +{ + sh_error("no sysconf for: %d", name); +} +#endif diff --git a/src/system.h b/src/system.h index 2737e9f..b8853e6 100644 --- a/src/system.h +++ b/src/system.h @@ -92,3 +92,8 @@ static inline int killpg(pid_t pid, int signal) return kill(-pid, signal); } #endif + +#ifndef HAVE_SYSCONF +#define _SC_CLK_TCK 2 +long sysconf(int) __attribute__((__noreturn__)); +#endif -- cgit 1.4.1 id=200842aa64f1f66e902dc186de15e49d0dba7830&follow=1'>commit diff
Commit message (Collapse)Author
2019-02-22Remove topic TODOJune McEnroe
I played around with it and it doesn't look right unless there is only one channel listed in the status.
2019-02-22Add /znc commandJune McEnroe
Only because ZNC tells you to use it and expects it to work.
2019-02-22Update status line after scrolling and term eventsJune McEnroe
2019-02-22Reorganize input.cJune McEnroe
2019-02-22Fix name of <raw> window in man pageJune McEnroe
2019-02-22Rename global tags with angle bracketsJune McEnroe
2019-02-22Show status window while connectingJune McEnroe
2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe
It's actually in a good state now, I think.
2019-02-21Replace "view" with "window"June McEnroe
I think originally I didn't want to use the same word as curses WINDOW but it's really much clearer for the user if they're just called windows. UI code probably needs yet another rewrite though. Still feels messy.
2019-02-21Remove ROT13June McEnroe
It's just not convenient when it can only do the whole line...
2019-02-21Clean up man pageJune McEnroe
2019-01-26Draw UI before connectingJune McEnroe
Otherwise the "Traveling" message isn't visible while connecting.
2019-01-25Avoid unused variable warnings with getyxJune McEnroe
2019-01-25Add GNU/Linux build instructionsJune McEnroe'3' class='logmsg'> Otherwise the "id" in "void" matches for "void id".
2021-01-19Escape \ and / in mtags search patternsJune McEnroe
2021-01-20Use mtags in source-filterJune McEnroe
2021-01-19Add mtags to generate tags for make and mdocJune McEnroe
2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe
2021-01-19Don't use a pager if reading standard inputJune McEnroe
2021-01-19Support BSD make syntax and match *.amJune McEnroe
These don't really go together, but...
2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe
Otherwise it ends up going into Shell state.
2021-01-18Allow matching lexers using first input lineJune McEnroe