Re: [PATCH] make devmem map only a single page at end of memory

2010-04-15 Thread Denys Vlasenko
On Tue, Apr 13, 2010 at 6:14 AM, Michael Abbott mich...@araneidae.co.uk wrote: +       off_t page_mask = ~(off_t)(page_size - 1); +       size_t map_length;        int fd; ... -       virt_addr = (char*)map_base + (target (page_size - 1)); +       virt_addr = (char*)map_base + (target

Re: hwclock -w takes 24 seconds

2010-04-15 Thread Denys Vlasenko
I fixed syncing code so that it widens sync window very fast. But then I disabled it anyway, it's too big and in my testing, RTC isn't setting time with ~0.5sec precision anyway (!!!). Fixed in git, will be in 1.16.2 -- vda Couple remarks: 1. Why would we care to synchronize time in

Re: Busybox 1.16.x dnsd alignment problems

2010-04-15 Thread Lars Reemts
Are you saying that here: # define move_from_unaligned16(v, u16p) (memcpy((v), (u16p), 2)) memcpy may be opportunistic and if u16p has type uin16_t, memcpy will be optimized to assignment? Definitely yes. Please find a way which works for your arch and compiler, and let me know. Parhaps

Re: Busybox 1.16.x dnsd alignment problems

2010-04-15 Thread Lars Reemts
Unfortunately # define move_from_unaligned16(v, u16p) {void* src=(void*)(u16p);memcpy((v), src, 2);} also didn't do it. The only solution I've found working is doing it the hard way by hand: # define move_from_unaligned16(v, u16p) do { \ *((uint8_t*)v) = *((uint8_t*)u16p); \

Re: [PATCH] make devmem map only a single page at end of memory

2010-04-15 Thread Michael Abbott
On Wed, 14 Apr 2010, Denys Vlasenko wrote: On Tue, Apr 13, 2010 at 6:14 AM, Michael Abbott mich...@araneidae.co.uk wrote: +       off_t page_mask = ~(off_t)(page_size - 1); +       size_t map_length;        int fd; ... -       virt_addr = (char*)map_base + (target (page_size - 1));

Re: Busybox 1.16.x dnsd alignment problems

2010-04-15 Thread Lars Reemts
So I went with slapping ALIGN4 on the byte array instead. The ALIGN4 doesn't compile for me. gcc complains not to know the ALIGN4 macro. Had to change it to: uint8_t buf[MAX_PACK_LEN + 1] __attribute__ ((aligned (4))); Denys Vlasenko schrieb: On Wed, Apr 14, 2010 at 6:02 AM, Lars Reemts

Re: [PATCH] make devmem map only a single page at end of memory

2010-04-15 Thread Jörgen Pihlflyckt
Michael Abbott kirjoitti viestissään (lähetysaika torsdag 15 april 2010): Didn't I already do this? Yes, you did. Thank you for that. Hopefully we can get this into a release at some point :) Now, about why this was a problem in the first place: I'm using an AT91RM9200, Atmel system-on-a-chip

Re: Busybox 1.16.x dnsd alignment problems

2010-04-15 Thread Joakim Tjernlund
Unfortunately # define move_from_unaligned16(v, u16p) {void* src=(void*)(u16p);memcpy((v), src, 2);} also didn't do it. The only solution I've found working is doing it the hard way by hand: # define move_from_unaligned16(v, u16p) do { \ *((uint8_t*)v) = *((uint8_t*)u16p); \

[PATCH] httpd_indexcgi.c: fix compile error

2010-04-15 Thread Kim B. Heino
Signed-off-by: Kim B. Heino kim.he...@bluegiga.com diff -ur orig/networking/httpd_indexcgi.c busybox-1.16.1/networking/httpd_indexcgi.c --- orig/networking/httpd_indexcgi.c2010-03-20 04:58:07.0 +0200 +++ busybox-1.16.1/networking/httpd_indexcgi.c 2010-04-15 15:19:32.773974069

Re: [PATCH] make devmem map only a single page at end of memory

2010-04-15 Thread Denys Vlasenko
On Thu, Apr 15, 2010 at 12:37 AM, Michael Abbott mich...@araneidae.co.uk wrote: On Wed, 14 Apr 2010, Denys Vlasenko wrote: On Tue, Apr 13, 2010 at 6:14 AM, Michael Abbott mich...@araneidae.co.uk wrote: +       off_t page_mask = ~(off_t)(page_size - 1); +       size_t map_length;        

Re: [PATCH] httpd_indexcgi.c: fix compile error

2010-04-15 Thread Denys Vlasenko
On Thu, Apr 15, 2010 at 5:26 AM, Kim B. Heino kim.he...@bluegiga.com wrote: Signed-off-by: Kim B. Heino kim.he...@bluegiga.com diff -ur orig/networking/httpd_indexcgi.c busybox-1.16.1/networking/httpd_indexcgi.c --- orig/networking/httpd_indexcgi.c    2010-03-20 04:58:07.0 +0200

Re: Allow udhcp to not send a clientid

2010-04-15 Thread Denys Vlasenko
On Wed, Apr 14, 2010 at 9:11 PM, Alkis Georgopoulos alk...@gmail.com wrote: Στις 15-04-2010, ημέρα Πεμ, και ώρα 01:41 +0300, ο/η Alkis Georgopoulos έγραψε: Στις 14-04-2010, ημέρα Τετ, και ώρα 13:56 -0700, ο/η Denys Vlasenko έγραψε: Use option -C. It is documented in udhcpc --help. Ah, I

RE: hwclock -w takes 24 seconds

2010-04-15 Thread Cathey, Jim
2. Linux kernel will attempt to update RTC at 500ms mark and not at a second mark. Do they known something better? Perhaps they thought this minimizes average error in setting RTC time. Perhaps most RTC-reading ends up on a 1-second mark, and thus moving the writing avoids conflicts that at

Re: hwclock -w takes 24 seconds

2010-04-15 Thread Alain Mouette
Em 15-04-2010 04:11, Denys Vlasenko escreveu: 2. Linux kernel will attempt to update RTC at 500ms mark and not at a second mark. Do they known something better? Hmm, I didn't know that. Perhaps they thought this minimizes average error in setting RTC time. This makes sense. One problem in

[PATCH 00/39] Windows port, base and archival/

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Hi, This is something I think good enough to go upstream. The rest of my work is on: git://github.com/pclouds/busybox-w32.git wip Caveat: crappy, constantly rebased stuff as it's work in progress. However it may tell where this port leads to. If we don't count regex.c there are about 3k more

[PATCH 01/39] ar: do not filter listing if there is no extra argument

2010-04-15 Thread Nguyễn Thái Ngọc Duy
If ar t foo.a is called, the filter will be called unconditionally However, accept list is empty, so filter will fail. In the end nothing will be printed. This is a regresion from 535584c (ar: add archive creation support) Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- archival/ar.c

[PATCH 02/39] Config.in: add target platform selection

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Currently there is only one choice: POSIX. However non-POSIX platform may be supported in future. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Config.in | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/Config.in b/Config.in index 40af911..0d9f005

[PATCH 03/39] Config.in: add target platform WIN32

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Config.in |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/Config.in b/Config.in index 0d9f005..8cf6a22 100644 --- a/Config.in +++ b/Config.in @@ -18,6 +18,9 @@ choice config TARGET_POSIX bool POSIX +config

[PATCH 04/39] Config.in: disable all commmands when TARGET_WIN32 is selected

2010-04-15 Thread Nguyễn Thái Ngọc Duy
When TARGET_WIN32 is selected, all commands will be invisible. They will be unmasked when they are supported. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Config.in | 20 archival/Config.in |1 + console-tools/Config.in |1 +

[PATCH 05/39] win32: Refuse to build on Windows/MinGW unless TARGET_WIN32 is selected

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- include/platform.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/platform.h b/include/platform.h index 2d3821c..32180b5 100644 --- a/include/platform.h +++ b/include/platform.h @@ -7,6 +7,10 @@

[PATCH 06/39] win32: add missing system headers

2010-04-15 Thread Nguyễn Thái Ngọc Duy
These empty headers are to prevent #include errors. Of course those #include may be wrapped inside #ifdefs and excluded, but that would turn libbb.h into a #ifdef mess. Note that all missing declaration is in mingw.h, not in these files. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com ---

[PATCH 07/39] platform.h: support MinGW port

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- include/platform.h | 28 1 files changed, 24 insertions(+), 4 deletions(-) diff --git a/include/platform.h b/include/platform.h index 32180b5..24169e4 100644 --- a/include/platform.h +++

[PATCH 11/39] win32: platform.h: add bswap_xx()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- include/platform.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/platform.h b/include/platform.h index 24169e4..2ad2918 100644 --- a/include/platform.h +++ b/include/platform.h @@ -170,6 +170,13 @@

[PATCH 21/39] win32: add localtime_r()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index 1a47665..9ce7bc3 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -69,3 +69,10 @@ struct tm *gmtime_r(const

[PATCH 10/39] libbb.h: support MinGW port

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- include/libbb.h | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/include/libbb.h b/include/libbb.h index 976120e..ebb8045 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -75,6 +75,11 @@ #

[PATCH 23/39] win32: add signal routines and SIGALRM support

2010-04-15 Thread Nguyễn Thái Ngọc Duy
The implementation for SIGALRM only because Git needs it (I think for progress display or something). Probably not hurt having it. Although the only thing needed here are stubs. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c | 124

[PATCH 24/39] win32: add function to map windows errors to posix ones

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c | 113 + 1 files changed, 113 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index 72e2399..afd017e 100644 --- a/win32/mingw.c +++

[PATCH 25/39] win32: add link()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index afd017e..eccd37c 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -327,3 +327,24 @@

[PATCH 12/39] libbb: exclude files that will not compile on Windows

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- libbb/get_console.c |4 libbb/getpty.c |3 +++ libbb/inet_common.c |4 libbb/kernel_version.c |5 + libbb/login.c|5 + libbb/makedev.c |5 +

[PATCH 26/39] win32: add strsep()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index eccd37c..937e942 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -348,3 +348,21 @@ int

[PATCH 29/39] win32: add mkdir()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index 98a45e2..5aba8f5 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -380,3 +380,9 @@ const char

[PATCH 27/39] win32: add realpath()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index 937e942..981968a 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -366,3 +366,8 @@ char *strsep(char

[PATCH 22/39] win32: add getpwuid()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index 9ce7bc3..2b97761 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -76,3 +76,17 @@ struct tm

[PATCH 13/39] libbb: update messages.c to support Windows

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- libbb/messages.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/libbb/messages.c b/libbb/messages.c index 1d0e587..c3ddbf3 100644 --- a/libbb/messages.c +++ b/libbb/messages.c @@ -43,8 +43,13 @@ const char

[PATCH 28/39] win32: add get_busybox_exec_path(), which is bb_busybox_exec_path

2010-04-15 Thread Nguyễn Thái Ngọc Duy
This function will become bb_busybox_exec_path because there is no fixed installation location on Windows. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index

[PATCH 31/39] win32: add fcntl()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index 5aba8f5..cb0e7be 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -386,3 +386,11 @@ int mingw_mkdir(const

[PATCH 30/39] win32: add waitpid()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/Kbuild|1 + win32/process.c | 10 ++ 2 files changed, 11 insertions(+), 0 deletions(-) create mode 100644 win32/process.c diff --git a/win32/Kbuild b/win32/Kbuild index f065d42..315f808 100644 --- a/win32/Kbuild

[PATCH 32/39] win32: add poll()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Only works for pipes, as commented in the source code. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c | 69 + 1 files changed, 69 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index

[PATCH 33/39] win32: add getenv(), setenv(), unsetenv() and clearenv()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
clearenv() is not supported yet. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/Kbuild |1 + win32/env.c | 119 ++ 2 files changed, 120 insertions(+), 0 deletions(-) create mode 100644 win32/env.c diff --git

[PATCH 14/39] win32: Import fnmatch source

2010-04-15 Thread Nguyễn Thái Ngọc Duy
This was extracted from commit e56b799d6ad8afba4168fffa7218d44c041a72d2 in Git repository. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/Kbuild|7 + win32/fnmatch.c | 488 +++ win32/fnmatch.h | 84 ++ 3

[PATCH 34/39] Makefile: support building executable with extension

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Makefile| 15 --- Makefile.custom | 22 +++--- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 1481f01..a40be79 100644 --- a/Makefile +++ b/Makefile @@

[PATCH 39/39] win32: Unmask archival

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- archival/Config.in |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/archival/Config.in b/archival/Config.in index 3319ae8..32817cf 100644 --- a/archival/Config.in +++ b/archival/Config.in @@ -4,7 +4,6 @@ #

[PATCH 16/39] win32: add sleep()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index a85d81a..b92fa82 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -1,3 +1,9 @@ #include libbb.h unsigned

[PATCH 35/39] Makefile: support building on Windows using MinGW compiler

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Makefile |1 + Makefile.flags |6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index a40be79..9648604 100644 --- a/Makefile +++ b/Makefile @@ -481,6 +481,7 @@ libs-y := \

[PATCH 36/39] Add README.win32

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- README.win32 | 38 ++ 1 files changed, 38 insertions(+), 0 deletions(-) create mode 100644 README.win32 diff --git a/README.win32 b/README.win32 new file mode 100644 index 000..73e37cc ---

[PATCH 37/39] gzip: rename eof due to symbol conflict on Windows

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- archival/gzip.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/archival/gzip.c b/archival/gzip.c index a327d54..effee7f 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -1577,6 +1577,9 @@ static void

[PATCH 15/39] win32: set binary I/O mode by default

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Text mode is default on Windows, which is just bad. This file also hosts many functions that were extracted from commit e56b799d6ad8afba4168fffa7218d44c041a72d2 in Git repository, under directory compat. Some functions are modified/added by me, but usually credits go to Git developers.

[PATCH 17/39] win32: add mkstemp()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index b92fa82..3611872 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -7,3 +7,11 @@ unsigned int sleep

[PATCH 38/39] win32: getopt32: set optind = 0 on Windows

2010-04-15 Thread Nguyễn Thái Ngọc Duy
I haven't dug deep into this, but experiments show that optind = 1 does not work. Maybe MinGW guys took getopt from glibc? Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- libbb/getopt32.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libbb/getopt32.c

[PATCH 08/39] win32: add termios.h

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Just some declaration enough to build. Proper TTY support may come later, targeting Cygwin-based terminals. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/termios.h | 124 +++ 1 files changed, 124 insertions(+), 0

[PATCH 20/39] win32: add gmtime_r()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index 09d746f..1a47665 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -62,3 +62,10 @@ int pipe(int filedes[2])

[PATCH 09/39] win32: add mingw.h

2010-04-15 Thread Nguyễn Thái Ngọc Duy
This file is like libbb.h for MinGW port. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- include/mingw.h | 292 +++ 1 files changed, 292 insertions(+), 0 deletions(-) create mode 100644 include/mingw.h diff --git

[PATCH 18/39] win32: add gettimeofday()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c | 40 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index 3611872..020e9c4 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -15,3

[PATCH 19/39] win32: add pipe()

2010-04-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- win32/mingw.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/win32/mingw.c b/win32/mingw.c index 020e9c4..09d746f 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -55,3 +55,10 @@ int gettimeofday(struct

Re: hwclock -w takes 24 seconds

2010-04-15 Thread Rob Landley
On Thursday 15 April 2010 10:55:47 Cathey, Jim wrote: 2. Linux kernel will attempt to update RTC at 500ms mark and not at a second mark. Do they known something better? Perhaps they thought this minimizes average error in setting RTC time. Perhaps most RTC-reading ends up on a 1-second

Re: [PATCH 01/39] ar: do not filter listing if there is no extra argument

2010-04-15 Thread Denys Vlasenko
2010/4/15 Nguyễn Thái Ngọc Duy pclo...@gmail.com: If ar t foo.a is called, the filter will be called unconditionally However, accept list is empty, so filter will fail. In the end nothing will be printed. This is a regresion from 535584c (ar: add archive creation support) Signed-off-by:

Re: [PATCH 37/39] gzip: rename eof due to symbol conflict on Windows

2010-04-15 Thread Dan Fandrich
On Thu, Apr 15, 2010 at 10:02:22PM +0200, Nguy�n Thái Ng�c Duy wrote: +#ifdef __MINGW32__ +#define eof eof_ +#endif Rather than special-casing eof in the MingW32 case, why not just rename the instances of eof in the code to something else? It seems to be used in ways local to this file

Re: [PATCH 35/39] Makefile: support building on Windows using MinGW compiler

2010-04-15 Thread Dan Fandrich
On Thu, Apr 15, 2010 at 10:02:20PM +0200, Nguy�n Thái Ng�c Duy wrote: +ifeq ($(CONFIG_TARGET_WIN32),y) Many parts of this patch series depend on CONFIG_TARGET_WIN32. But it seems many instances are really specific to MingW32 rather than generically Win32. If someone later does a Cygwin

Re: [PATCH 26/39] win32: add strsep()

2010-04-15 Thread Dan Fandrich
On Thu, Apr 15, 2010 at 10:01:34PM +0200, Nguy�n Thái Ng�c Duy wrote: +char *strsep(char **stringp, const char *delim) strsep() is a non-standard function that other platforms need in addition to Windows. Attached is an alternate patch, part of a series improving portability that I haven't

Re: [PATCH 27/39] win32: add realpath()

2010-04-15 Thread Dan Fandrich
On Thu, Apr 15, 2010 at 10:01:35PM +0200, Nguy�n Thái Ng�c Duy wrote: +char *realpath(const char *path, char *resolved_path) +{ + return strcpy(resolved_path, path); +} I assume you mean this as a temporary stub to enable compilation. If so, it should have a comment as such. I would

Re: [PATCH 31/39] win32: add fcntl()

2010-04-15 Thread Dan Fandrich
On Thu, Apr 15, 2010 at 10:02:16PM +0200, Nguy�n Thái Ng�c Duy wrote: +int fcntl(int fd UNUSED_PARAM, int cmd, ...) +{ + if (cmd == F_GETFD || cmd == F_SETFD || cmd == F_GETFL) + return 0; + errno = EINVAL; + return -1; +} Returing 0 makes sense for F_GETFD and