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

Nguyễn Thái Ngọc Duy pclouds at gmail.com
Thu Apr 15 19:58:20 UTC 2010


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 lines to go.


Nguyễn Thái Ngọc Duy (39):
  ar: do not filter listing if there is no extra argument

This is a regression, not related to Windows port at all.

  Config.in: add target platform selection
  Config.in: add target platform WIN32
  Config.in: disable all commmands when TARGET_WIN32 is selected
  win32: Refuse to build on Windows/MinGW unless TARGET_WIN32 is
    selected
  win32: add missing system headers
  platform.h: support MinGW port
  win32: add termios.h
  win32: add mingw.h
  libbb.h: support MinGW port
  win32: platform.h: add bswap_xx()
  libbb: exclude files that will not compile on Windows
  libbb: update messages.c to support Windows
  win32: Import fnmatch source
  win32: set binary I/O mode by default
  win32: add sleep()
  win32: add mkstemp()
  win32: add gettimeofday()
  win32: add pipe()
  win32: add gmtime_r()
  win32: add localtime_r()
  win32: add getpwuid()
  win32: add signal routines and SIGALRM support
  win32: add function to map windows errors to posix ones
  win32: add link()
  win32: add strsep()
  win32: add realpath()
  win32: add get_busybox_exec_path(), which is bb_busybox_exec_path
  win32: add mkdir()
  win32: add waitpid()
  win32: add fcntl()
  win32: add poll()
  win32: add getenv(), setenv(), unsetenv() and clearenv()
  Makefile: support building executable with extension
  Makefile: support building on Windows using MinGW compiler
  Add README.win32

Very basic stuff just enough to make a succesful build. You
will have a nice 52K busybox.exe, with no applets.

  gzip: rename eof due to symbol conflict on Windows
  win32: getopt32: set optind = 0 on Windows
  win32: Unmask archival

We now have some archival applets.


 Config.in                |   34 ++++
 Makefile                 |   16 +-
 Makefile.custom          |   22 +-
 Makefile.flags           |    6 +
 README.win32             |   38 ++++
 archival/Config.in       |    7 +
 archival/ar.c            |    3 +-
 archival/gzip.c          |    6 +
 console-tools/Config.in  |    1 +
 coreutils/Config.in      |    1 +
 debianutils/Config.in    |    1 +
 e2fsprogs/Config.in      |    1 +
 editors/Config.in        |    1 +
 findutils/Config.in      |    1 +
 include/libbb.h          |   20 ++
 include/mingw.h          |  292 +++++++++++++++++++++++++++
 include/platform.h       |   35 +++-
 init/Config.in           |    1 +
 libbb/get_console.c      |    4 +
 libbb/getopt32.c         |    2 +-
 libbb/getpty.c           |    3 +
 libbb/inet_common.c      |    4 +
 libbb/kernel_version.c   |    5 +
 libbb/login.c            |    5 +
 libbb/makedev.c          |    5 +
 libbb/match_fstype.c     |    4 +
 libbb/messages.c         |    7 +
 libbb/safe_gethostname.c |    4 +
 libbb/signals.c          |    2 +
 libbb/udp_io.c           |    2 +
 libbb/xconnect.c         |    2 +
 libbb/xfuncs.c           |    4 +
 libbb/xfuncs_printf.c    |    4 +
 libbb/xgethostbyname.c   |    4 +
 loginutils/Config.in     |    1 +
 mailutils/Config.in      |    1 +
 miscutils/Config.in      |    1 +
 modutils/Config.in       |    1 +
 networking/Config.in     |    1 +
 printutils/Config.in     |    1 +
 procps/Config.in         |    1 +
 runit/Config.in          |    1 +
 shell/Config.in          |    1 +
 sysklogd/Config.in       |    1 +
 util-linux/Config.in     |    1 +
 win32/Kbuild             |   10 +
 win32/env.c              |  119 +++++++++++
 win32/fnmatch.c          |  488 ++++++++++++++++++++++++++++++++++++++++++++++
 win32/fnmatch.h          |   84 ++++++++
 win32/mingw.c            |  465 +++++++++++++++++++++++++++++++++++++++++++
 win32/process.c          |   10 +
 win32/termios.h          |  124 ++++++++++++
 52 files changed, 1836 insertions(+), 22 deletions(-)
 create mode 100644 README.win32
 create mode 100644 include/mingw.h
 create mode 100644 win32/Kbuild
 create mode 100644 win32/env.c
 create mode 100644 win32/fnmatch.c
 create mode 100644 win32/fnmatch.h
 create mode 100644 win32/grp.h
 create mode 100644 win32/mingw.c
 create mode 100644 win32/netdb.h
 create mode 100644 win32/process.c
 create mode 100644 win32/pwd.h
 create mode 100644 win32/sys/ioctl.h
 create mode 100644 win32/sys/mman.h
 create mode 100644 win32/sys/poll.h
 create mode 100644 win32/sys/socket.h
 create mode 100644 win32/sys/wait.h
 create mode 100644 win32/termios.h



More information about the busybox mailing list