Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: ports/apr/nacl.patch

Issue 139153007: Add pnacl + newlib support to apr and apr-util. (Closed) Base URL: https://naclports.googlecode.com/svn/trunk/src
Patch Set: rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ports/apr/build.sh ('k') | ports/apr/pkg_info » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 diff --git a/Makefile.in b/Makefile.in 1 diff --git a/Makefile.in b/Makefile.in
2 index 2ccaaf3..3a34445 100644 2 index 2ccaaf3..0cdd738 100644
3 --- a/Makefile.in 3 --- a/Makefile.in
4 +++ b/Makefile.in 4 +++ b/Makefile.in
5 @@ -18,7 +18,7 @@ APR_MAJOR_VERSION=@APR_MAJOR_VERSION@ 5 @@ -18,7 +18,7 @@ APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
6 INCDIR=./include 6 INCDIR=./include
7 OSDIR=$(top_srcdir)/include/arch/@OSDIR@ 7 OSDIR=$(top_srcdir)/include/arch/@OSDIR@
8 DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@ 8 DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@
9 -INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_srcdir)/include/arch/@DEF AULT_OSDIR@ -I$(top_srcdir)/include -I$(top_srcdir)/include/private 9 -INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_srcdir)/include/arch/@DEF AULT_OSDIR@ -I$(top_srcdir)/include -I$(top_srcdir)/include/private
10 +INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_srcdir)/include/arch/@DEF AULT_OSDIR@ -I$(top_srcdir)/include -I$(top_srcdir)/include/private -Iinclude/pr ivate 10 +INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_srcdir)/include/arch/@DEF AULT_OSDIR@ -I$(top_srcdir)/include -I$(top_srcdir)/include/private -Iinclude/pr ivate
11 11
12 # 12 #
13 # Macros for target determination 13 # Macros for target determination
14 @@ -134,7 +134,8 @@ tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) 14 @@ -45,8 +45,8 @@ LT_VERSION = @LT_VERSION@
15 » $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) 15 @INCLUDE_OUTPUTS@
16 16
17 include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ 17 CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
18 -» build/apr_rules.out tools/gen_test_char@EXEEXT@ \
19 -» tools/gen_test_char.o tools/gen_test_char.lo \
20 +» build/apr_rules.out tools/gen_test_char \
21 +» tools/gen_test_char.o \
22 » include/private/apr_escape_test_char.h
23 DISTCLEAN_TARGETS = config.cache config.log config.status \
24 » include/apr.h include/arch/unix/apr_private.h \
25 @@ -129,12 +129,18 @@ check: $(TARGET_LIB)
26 etags:
27 » etags `find . -name '*.[ch]'`
28
29 -OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
30 -tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
31 -» $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
32 +tools/gen_test_char.o: tools/gen_test_char.c
33 +» mkdir -p tools
34 +» gcc -c $< -o $@
35
36 -include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
18 - tools/gen_test_char@EXEEXT@ > $@ 37 - tools/gen_test_char@EXEEXT@ > $@
38 +
39 +OBJECTS_gen_test_char = tools/gen_test_char.o
40 +tools/gen_test_char: $(OBJECTS_gen_test_char)
41 + gcc $(OBJECTS_gen_test_char) -o $@
42 +
43 +include/private/apr_escape_test_char.h: tools/gen_test_char
19 + mkdir -p include/private 44 + mkdir -p include/private
20 +» $(RUNPROGRAM) tools/gen_test_char@EXEEXT@ > $@ 45 +» tools/gen_test_char > $@
21 46
22 LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LT_LDFLAGS) \ 47 LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LT_LDFLAGS) \
23 @LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@ 48 @LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@
24 diff --git a/configure b/configure 49 diff --git a/configure b/configure
25 index 0b5b83a..52be06b 100755 50 index 0b5b83a..d7370ca 100755
26 --- a/configure 51 --- a/configure
27 +++ b/configure 52 +++ b/configure
28 @@ -11760,7 +11760,7 @@ irix5* | irix6* | nonstopux*) 53 @@ -20959,7 +20959,8 @@ if ${ac_cv_file__dev_zero+:} false; then :
29 ;;
30
31 # This must be glibc/ELF.
32 -linux* | k*bsd*-gnu | kopensolaris*-gnu)
33 +linux* | k*bsd*-gnu | kopensolaris*-gnu | nacl* | nacl*)
34 lt_cv_deplibs_check_method=pass_all
35 ;;
36
37 @@ -16955,6 +16955,28 @@ uts4*)
38 shlibpath_var=LD_LIBRARY_PATH
39 ;;
40
41 +nacl)
42 + if $CC -v 2>&1 | grep -q enable-shared; then
43 + dynamic_linker="GNU/NaCl ld.so"
44 + version_type=linux
45 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}$ {release}${shared_ext}${major} ${libname}${shared_ext}'
46 + soname_spec='${libname}${release}${shared_ext}$major'
47 + else
48 + dynamic_linker=no
49 + fi
50 + ;;
51 +
52 +nacl)
53 + if $CC -v 2>&1 | grep -q enable-shared; then
54 + dynamic_linker="GNU/NaCl ld.so"
55 + version_type=linux
56 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}$ {release}${shared_ext}${major} ${libname}${shared_ext}'
57 + soname_spec='${libname}${release}${shared_ext}$major'
58 + else
59 + dynamic_linker=no
60 + fi
61 + ;;
62 +
63 *)
64 dynamic_linker=no
65 ;;
66 @@ -20959,7 +20981,8 @@ if ${ac_cv_file__dev_zero+:} false; then :
67 $as_echo_n "(cached) " >&6 54 $as_echo_n "(cached) " >&6
68 else 55 else
69 test "$cross_compiling" = yes && 56 test "$cross_compiling" = yes &&
70 - as_fn_error $? "cannot check for file existence when cross compiling" "$LINEN O" 5 57 - as_fn_error $? "cannot check for file existence when cross compiling" "$LINEN O" 5
71 + ac_cv_file__dev_zero=no 58 + ac_cv_file__dev_zero=no
72 + #as_fn_error $? "cannot check for file existence when cross compiling" "$LINE NO" 5 59 + #as_fn_error $? "cannot check for file existence when cross compiling" "$LINE NO" 5
73 if test -r "/dev/zero"; then 60 if test -r "/dev/zero"; then
74 ac_cv_file__dev_zero=yes 61 ac_cv_file__dev_zero=yes
75 else 62 else
76 @@ -23051,7 +23074,8 @@ if ${ac_cv_func_setpgrp_void+:} false; then : 63 @@ -23051,7 +23052,8 @@ if ${ac_cv_func_setpgrp_void+:} false; then :
77 $as_echo_n "(cached) " >&6 64 $as_echo_n "(cached) " >&6
78 else 65 else
79 if test "$cross_compiling" = yes; then : 66 if test "$cross_compiling" = yes; then :
80 - as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 67 - as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
81 + ac_cv_func_setpgrp_void=no 68 + ac_cv_func_setpgrp_void=no
82 + #as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 69 + #as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
83 else 70 else
84 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 71 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85 /* end confdefs.h. */ 72 /* end confdefs.h. */
86 @@ -24262,7 +24286,7 @@ if ${ac_cv_sizeof_struct_iovec+:} false; then : 73 @@ -24262,7 +24264,7 @@ if ${ac_cv_sizeof_struct_iovec+:} false; then :
87 $as_echo_n "(cached) " >&6 74 $as_echo_n "(cached) " >&6
88 else 75 else
89 if test "$cross_compiling" = yes; then : 76 if test "$cross_compiling" = yes; then :
90 - ac_cv_sizeof_struct_iovec=0 77 - ac_cv_sizeof_struct_iovec=0
91 + ac_cv_sizeof_struct_iovec=8 78 + ac_cv_sizeof_struct_iovec=1
92 else 79 else
93 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 80 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
94 /* end confdefs.h. */ 81 /* end confdefs.h. */
95 @@ -27355,10 +27379,8 @@ if ${apr_cv_tcp_nodelay_with_cork+:} false; then : 82 @@ -27355,10 +27357,11 @@ if ${apr_cv_tcp_nodelay_with_cork+:} false; then :
96 $as_echo_n "(cached) " >&6 83 $as_echo_n "(cached) " >&6
97 else 84 else
98 if test "$cross_compiling" = yes; then : 85 if test "$cross_compiling" = yes; then :
99 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 86 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
100 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 87 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
101 -as_fn_error $? "cannot run test program while cross compiling 88 -as_fn_error $? "cannot run test program while cross compiling
102 -See \`config.log' for more details" "$LINENO" 5; } 89 -See \`config.log' for more details" "$LINENO" 5; }
103 + apr_cv_tcp_nodelay_with_cork=no 90 + apr_cv_tcp_nodelay_with_cork=no
104 + #{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_ec ho "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } 91 + #{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
92 +#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
93 +#as_fn_error $? "cannot run test program while cross compiling
94 +#See \`config.log' for more details" "$LINENO" 5; }
105 else 95 else
106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 96 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
107 /* end confdefs.h. */ 97 /* end confdefs.h. */
108 diff --git a/include/apr.h.in b/include/apr.h.in 98 diff --git a/include/apr.h.in b/include/apr.h.in
109 index 0ad7a91..c6372e6 100644 99 index 0ad7a91..5f8d86d 100644
110 --- a/include/apr.h.in 100 --- a/include/apr.h.in
111 +++ b/include/apr.h.in 101 +++ b/include/apr.h.in
112 @@ -189,6 +189,9 @@ 102 @@ -189,6 +189,9 @@
113 #endif 103 #endif
114 104
115 /* header files for PATH_MAX, _POSIX_PATH_MAX */ 105 /* header files for PATH_MAX, _POSIX_PATH_MAX */
116 +#if defined(__native_client__) 106 +#if defined(__native_client__) && defined(__GLIBC__)
117 +#include <linux/limits.h> 107 +#include <linux/limits.h>
118 +#endif 108 +#endif
119 #if APR_HAVE_LIMITS_H 109 #if APR_HAVE_LIMITS_H
120 #include <limits.h> 110 #include <limits.h>
121 #else 111 #else
112 diff --git a/network_io/unix/sockopt.c b/network_io/unix/sockopt.c
113 index 6ce4b91..15247ed 100644
114 --- a/network_io/unix/sockopt.c
115 +++ b/network_io/unix/sockopt.c
116 @@ -358,7 +358,7 @@ apr_status_t apr_socket_opt_get(apr_socket_t *sock,
117
118 apr_status_t apr_socket_atmark(apr_socket_t *sock, int *atmark)
119 {
120 -#ifndef BEOS_R5
121 +#if !defined(BEOS_R5) && (!defined(__native_client__) || defined(__GLIBC__))
122 int oobmark;
123
124 if (ioctl(sock->socketdes, SIOCATMARK, (void*) &oobmark) < 0)
OLDNEW
« no previous file with comments | « ports/apr/build.sh ('k') | ports/apr/pkg_info » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698