Mercurial > hg > aboriginal
comparison sources/patches/linux-noperl-timeconst.patch @ 1698:49abeb0ead62 draft
linux 3.17
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 05 Oct 2014 23:23:42 -0500 |
parents | cc716bec3527 |
children | db11c049b66b |
comparison
equal
deleted
inserted
replaced
1697:09832e10ea13 | 1698:49abeb0ead62 |
---|---|
1 Replace timeconst.bc with the c version I've been using for years (to replace | 1 Replace timeconst.bc with the c version I've been using for years (to replace |
2 the perl version). Eventually I should add bc to toybox, but for now... | 2 the perl version). Eventually I should add bc to toybox, but for now... |
3 | 3 |
4 --- /dev/null | 4 --- /dev/null |
5 +++ linux/kernel/mktimeconst.c | 5 +++ linux/kernel/time/mktimeconst.c |
6 @@ -0,0 +1,110 @@ | 6 @@ -0,0 +1,110 @@ |
7 +/* Copyright 2010 Parallels Inc, licensed under GPLv2 */ | 7 +/* Copyright 2010 Parallels Inc, licensed under GPLv2 */ |
8 +/* Copyright 2010-2013 Rob Landley <rob@landley.net> */ | 8 +/* Copyright 2010-2013 Rob Landley <rob@landley.net> */ |
9 + | 9 + |
10 +#include <inttypes.h> | 10 +#include <inttypes.h> |
112 + /* Notice if the disk fills up. */ | 112 + /* Notice if the disk fills up. */ |
113 + | 113 + |
114 + fflush(stdout); | 114 + fflush(stdout); |
115 + return ferror(stdout); | 115 + return ferror(stdout); |
116 +} | 116 +} |
117 --- linux/kernel/timeconst.bc 2013-04-28 19:36:01.000000000 -0500 | 117 --- linux/kernel/time/timeconst.bc 2013-04-28 19:36:01.000000000 -0500 |
118 +++ /dev/null 2013-02-23 10:58:11.743993346 -0600 | 118 +++ /dev/null 2013-02-23 10:58:11.743993346 -0600 |
119 @@ -1,108 +0,0 @@ | 119 @@ -1,108 +0,0 @@ |
120 -scale=0 | 120 -scale=0 |
121 - | 121 - |
122 -define gcd(a,b) { | 122 -define gcd(a,b) { |
223 - } | 223 - } |
224 - halt | 224 - halt |
225 -} | 225 -} |
226 - | 226 - |
227 -timeconst(hz) | 227 -timeconst(hz) |
228 --- linux/kernel/Makefile | 228 --- linux/kernel/time/Makefile |
229 +++ linux/kernel/Makefile | 229 +++ linux/kernel/time/Makefile |
230 @@ -125,19 +125,13 @@ | 230 @@ -125,17 +125,11 @@ |
231 | 231 |
232 $(obj)/time.o: $(obj)/timeconst.h | 232 $(obj)/time.o: $(obj)/timeconst.h |
233 | 233 |
234 -quiet_cmd_hzfile = HZFILE $@ | 234 -quiet_cmd_hzfile = HZFILE $@ |
235 - cmd_hzfile = echo "hz=$(CONFIG_HZ)" > $@ | 235 - cmd_hzfile = echo "hz=$(CONFIG_HZ)" > $@ |
248 -$(obj)/timeconst.h: $(obj)/hz.bc $(src)/timeconst.bc FORCE | 248 -$(obj)/timeconst.h: $(obj)/hz.bc $(src)/timeconst.bc FORCE |
249 - $(call if_changed,bc) | 249 - $(call if_changed,bc) |
250 +$(obj)/timeconst.h: $(obj)/mktimeconst FORCE | 250 +$(obj)/timeconst.h: $(obj)/mktimeconst FORCE |
251 + $(call if_changed,mktimeconst) | 251 + $(call if_changed,mktimeconst) |
252 | 252 |
253 ############################################################################### | |
254 # |