On 7/7/2011 1:36 PM, [email protected] wrote:

Oops, there was a typo in the patch, which breaks hush. Use this instead.

Patching is just the standard way i guess:
$ patch -p1 < cygwin.diff

Yes.

szgyg
diff --git a/.gitignore b/.gitignore
index 0a0c65b..cf7e8b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,14 +5,18 @@
 *.o
 *.o.*
 *.a
+*.exe
 *.s
 Kbuild
 Config.in
+/include/applets.h
+/include/usage.h
 
 #
 # Never ignore these
 #
 !.gitignore
diff --git a/Makefile b/Makefile
index c58097d..3093291 100644
--- a/Makefile
+++ b/Makefile
@@ -720,7 +720,7 @@ ifeq ($(SKIP_STRIP),y)
        $(Q)cp $< $@
 else
        $(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \
-               busybox_unstripped -o $@
+               busybox_unstripped -o [email protected]
 # strip is confused by PIE executable and does not set exec bits
        $(Q)chmod a+x $@
 endif
diff --git a/coreutils/du.c b/coreutils/du.c
index b8bbe3d..eea084c 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -94,6 +94,7 @@ static void print(unsigned long size, const char *filename)
 {
        /* TODO - May not want to defer error checking here. */
 #if ENABLE_FEATURE_HUMAN_READABLE
+       IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(size *= 2;)
        printf("%s\t%s\n",
                        /* size x 512 / G.disp_hr, show one fractional,
                         * use suffixes if G.disp_hr == 0 */
@@ -194,8 +195,7 @@ int du_main(int argc UNUSED_PARAM, char **argv)
        unsigned opt;
 
 #if ENABLE_FEATURE_HUMAN_READABLE
-       IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 1024;)
-       IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 512;)
+       G.disp_hr = 1024;
        if (getenv("POSIXLY_CORRECT"))  /* TODO - a new libbb function? */
                G.disp_hr = 512;
 #else
diff --git a/include/platform.h b/include/platform.h
index 60864c9..4162373 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -116,7 +116,7 @@
 
 /* Make all declarations hidden (-fvisibility flag only affects definitions) */
 /* (don't include system headers after this until corresponding pop!) */
-#if __GNUC_PREREQ(4,1)
+#if __GNUC_PREREQ(4,1) && !defined(__CYGWIN__)
 # define PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN _Pragma("GCC visibility 
push(hidden)")
 # define POP_SAVED_FUNCTION_VISIBILITY              _Pragma("GCC visibility 
pop")
 #else
@@ -389,6 +389,20 @@ typedef unsigned smalluint;
 # undef HAVE_NET_ETHERNET_H
 #endif
 
+#if defined(__CYGWIN__)
+# undef HAVE_CLEARENV
+# undef HAVE_FDPRINTF
+# undef HAVE_MEMRCHR
+# undef HAVE_PTSNAME_R
+# undef HAVE_STRVERSCMP
+# undef HAVE_UNLOCKED_LINE_OPS
+# define MAXSYMLINKS SYMLOOP_MAX
+# define __socklen_t_defined 1
+# define sigisemptyset(x) (*(x) == (sigset_t)0)
+# define stime(x) (errno=ENOSYS,-1)
+# define sethostname(x,y) (errno=ENOSYS,-1)
+#endif
+
 /* These BSD-derived OSes share many similarities */
 #if (defined __digital__ && defined __unix__) \
  || defined __APPLE__ \
diff --git a/libbb/udp_io.c b/libbb/udp_io.c
index b8fb675..a577434 100644
--- a/libbb/udp_io.c
+++ b/libbb/udp_io.c
@@ -83,7 +83,7 @@ send_to_from(int fd, void *buf, size_t len, int flags,
                 * and CMSG_DATA returns &u + size_t + int + int.
                 * Thus direct assignment is ok:
                 */
-               pktptr->ipi_spec_dst = ((struct sockaddr_in*)from)->sin_addr;
+//             pktptr->ipi_spec_dst = ((struct sockaddr_in*)from)->sin_addr;
        }
 # if ENABLE_FEATURE_IPV6 && defined(IPV6_PKTINFO)
        else if (to->sa_family == AF_INET6 && from->sa_family == AF_INET6) {
diff --git a/shell/cttyhack.c b/shell/cttyhack.c
index d1ac2cd..0cd0ecb 100644
--- a/shell/cttyhack.c
+++ b/shell/cttyhack.c
@@ -139,7 +139,7 @@ int cttyhack_main(int argc UNUSED_PARAM, char **argv)
                        /* Some other session may have it as ctty,
                         * steal it from them:
                         */
-                       ioctl(0, TIOCSCTTY, 1);
+//                     ioctl(0, TIOCSCTTY, 1);
                }
        }
 
diff --git a/util-linux/script.c b/util-linux/script.c
index 8fb991d..71aa527 100644
--- a/util-linux/script.c
+++ b/util-linux/script.c
@@ -195,7 +195,7 @@ int script_main(int argc UNUSED_PARAM, char **argv)
                ioctl(0, TIOCSWINSZ, (char *)&win);
        /* set pty as a controlling tty */
        setsid();
-       ioctl(0, TIOCSCTTY, 0 /* 0: don't forcibly steal */);
+//     ioctl(0, TIOCSCTTY, 0 /* 0: don't forcibly steal */);
 
        /* Non-ignored signals revert to SIG_DFL on exec anyway */
        /*signal(SIGCHLD, SIG_DFL);*/
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to