OLD | NEW |
(Empty) | |
| 1 diff --git a/Makefile.in b/Makefile.in |
| 2 index dab25d0..04646f6 100644 |
| 3 --- a/Makefile.in |
| 4 +++ b/Makefile.in |
| 5 @@ -611,8 +611,9 @@ src_libver_a_LIBADD = |
| 6 nodist_src_libver_a_OBJECTS = src/version.$(OBJEXT) |
| 7 src_libver_a_OBJECTS = $(nodist_src_libver_a_OBJECTS) |
| 8 am__EXEEXT_1 = src/arch$(EXEEXT) src/hostname$(EXEEXT) |
| 9 +# Removed $(EXEEXT) from libstdbuf.so. This is an upstream bug. |
| 10 am__EXEEXT_2 = src/chroot$(EXEEXT) src/df$(EXEEXT) src/hostid$(EXEEXT) \ |
| 11 - src/libstdbuf.so$(EXEEXT) src/nice$(EXEEXT) src/pinky$(EXEEXT) \ |
| 12 + src/libstdbuf.so src/nice$(EXEEXT) src/pinky$(EXEEXT) \ |
| 13 src/stdbuf$(EXEEXT) src/stty$(EXEEXT) src/uptime$(EXEEXT) \ |
| 14 src/users$(EXEEXT) src/who$(EXEEXT) |
| 15 am__EXEEXT_3 = src/[$(EXEEXT) src/base64$(EXEEXT) \ |
| 16 @@ -1493,7 +1494,7 @@ CPP = @CPP@ |
| 17 CPPFLAGS = @CPPFLAGS@ |
| 18 CYGPATH_W = @CYGPATH_W@ |
| 19 DEFAULT_POSIX2_VERSION = @DEFAULT_POSIX2_VERSION@ |
| 20 -DEFS = @DEFS@ |
| 21 +DEFS = @DEFS@ -Dmain=nacl_main |
| 22 DEPDIR = @DEPDIR@ |
| 23 ECHO_C = @ECHO_C@ |
| 24 ECHO_N = @ECHO_N@ |
| 25 @@ -2306,7 +2307,7 @@ LIBMULTITHREAD = @LIBMULTITHREAD@ |
| 26 LIBOBJS = @LIBOBJS@ |
| 27 LIBPTH = @LIBPTH@ |
| 28 LIBPTH_PREFIX = @LIBPTH_PREFIX@ |
| 29 -LIBS = @LIBS@ |
| 30 +LIBS = @LIBS@ $(EXTRA_LIBS) |
| 31 LIBSOCKET = @LIBSOCKET@ |
| 32 LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ |
| 33 LIBTHREAD = @LIBTHREAD@ |
| 34 @@ -2749,7 +2750,9 @@ libexecdir = @libexecdir@ |
| 35 lispdir = @lispdir@ |
| 36 localedir = @localedir@ |
| 37 localstatedir = @localstatedir@ |
| 38 -man1_MANS = @man1_MANS@ |
| 39 +# The build rule for man pages are broken for NaCl, and we do not need |
| 40 +# man pages anyway. |
| 41 +#man1_MANS = @man1_MANS@ |
| 42 mandir = @mandir@ |
| 43 mkdir_p = @mkdir_p@ |
| 44 oldincludedir = @oldincludedir@ |
| 45 @@ -5579,8 +5582,9 @@ src/kill$(EXEEXT): $(src_kill_OBJECTS) $(src_kill_DEPENDEN
CIES) $(EXTRA_src_kill |
| 46 src/src_libstdbuf_so-libstdbuf.$(OBJEXT): src/$(am__dirstamp) \ |
| 47 src/$(DEPDIR)/$(am__dirstamp) |
| 48 |
| 49 -src/libstdbuf.so$(EXEEXT): $(src_libstdbuf_so_OBJECTS) $(src_libstdbuf_so_DEPEN
DENCIES) $(EXTRA_src_libstdbuf_so_DEPENDENCIES) src/$(am__dirstamp) |
| 50 - @rm -f src/libstdbuf.so$(EXEEXT) |
| 51 +# Removed $(EXEEXT) from libstdbuf.so. This is an upstream bug. |
| 52 +src/libstdbuf.so: $(src_libstdbuf_so_OBJECTS) $(src_libstdbuf_so_DEPENDENCIES)
$(EXTRA_src_libstdbuf_so_DEPENDENCIES) src/$(am__dirstamp) |
| 53 + @rm -f src/libstdbuf.so |
| 54 $(AM_V_CCLD)$(src_libstdbuf_so_LINK) $(src_libstdbuf_so_OBJECTS) $(src_l
ibstdbuf_so_LDADD) $(LIBS) |
| 55 src/link.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) |
| 56 |
| 57 diff --git a/lib/openat.c b/lib/openat.c |
| 58 index fd1ff91..0155f9d 100644 |
| 59 --- a/lib/openat.c |
| 60 +++ b/lib/openat.c |
| 61 @@ -27,6 +27,11 @@ |
| 62 #include <sys/types.h> |
| 63 #undef __need_system_fcntl_h |
| 64 |
| 65 +#if defined(__native_client__) |
| 66 +/* We do not have openat. */ |
| 67 +#undef HAVE_OPENAT |
| 68 +#endif |
| 69 + |
| 70 #if HAVE_OPENAT |
| 71 static int |
| 72 orig_openat (int fd, char const *filename, int flags, mode_t mode) |
| 73 diff --git a/lib/sigaction.c b/lib/sigaction.c |
| 74 index 97eb76d..330e0f8 100644 |
| 75 --- a/lib/sigaction.c |
| 76 +++ b/lib/sigaction.c |
| 77 @@ -15,6 +15,10 @@ |
| 78 You should have received a copy of the GNU General Public License |
| 79 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 80 |
| 81 +/* ./configure script detects sigaction in nacl-glibc is just a stub, |
| 82 + but we use the stub implementation as the following does not compile. */ |
| 83 +#if !defined(__native_client__) |
| 84 + |
| 85 #include <config.h> |
| 86 |
| 87 /* Specification. */ |
| 88 @@ -202,3 +206,5 @@ sigaction (int sig, const struct sigaction *restrict act, |
| 89 errno = saved_errno; |
| 90 return -1; |
| 91 } |
| 92 + |
| 93 +#endif |
| 94 diff --git a/lib/signal.in.h b/lib/signal.in.h |
| 95 index a531487..241625a 100644 |
| 96 --- a/lib/signal.in.h |
| 97 +++ b/lib/signal.in.h |
| 98 @@ -402,6 +402,12 @@ typedef struct siginfo_t siginfo_t; |
| 99 /* We assume that platforms which lack the sigaction() function also lack |
| 100 the 'struct sigaction' type, and vice versa. */ |
| 101 |
| 102 +/* ./configure script detects sigaction in nacl-glibc is just a stub, |
| 103 + but we do have struct sigaction. */ |
| 104 +# if defined(__native_client__) |
| 105 +# define GNULIB_defined_struct_sigaction 1 |
| 106 +# endif |
| 107 + |
| 108 # if !GNULIB_defined_struct_sigaction |
| 109 |
| 110 struct sigaction |
| 111 diff --git a/src/fs.h b/src/fs.h |
| 112 index 8826c4f..7b5b0bf 100644 |
| 113 --- a/src/fs.h |
| 114 +++ b/src/fs.h |
| 115 @@ -2,7 +2,10 @@ |
| 116 Please send additions to bug-coreutils@gnu.org and meskes@debian.org. |
| 117 This file is generated automatically from ./src/stat.c. */ |
| 118 |
| 119 -#if defined __linux__ |
| 120 +/* nacl_io does not have statfs so the following magic numbers which |
| 121 + specify the type of a filesystem is useless, but we need their |
| 122 + definitions to compile everything in coreutils. */ |
| 123 +#if defined __linux__ || defined __native_client__ |
| 124 # define S_MAGIC_ADFS 0xADF5 |
| 125 # define S_MAGIC_AFFS 0xADFF |
| 126 # define S_MAGIC_AFS 0x5346414F |
| 127 diff --git a/src/ls.c b/src/ls.c |
| 128 index e7d1d93..35f6ee6 100644 |
| 129 --- a/src/ls.c |
| 130 +++ b/src/ls.c |
| 131 @@ -36,6 +36,9 @@ |
| 132 Greg Lee <lee@uhunix.uhcc.hawaii.edu>. */ |
| 133 |
| 134 #include <config.h> |
| 135 +/* Disable _FORTIFY_SOURCE in this module to work-around the issue in mempcpy. |
| 136 + https://code.google.com/p/nativeclient/issues/detail?id=3770 */ |
| 137 +#undef _FORTIFY_SOURCE |
| 138 #include <sys/types.h> |
| 139 |
| 140 #include <termios.h> |
OLD | NEW |