Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 diff --git a/Makefile.in b/Makefile.in | |
| 2 index dab25d0..e2ddb16 100644 | |
| 3 --- a/Makefile.in | |
| 4 +++ b/Makefile.in | |
| 5 @@ -612,7 +612,7 @@ nodist_src_libver_a_OBJECTS = src/version.$(OBJEXT) | |
| 6 src_libver_a_OBJECTS = $(nodist_src_libver_a_OBJECTS) | |
| 7 am__EXEEXT_1 = src/arch$(EXEEXT) src/hostname$(EXEEXT) | |
| 8 am__EXEEXT_2 = src/chroot$(EXEEXT) src/df$(EXEEXT) src/hostid$(EXEEXT) \ | |
| 9 - src/libstdbuf.so$(EXEEXT) src/nice$(EXEEXT) src/pinky$(EXEEXT) \ | |
|
Sam Clegg
2014/01/15 16:48:39
Is this an upstream bug?
hamaji
2014/01/16 05:43:46
Yes, I think. What are we doing for upstreamable c
| |
| 10 + src/libstdbuf.so src/nice$(EXEEXT) src/pinky$(EXEEXT) \ | |
| 11 src/stdbuf$(EXEEXT) src/stty$(EXEEXT) src/uptime$(EXEEXT) \ | |
| 12 src/users$(EXEEXT) src/who$(EXEEXT) | |
| 13 am__EXEEXT_3 = src/[$(EXEEXT) src/base64$(EXEEXT) \ | |
| 14 @@ -1493,7 +1493,7 @@ CPP = @CPP@ | |
| 15 CPPFLAGS = @CPPFLAGS@ | |
| 16 CYGPATH_W = @CYGPATH_W@ | |
| 17 DEFAULT_POSIX2_VERSION = @DEFAULT_POSIX2_VERSION@ | |
| 18 -DEFS = @DEFS@ | |
| 19 +DEFS = @DEFS@ -Dmain=nacl_main | |
| 20 DEPDIR = @DEPDIR@ | |
| 21 ECHO_C = @ECHO_C@ | |
| 22 ECHO_N = @ECHO_N@ | |
| 23 @@ -2306,7 +2306,7 @@ LIBMULTITHREAD = @LIBMULTITHREAD@ | |
| 24 LIBOBJS = @LIBOBJS@ | |
| 25 LIBPTH = @LIBPTH@ | |
| 26 LIBPTH_PREFIX = @LIBPTH_PREFIX@ | |
| 27 -LIBS = @LIBS@ | |
| 28 +LIBS = @LIBS@ $(EXTRA_LIBS) | |
| 29 LIBSOCKET = @LIBSOCKET@ | |
| 30 LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ | |
| 31 LIBTHREAD = @LIBTHREAD@ | |
| 32 @@ -2749,7 +2749,9 @@ libexecdir = @libexecdir@ | |
| 33 lispdir = @lispdir@ | |
| 34 localedir = @localedir@ | |
| 35 localstatedir = @localstatedir@ | |
| 36 -man1_MANS = @man1_MANS@ | |
| 37 +# The build rule for man pages are broken for NaCl, and we do not need | |
| 38 +# man pages anyway. | |
| 39 +#man1_MANS = @man1_MANS@ | |
| 40 mandir = @mandir@ | |
| 41 mkdir_p = @mkdir_p@ | |
| 42 oldincludedir = @oldincludedir@ | |
| 43 @@ -5579,8 +5581,8 @@ src/kill$(EXEEXT): $(src_kill_OBJECTS) $(src_kill_DEPENDEN CIES) $(EXTRA_src_kill | |
| 44 src/src_libstdbuf_so-libstdbuf.$(OBJEXT): src/$(am__dirstamp) \ | |
| 45 src/$(DEPDIR)/$(am__dirstamp) | |
| 46 | |
| 47 -src/libstdbuf.so$(EXEEXT): $(src_libstdbuf_so_OBJECTS) $(src_libstdbuf_so_DEPEN DENCIES) $(EXTRA_src_libstdbuf_so_DEPENDENCIES) src/$(am__dirstamp) | |
| 48 - @rm -f src/libstdbuf.so$(EXEEXT) | |
| 49 +src/libstdbuf.so: $(src_libstdbuf_so_OBJECTS) $(src_libstdbuf_so_DEPENDENCIES) $(EXTRA_src_libstdbuf_so_DEPENDENCIES) src/$(am__dirstamp) | |
| 50 + @rm -f src/libstdbuf.so | |
| 51 $(AM_V_CCLD)$(src_libstdbuf_so_LINK) $(src_libstdbuf_so_OBJECTS) $(src_l ibstdbuf_so_LDADD) $(LIBS) | |
| 52 src/link.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) | |
| 53 | |
| 54 diff --git a/lib/openat.c b/lib/openat.c | |
| 55 index fd1ff91..0155f9d 100644 | |
| 56 --- a/lib/openat.c | |
| 57 +++ b/lib/openat.c | |
| 58 @@ -27,6 +27,11 @@ | |
| 59 #include <sys/types.h> | |
| 60 #undef __need_system_fcntl_h | |
| 61 | |
| 62 +#if defined(__native_client__) | |
| 63 +/* We do not have openat. */ | |
| 64 +#undef HAVE_OPENAT | |
| 65 +#endif | |
| 66 + | |
| 67 #if HAVE_OPENAT | |
| 68 static int | |
| 69 orig_openat (int fd, char const *filename, int flags, mode_t mode) | |
| 70 diff --git a/lib/sigaction.c b/lib/sigaction.c | |
| 71 index 97eb76d..86c9008 100644 | |
| 72 --- a/lib/sigaction.c | |
| 73 +++ b/lib/sigaction.c | |
| 74 @@ -15,6 +15,8 @@ | |
| 75 You should have received a copy of the GNU General Public License | |
| 76 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
| 77 | |
| 78 +#if !defined(__native_client__) | |
| 79 + | |
| 80 #include <config.h> | |
| 81 | |
| 82 /* Specification. */ | |
| 83 @@ -202,3 +204,5 @@ sigaction (int sig, const struct sigaction *restrict act, | |
| 84 errno = saved_errno; | |
| 85 return -1; | |
| 86 } | |
| 87 + | |
| 88 +#endif | |
| 89 diff --git a/lib/signal.in.h b/lib/signal.in.h | |
| 90 index a531487..4f5d605 100644 | |
| 91 --- a/lib/signal.in.h | |
| 92 +++ b/lib/signal.in.h | |
| 93 @@ -402,6 +402,10 @@ typedef struct siginfo_t siginfo_t; | |
| 94 /* We assume that platforms which lack the sigaction() function also lack | |
| 95 the 'struct sigaction' type, and vice versa. */ | |
| 96 | |
| 97 +# if defined(__native_client__) | |
| 98 +# define GNULIB_defined_struct_sigaction 1 | |
| 99 +# endif | |
| 100 + | |
| 101 # if !GNULIB_defined_struct_sigaction | |
| 102 | |
| 103 struct sigaction | |
| 104 diff --git a/src/fs.h b/src/fs.h | |
| 105 index 8826c4f..c8d2a23 100644 | |
| 106 --- a/src/fs.h | |
| 107 +++ b/src/fs.h | |
| 108 @@ -2,7 +2,7 @@ | |
| 109 Please send additions to bug-coreutils@gnu.org and meskes@debian.org. | |
| 110 This file is generated automatically from ./src/stat.c. */ | |
| 111 | |
| 112 -#if defined __linux__ | |
| 113 +#if defined __linux__ || defined __native_client__ | |
| 114 # define S_MAGIC_ADFS 0xADF5 | |
| 115 # define S_MAGIC_AFFS 0xADFF | |
| 116 # define S_MAGIC_AFS 0x5346414F | |
| 117 diff --git a/src/ls.c b/src/ls.c | |
| 118 index e7d1d93..518c39f 100644 | |
| 119 --- a/src/ls.c | |
| 120 +++ b/src/ls.c | |
| 121 @@ -3641,7 +3641,12 @@ align_nstrftime (char *buf, size_t size, char const *fmt, struct tm const *tm, | |
| 122 char *pfmt = rpl_fmt; | |
| 123 nfmt = rpl_fmt; | |
| 124 | |
| 125 +#if defined(__native_client__) | |
|
Sam Clegg
2014/01/15 16:48:39
What is this fix? Can you add a comment maybe?
hamaji
2014/01/16 05:43:46
Sorry, I forgot to write comments for this patch.
| |
| 126 + memcpy (pfmt, fmt, pb - fmt); | |
| 127 + pfmt = pfmt + (pb - fmt); | |
| 128 +#else | |
| 129 pfmt = mempcpy (pfmt, fmt, pb - fmt); | |
| 130 +#endif | |
| 131 pfmt = stpcpy (pfmt, abmon[tm->tm_mon]); | |
| 132 strcpy (pfmt, pb + 2); | |
| 133 } | |
| OLD | NEW |