diff --git a/dkarm-eabi/patches/newlib-2.1.0.patch b/dkarm-eabi/patches/newlib-2.1.0.patch index 1bdc05d..f9b814e 100644 --- a/dkarm-eabi/patches/newlib-2.1.0.patch +++ b/dkarm-eabi/patches/newlib-2.1.0.patch @@ -1,6 +1,6 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/configure --- newlib-2.1.0/libgloss/arm/configure 2013-09-20 15:23:41.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/arm/configure 2014-12-06 04:08:48.482756000 +0000 ++++ newlib-2.1.0-arm/libgloss/arm/configure 2014-12-10 19:17:29.070756000 +0000 @@ -1,29 +1,33 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. @@ -804,7 +804,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co sed -n ' p /[$]LINENO/= -@@ -451,9 +482,12 @@ +@@ -451,209 +482,189 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || @@ -819,10 +819,11 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). -@@ -462,198 +496,175 @@ - exit - } - +- . "./$as_me.lineno" +- # Exit status is that of the last command. +- exit +-} +- - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname @@ -1012,6 +1013,11 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co -objtype -host_makefile_frag_path -subdirs ++ . "./$as_me.lineno" ++ # Exit status is that of the last command. ++ exit ++} ++ +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) @@ -1352,17 +1358,17 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" - fi - --# Be sure to have absolute directory names. ++fi ++ +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac -+fi -+ + fi + +-# Be sure to have absolute directory names. +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ @@ -1780,7 +1786,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF -@@ -1556,42 +1641,58 @@ +@@ -1556,42 +1645,58 @@ #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF @@ -1857,7 +1863,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co >$cache_file fi -@@ -1605,60 +1706,56 @@ +@@ -1605,60 +1710,56 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) @@ -1949,7 +1955,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co ac_ext=c ac_cpp='$CPP $CPPFLAGS' -@@ -1669,13 +1766,11 @@ +@@ -1669,13 +1770,11 @@ # Check whether --enable-newlib-supplied-syscalls was given. @@ -1965,7 +1971,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co esac else newlib_may_supply_syscalls=yes -@@ -1718,9 +1813,7 @@ +@@ -1718,9 +1817,7 @@ fi done if test -z "$ac_aux_dir"; then @@ -1976,7 +1982,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co fi # These three variables are undocumented and unsupported, -@@ -1735,35 +1828,27 @@ +@@ -1735,35 +1832,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || @@ -2023,7 +2029,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' -@@ -1779,28 +1864,24 @@ +@@ -1779,28 +1868,24 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac @@ -2060,7 +2066,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' -@@ -1816,28 +1897,24 @@ +@@ -1816,28 +1901,24 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac @@ -2097,7 +2103,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' -@@ -1864,13 +1942,10 @@ +@@ -1864,13 +1945,10 @@ # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" @@ -2114,7 +2120,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co # Find a good install program. We prefer a C program (faster), -@@ -1886,22 +1961,23 @@ +@@ -1886,22 +1964,23 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. @@ -2146,7 +2152,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. -@@ -1909,7 +1985,7 @@ +@@ -1909,7 +1988,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do @@ -2155,7 +2161,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. -@@ -1919,17 +1995,29 @@ +@@ -1919,17 +1998,29 @@ # program-specific install script used by HP pwplus--don't use. : else @@ -2188,7 +2194,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co fi if test "${ac_cv_path_install+set}" = set; then -@@ -1942,8 +2030,8 @@ +@@ -1942,8 +2033,8 @@ INSTALL=$ac_install_sh fi fi @@ -2199,7 +2205,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. -@@ -1975,8 +2063,8 @@ +@@ -1975,8 +2066,8 @@ .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -2210,7 +2216,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co am__include="#" am__quote= _am_result=none -@@ -2003,12 +2091,12 @@ +@@ -2003,12 +2094,12 @@ fi @@ -2226,7 +2232,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co enableval=$enable_dependency_tracking; fi -@@ -2030,10 +2118,10 @@ +@@ -2030,10 +2121,10 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 @@ -2241,7 +2247,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. -@@ -2043,35 +2131,35 @@ +@@ -2043,35 +2134,35 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -2289,7 +2295,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up -@@ -2158,8 +2246,8 @@ +@@ -2158,8 +2249,8 @@ fi fi @@ -2300,7 +2306,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type -@@ -2178,10 +2266,10 @@ +@@ -2178,10 +2269,10 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 @@ -2315,7 +2321,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. -@@ -2192,18 +2280,18 @@ +@@ -2192,18 +2283,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -2338,7 +2344,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co IFS=$as_save_IFS if test $ac_prog_rejected = yes; then -@@ -2222,23 +2310,21 @@ +@@ -2222,23 +2313,21 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -2371,7 +2377,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co else cat > conftest.c <&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) @@ -2699,7 +2705,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" -@@ -2630,13 +2639,24 @@ +@@ -2630,13 +2642,24 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then @@ -2730,7 +2736,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co fi fi rm -f confcache -@@ -2653,6 +2673,12 @@ +@@ -2653,6 +2676,12 @@ # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' @@ -2743,7 +2749,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -@@ -2679,14 +2705,15 @@ +@@ -2679,14 +2708,15 @@ ac_libobjs= ac_ltlibobjs= @@ -2762,7 +2768,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co done LIBOBJS=$ac_libobjs -@@ -2694,26 +2721,22 @@ +@@ -2694,26 +2724,22 @@ if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then @@ -2799,7 +2805,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. -@@ -2722,29 +2745,32 @@ +@@ -2722,29 +2748,32 @@ debug=false ac_cs_recheck=false @@ -2844,7 +2850,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co fi -@@ -2748,34 +2774,51 @@ +@@ -2748,34 +2777,51 @@ fi @@ -2920,7 +2926,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co fi -@@ -2784,20 +2827,19 @@ +@@ -2784,20 +2830,19 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) @@ -2945,7 +2951,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co IFS=$as_save_IFS ;; -@@ -2808,32 +2850,111 @@ +@@ -2808,32 +2853,111 @@ as_myself=$0 fi if test ! -f "$as_myself"; then @@ -3074,7 +3080,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr -@@ -2847,13 +2968,17 @@ +@@ -2847,13 +2971,17 @@ as_basename=false fi @@ -3094,7 +3100,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q -@@ -2868,131 +2993,118 @@ +@@ -2868,131 +2996,118 @@ } s/.*/./; q'` @@ -3312,7 +3318,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" -@@ -3002,13 +3114,19 @@ +@@ -3002,13 +3117,19 @@ exec 6>&1 @@ -3334,7 +3340,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS -@@ -3021,27 +3139,36 @@ +@@ -3021,27 +3142,36 @@ _ACEOF @@ -3379,7 +3385,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co Configuration files: $config_files -@@ -3049,36 +3176,42 @@ +@@ -3049,36 +3179,42 @@ Configuration commands: $config_commands @@ -3431,7 +3437,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co *) ac_option=$1 ac_optarg=$2 -@@ -3091,25 +3224,30 @@ +@@ -3091,25 +3227,30 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) @@ -3469,7 +3475,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co ac_need_defaults=false ;; esac -@@ -3124,27 +3262,29 @@ +@@ -3124,27 +3265,29 @@ fi _ACEOF @@ -3506,7 +3512,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co # # INIT-COMMANDS # -@@ -3166,7 +3306,7 @@ +@@ -3166,7 +3309,7 @@ _ACEOF @@ -3515,7 +3521,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co # Handling of arguments. for ac_config_target in $ac_config_targets -@@ -3176,9 +3316,7 @@ +@@ -3176,9 +3319,7 @@ "cpu-init/Makefile") CONFIG_FILES="$CONFIG_FILES cpu-init/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -3526,7 +3532,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co esac done -@@ -3200,196 +3338,228 @@ +@@ -3200,196 +3341,228 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { @@ -3898,7 +3904,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac -@@ -3408,7 +3578,7 @@ +@@ -3408,7 +3581,7 @@ for ac_f do case $ac_f in @@ -3907,7 +3913,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. -@@ -3417,26 +3587,34 @@ +@@ -3417,26 +3590,34 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || @@ -3951,7 +3957,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co esac ;; esac -@@ -3446,42 +3624,7 @@ +@@ -3446,42 +3627,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || @@ -3995,7 +4001,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q -@@ -3499,20 +3642,15 @@ +@@ -3499,20 +3645,15 @@ q } s/.*/./; q'` @@ -4019,7 +4025,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; -@@ -3552,12 +3690,12 @@ +@@ -3552,12 +3693,12 @@ esac _ACEOF @@ -4035,7 +4041,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co p q } -@@ -3565,36 +3703,37 @@ +@@ -3565,36 +3706,37 @@ /@docdir@/p /@infodir@/p /@localedir@/p @@ -4083,7 +4089,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t -@@ -3604,26 +3743,35 @@ +@@ -3604,26 +3746,35 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack @@ -4132,7 +4138,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co ;; esac -@@ -3644,7 +3792,7 @@ +@@ -3644,7 +3795,7 @@ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || @@ -4141,7 +4147,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q -@@ -3688,42 +3836,7 @@ +@@ -3688,42 +3839,7 @@ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || @@ -4185,7 +4191,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q -@@ -3741,12 +3854,7 @@ +@@ -3741,12 +3857,7 @@ q } s/.*/./; q'` @@ -4199,7 +4205,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done -@@ -3759,11 +3867,13 @@ +@@ -3759,11 +3870,13 @@ done # for ac_tag @@ -4215,7 +4221,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. -@@ -3783,7 +3893,11 @@ +@@ -3783,7 +3896,11 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. @@ -4230,7 +4236,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure newlib-2.1.0-arm/libgloss/arm/co diff -NBaur newlib-2.1.0/libgloss/arm/configure.in newlib-2.1.0-arm/libgloss/arm/configure.in --- newlib-2.1.0/libgloss/arm/configure.in 2013-09-20 15:23:41.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/arm/configure.in 2014-11-28 23:15:48.990756000 +0000 ++++ newlib-2.1.0-arm/libgloss/arm/configure.in 2014-12-10 19:17:29.070756000 +0000 @@ -59,7 +59,7 @@ AC_SUBST(objtype) @@ -4242,7 +4248,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/configure.in newlib-2.1.0-arm/libgloss/arm dnl doesn't provide a mechanism to substitute a replacement keyword with diff -NBaur newlib-2.1.0/libgloss/arm/_kill.c newlib-2.1.0-arm/libgloss/arm/_kill.c --- newlib-2.1.0/libgloss/arm/_kill.c 2007-01-03 16:55:25.000000000 +0000 -+++ newlib-2.1.0-arm/libgloss/arm/_kill.c 2014-11-28 23:15:48.990756000 +0000 ++++ newlib-2.1.0-arm/libgloss/arm/_kill.c 2014-12-10 19:17:29.054756000 +0000 @@ -1,6 +1,7 @@ #include <_ansi.h> #include @@ -4264,7 +4270,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/_kill.c newlib-2.1.0-arm/libgloss/arm/_kil } diff -NBaur newlib-2.1.0/libgloss/arm/linux-syscalls0.S newlib-2.1.0-arm/libgloss/arm/linux-syscalls0.S --- newlib-2.1.0/libgloss/arm/linux-syscalls0.S 2009-10-26 10:00:41.000000000 +0000 -+++ newlib-2.1.0-arm/libgloss/arm/linux-syscalls0.S 2014-11-28 23:15:48.990756000 +0000 ++++ newlib-2.1.0-arm/libgloss/arm/linux-syscalls0.S 2014-12-10 19:17:29.070756000 +0000 @@ -7,6 +7,7 @@ */ @@ -4310,7 +4316,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/linux-syscalls0.S newlib-2.1.0-arm/libglos #define SYSCALL3(name) SYSCALL4(name) diff -NBaur newlib-2.1.0/libgloss/arm/redboot-syscalls.c newlib-2.1.0-arm/libgloss/arm/redboot-syscalls.c --- newlib-2.1.0/libgloss/arm/redboot-syscalls.c 2008-01-03 22:38:30.000000000 +0000 -+++ newlib-2.1.0-arm/libgloss/arm/redboot-syscalls.c 2014-11-28 23:15:48.990756000 +0000 ++++ newlib-2.1.0-arm/libgloss/arm/redboot-syscalls.c 2014-12-10 19:17:29.070756000 +0000 @@ -20,13 +20,18 @@ #include #include @@ -4332,7 +4338,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/redboot-syscalls.c newlib-2.1.0-arm/libglo #endif diff -NBaur newlib-2.1.0/libgloss/arm/syscalls.c newlib-2.1.0-arm/libgloss/arm/syscalls.c --- newlib-2.1.0/libgloss/arm/syscalls.c 2010-08-27 12:55:36.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/arm/syscalls.c 2014-11-28 23:15:48.990756000 +0000 ++++ newlib-2.1.0-arm/libgloss/arm/syscalls.c 2014-12-10 19:17:29.070756000 +0000 @@ -16,6 +16,7 @@ #include #include @@ -4611,7 +4617,7 @@ diff -NBaur newlib-2.1.0/libgloss/arm/syscalls.c newlib-2.1.0-arm/libgloss/arm/s } diff -NBaur newlib-2.1.0/libgloss/configure newlib-2.1.0-arm/libgloss/configure --- newlib-2.1.0/libgloss/configure 2013-07-16 08:48:53.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/configure 2014-11-28 23:15:48.994756000 +0000 ++++ newlib-2.1.0-arm/libgloss/configure 2014-12-10 19:17:29.074756000 +0000 @@ -2568,6 +2568,8 @@ fi @@ -4623,7 +4629,7 @@ diff -NBaur newlib-2.1.0/libgloss/configure newlib-2.1.0-arm/libgloss/configure ac_config_commands="$ac_config_commands depfiles" diff -NBaur newlib-2.1.0/libgloss/configure.in newlib-2.1.0-arm/libgloss/configure.in --- newlib-2.1.0/libgloss/configure.in 2013-07-16 08:48:53.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/configure.in 2014-11-28 23:15:48.994756000 +0000 ++++ newlib-2.1.0-arm/libgloss/configure.in 2014-12-10 19:17:29.074756000 +0000 @@ -2,6 +2,7 @@ AC_PREREQ(2.59) AC_INIT([libgloss],[LIBGLOSS_VERSION]) @@ -4642,7 +4648,7 @@ diff -NBaur newlib-2.1.0/libgloss/configure.in newlib-2.1.0-arm/libgloss/configu AS=${AS-as} diff -NBaur newlib-2.1.0/libgloss/libsysbase/abort.c newlib-2.1.0-arm/libgloss/libsysbase/abort.c --- newlib-2.1.0/libgloss/libsysbase/abort.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/abort.c 2014-11-28 23:15:48.994756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/abort.c 2014-12-10 19:17:29.078756000 +0000 @@ -0,0 +1,8 @@ +#include +#include @@ -4654,7 +4660,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/abort.c newlib-2.1.0-arm/libgloss/l + diff -NBaur newlib-2.1.0/libgloss/libsysbase/acconfig.h newlib-2.1.0-arm/libgloss/libsysbase/acconfig.h --- newlib-2.1.0/libgloss/libsysbase/acconfig.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/acconfig.h 2014-11-28 23:15:48.994756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/acconfig.h 2014-12-10 19:17:29.078756000 +0000 @@ -0,0 +1,29 @@ +/* Name of package. */ +#undef PACKAGE @@ -4687,7 +4693,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/acconfig.h newlib-2.1.0-arm/libglos +#undef __SYMBOL_PREFIX diff -NBaur newlib-2.1.0/libgloss/libsysbase/aclocal.m4 newlib-2.1.0-arm/libgloss/libsysbase/aclocal.m4 --- newlib-2.1.0/libgloss/libsysbase/aclocal.m4 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/aclocal.m4 2014-11-28 23:15:48.994756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/aclocal.m4 2014-12-10 19:17:29.078756000 +0000 @@ -0,0 +1,344 @@ +# generated automatically by aclocal 1.9.5 -*- Autoconf -*- + @@ -5035,7 +5041,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/aclocal.m4 newlib-2.1.0-arm/libglos +m4_include([../acinclude.m4]) diff -NBaur newlib-2.1.0/libgloss/libsysbase/build_argv.c newlib-2.1.0-arm/libgloss/libsysbase/build_argv.c --- newlib-2.1.0/libgloss/libsysbase/build_argv.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/build_argv.c 2014-11-28 23:15:48.998756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/build_argv.c 2014-12-10 19:17:29.078756000 +0000 @@ -0,0 +1,31 @@ +struct __argv { + int argvMagic; @@ -5070,9 +5076,10 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/build_argv.c newlib-2.1.0-arm/libgl +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/chdir.c newlib-2.1.0-arm/libgloss/libsysbase/chdir.c --- newlib-2.1.0/libgloss/libsysbase/chdir.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/chdir.c 2014-11-28 23:15:48.998756000 +0000 -@@ -0,0 +1,177 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/chdir.c 2014-12-10 19:17:29.078756000 +0000 +@@ -0,0 +1,192 @@ +#include ++#include +#include +#include +#include @@ -5080,7 +5087,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/chdir.c newlib-2.1.0-arm/libgloss/l +#include + +/* CWD always start with "/" */ -+static char _current_working_directory [MAXPATHLEN] = "/"; ++static char _current_working_directory [PATH_MAX] = "/"; ++static char temp_cwd [PATH_MAX]; + +#define DIRECTORY_SEPARATOR_CHAR '/' +const char DIRECTORY_SEPARATOR[] = "/"; @@ -5182,20 +5190,19 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/chdir.c newlib-2.1.0-arm/libgloss/l + + int dev; + const char *pathPosition; -+ char temp_cwd [MAXPATHLEN]; + + /* Make sure the path is short enough */ -+ if (strnlen (path, MAXPATHLEN + 1) >= MAXPATHLEN) { ++ if (strnlen (path, PATH_MAX) >= PATH_MAX) { + r->_errno = ENAMETOOLONG; + return -1; + } + + if (strchr (path, ':') != NULL) { -+ strncpy (temp_cwd, path, MAXPATHLEN); ++ strncpy (temp_cwd, path, PATH_MAX); + /* Move path past device name */ + path = strchr (path, ':') + 1; + } else { -+ strncpy (temp_cwd, _current_working_directory, MAXPATHLEN); ++ strncpy (temp_cwd, _current_working_directory, PATH_MAX); + } + + pathPosition = strchr (temp_cwd , ':') + 1; @@ -5207,18 +5214,23 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/chdir.c newlib-2.1.0-arm/libgloss/l + } + + /* Concatenate the path to the CWD */ -+ if (_concatenate_path (r, temp_cwd, path, MAXPATHLEN) == -1) { ++ if (_concatenate_path (r, temp_cwd, path, PATH_MAX) == -1) { + return -1; + } + + /* Get device from path name */ + dev = FindDevice(temp_cwd); + -+ if ((dev < 0) || (devoptab_list[dev]->chdir_r == NULL)) { ++ if (dev < 0) { + r->_errno = ENODEV; + return -1; + } + ++ if ( devoptab_list[dev]->chdir_r == NULL) { ++ r->_errno = ENOSYS; ++ return -1; ++ } ++ + /* Try changing directories on the device */ + if (devoptab_list[dev]->chdir_r (r, temp_cwd) == -1) { + return -1; @@ -5226,7 +5238,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/chdir.c newlib-2.1.0-arm/libgloss/l + + /* Since it worked, set the new CWD and default device */ + setDefaultDevice(dev); -+ strncpy (_current_working_directory, temp_cwd, MAXPATHLEN); ++ strncpy (_current_working_directory, temp_cwd, PATH_MAX); + + return 0; +} @@ -5236,11 +5248,20 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/chdir.c newlib-2.1.0-arm/libgloss/l + struct _reent *r = _REENT; + + if (size == 0) { ++ if (buf != NULL) { ++ r->_errno = EINVAL; ++ return NULL; ++ } ++ buf = malloc(PATH_MAX); ++ size = PATH_MAX; ++ } ++ ++ if (buf == NULL) { + r->_errno = EINVAL; + return NULL; + } + -+ if ( size < (strnlen (_current_working_directory, MAXPATHLEN) + 1)) { ++ if ( size < (strnlen (_current_working_directory, PATH_MAX) + 1)) { + r->_errno = ERANGE; + return NULL; + } @@ -5251,8 +5272,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/chdir.c newlib-2.1.0-arm/libgloss/l +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/chmod.c newlib-2.1.0-arm/libgloss/libsysbase/chmod.c --- newlib-2.1.0/libgloss/libsysbase/chmod.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/chmod.c 2014-11-28 23:15:48.998756000 +0000 -@@ -0,0 +1,25 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/chmod.c 2014-12-10 19:17:29.078756000 +0000 +@@ -0,0 +1,28 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -5268,11 +5289,14 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/chmod.c newlib-2.1.0-arm/libgloss/l + /* Get device from path name */ + dev = FindDevice(path); + -+ if ((dev < 0) || (devoptab_list[dev]->chmod_r == NULL)) { ++ if (dev < 0) { + r->_errno = ENODEV; + ret = -1; + } else { -+ ret = devoptab_list[dev]->chmod_r(r,path,mode); ++ if (devoptab_list[dev]->chmod_r == NULL) ++ r->_errno=ENOSYS; ++ else ++ ret = devoptab_list[dev]->chmod_r(r,path,mode); + } + + return ret; @@ -5280,8 +5304,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/chmod.c newlib-2.1.0-arm/libgloss/l + diff -NBaur newlib-2.1.0/libgloss/libsysbase/close.c newlib-2.1.0-arm/libgloss/libsysbase/close.c --- newlib-2.1.0/libgloss/libsysbase/close.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/close.c 2014-11-28 23:15:48.998756000 +0000 -@@ -0,0 +1,41 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/close.c 2014-12-10 19:17:29.078756000 +0000 +@@ -0,0 +1,43 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -5317,6 +5341,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/close.c newlib-2.1.0-arm/libgloss/l + + if(devoptab_list[dev]->close_r) + ret = devoptab_list[dev]->close_r(ptr,fd); ++ else ++ ptr->_errno = ENOSYS; + + __release_handle(fileDesc); + } @@ -5325,7 +5351,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/close.c newlib-2.1.0-arm/libgloss/l +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/config.h.in newlib-2.1.0-arm/libgloss/libsysbase/config.h.in --- newlib-2.1.0/libgloss/libsysbase/config.h.in 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/config.h.in 2014-11-28 23:15:48.998756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/config.h.in 2014-12-10 19:17:29.078756000 +0000 @@ -0,0 +1,25 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + @@ -5354,7 +5380,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/config.h.in newlib-2.1.0-arm/libglo +#undef __SYMBOL_PREFIX diff -NBaur newlib-2.1.0/libgloss/libsysbase/configure newlib-2.1.0-arm/libgloss/libsysbase/configure --- newlib-2.1.0/libgloss/libsysbase/configure 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/configure 2014-11-28 23:15:48.998756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/configure 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,4170 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. @@ -9528,7 +9554,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/configure newlib-2.1.0-arm/libgloss + diff -NBaur newlib-2.1.0/libgloss/libsysbase/configure.in newlib-2.1.0-arm/libgloss/libsysbase/configure.in --- newlib-2.1.0/libgloss/libsysbase/configure.in 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/configure.in 2014-11-28 23:15:48.998756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/configure.in 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,210 @@ +# Copyright (c) 1995, 1996 Cygnus Support +# @@ -9742,15 +9768,16 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/configure.in newlib-2.1.0-arm/libgl + diff -NBaur newlib-2.1.0/libgloss/libsysbase/dirent.c newlib-2.1.0-arm/libgloss/libsysbase/dirent.c --- newlib-2.1.0/libgloss/libsysbase/dirent.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/dirent.c 2014-11-28 23:15:48.998756000 +0000 -@@ -0,0 +1,245 @@ -+#include -+#include ++++ newlib-2.1.0-arm/libgloss/libsysbase/dirent.c 2014-12-10 19:17:29.082756000 +0000 +@@ -0,0 +1,250 @@ +#include +#include +#include +#include ++#include +#include ++#include ++#include + +static DIR_ITER * __diropen (const char *path) { + struct _reent *r = _REENT; @@ -9760,26 +9787,30 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/dirent.c newlib-2.1.0-arm/libgloss/ + + dev = FindDevice(path); + -+ if(dev!=-1 && devoptab_list[dev]->diropen_r) { ++ if(dev!=-1) { ++ if(devoptab_list[dev]->diropen_r) { + -+ handle = (DIR_ITER *)malloc( sizeof(DIR_ITER) + devoptab_list[dev]->dirStateSize ); ++ handle = (DIR_ITER *)malloc( sizeof(DIR_ITER) + devoptab_list[dev]->dirStateSize ); + -+ if ( NULL != handle ) { -+ handle->device = dev; -+ handle->dirStruct = ((void *)handle) + sizeof(DIR_ITER); ++ if ( NULL != handle ) { ++ handle->device = dev; ++ handle->dirStruct = ((void *)handle) + sizeof(DIR_ITER); + -+ dir = devoptab_list[dev]->diropen_r(r, handle, path); ++ dir = devoptab_list[dev]->diropen_r(r, handle, path); + -+ if ( dir == NULL ) { -+ free (handle); ++ if ( dir == NULL ) { ++ free (handle); ++ handle = NULL; ++ } ++ } else { ++ r->_errno = ENOSR; + handle = NULL; + } + } else { -+ r->_errno = ENOSR; -+ handle = NULL; ++ r->_errno = ENOSYS; + } + } else { -+ r->_errno = ENOSYS; ++ r->_errno = ENODEV; + } + + return handle; @@ -9875,7 +9906,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/dirent.c newlib-2.1.0-arm/libgloss/ + +struct dirent* readdir (DIR *dirp) { + struct stat st; -+ char filename[MAXPATHLEN]; ++ char filename[NAME_MAX]; + int res; + int olderrno = errno; + @@ -9898,7 +9929,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/dirent.c newlib-2.1.0-arm/libgloss/ + // We've moved forward in the directory + dirp->position += 1; + -+ if (strnlen(filename, MAXPATHLEN) >= sizeof(dirp->fileData.d_name)) { ++ if (strnlen(filename, NAME_MAX) >= sizeof(dirp->fileData.d_name)) { + errno = EOVERFLOW; + return NULL; + } @@ -9913,7 +9944,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/dirent.c newlib-2.1.0-arm/libgloss/ + +int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) { + struct stat st; -+ char filename[MAXPATHLEN]; ++ char filename[NAME_MAX]; + int res; + + if (!dirp) { @@ -9936,7 +9967,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/dirent.c newlib-2.1.0-arm/libgloss/ + // We've moved forward in the directory + dirp->position += 1; + -+ if (strnlen(filename, MAXPATHLEN) >= sizeof(entry->d_name)) { ++ if (strnlen(filename, NAME_MAX) >= sizeof(entry->d_name)) { + errno = EOVERFLOW; + return EOVERFLOW; + } @@ -9960,7 +9991,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/dirent.c newlib-2.1.0-arm/libgloss/ + + +void seekdir(DIR *dirp, long int loc) { -+ char filename[MAXPATHLEN]; ++ char filename[NAME_MAX]; + + if (!dirp || loc < 0) { + return; @@ -9991,7 +10022,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/dirent.c newlib-2.1.0-arm/libgloss/ +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/environ.c newlib-2.1.0-arm/libgloss/libsysbase/environ.c --- newlib-2.1.0/libgloss/libsysbase/environ.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/environ.c 2014-11-28 23:15:48.998756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/environ.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,6 @@ +/* + * Version of environ for no OS. @@ -10001,7 +10032,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/environ.c newlib-2.1.0-arm/libgloss +char **environ = __env; diff -NBaur newlib-2.1.0/libgloss/libsysbase/execve.c newlib-2.1.0-arm/libgloss/libsysbase/execve.c --- newlib-2.1.0/libgloss/libsysbase/execve.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/execve.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/execve.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,31 @@ +/* + * Stub version of execve. @@ -10036,7 +10067,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/execve.c newlib-2.1.0-arm/libgloss/ + diff -NBaur newlib-2.1.0/libgloss/libsysbase/_exit.c newlib-2.1.0-arm/libgloss/libsysbase/_exit.c --- newlib-2.1.0/libgloss/libsysbase/_exit.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/_exit.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/_exit.c 2014-12-10 19:17:29.078756000 +0000 @@ -0,0 +1,19 @@ +/* Stub version of _exit. */ + @@ -10059,8 +10090,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/_exit.c newlib-2.1.0-arm/libgloss/l +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/fchmod.c newlib-2.1.0-arm/libgloss/libsysbase/fchmod.c --- newlib-2.1.0/libgloss/libsysbase/fchmod.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/fchmod.c 2014-11-28 23:15:49.002756000 +0000 -@@ -0,0 +1,30 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/fchmod.c 2014-12-10 19:17:29.082756000 +0000 +@@ -0,0 +1,31 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -10086,14 +10117,15 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/fchmod.c newlib-2.1.0-arm/libgloss/ + + if(devoptab_list[dev]->fchmod_r) + ret = devoptab_list[dev]->fchmod_r(r,fd,mode); -+ ++ else ++ r->_errno=ENOSYS; + } + } + return ret; +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/flock.c newlib-2.1.0-arm/libgloss/libsysbase/flock.c --- newlib-2.1.0/libgloss/libsysbase/flock.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/flock.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/flock.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,21 @@ +#include +#include <_ansi.h> @@ -10118,7 +10150,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/flock.c newlib-2.1.0-arm/libgloss/l +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/fork.c newlib-2.1.0-arm/libgloss/libsysbase/fork.c --- newlib-2.1.0/libgloss/libsysbase/fork.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/fork.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/fork.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,25 @@ +/* + * Stub version of fork. @@ -10147,7 +10179,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/fork.c newlib-2.1.0-arm/libgloss/li +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/fstat.c newlib-2.1.0-arm/libgloss/libsysbase/fstat.c --- newlib-2.1.0/libgloss/libsysbase/fstat.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/fstat.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/fstat.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,48 @@ +#include "config.h" +#include <_ansi.h> @@ -10199,8 +10231,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/fstat.c newlib-2.1.0-arm/libgloss/l +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/fsync.c newlib-2.1.0-arm/libgloss/libsysbase/fsync.c --- newlib-2.1.0/libgloss/libsysbase/fsync.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/fsync.c 2014-11-28 23:15:49.002756000 +0000 -@@ -0,0 +1,36 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/fsync.c 2014-12-10 19:17:29.082756000 +0000 +@@ -0,0 +1,39 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -10215,6 +10247,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/fsync.c newlib-2.1.0-arm/libgloss/l + int ret = -1; + unsigned int dev = 0; + unsigned int fd = -1; ++ struct _reent *r = _REENT; + + __handle * handle; + @@ -10232,15 +10265,17 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/fsync.c newlib-2.1.0-arm/libgloss/l + fd = (int)handle->fileStruct; + + if(devoptab_list[dev]->fsync_r) -+ ret = devoptab_list[dev]->fsync_r( _REENT, fd); ++ ret = devoptab_list[dev]->fsync_r(r, fd); ++ else ++ r->_errno=ENOSYS; + } + + return ret; +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/ftruncate.c newlib-2.1.0-arm/libgloss/libsysbase/ftruncate.c --- newlib-2.1.0/libgloss/libsysbase/ftruncate.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/ftruncate.c 2014-11-28 23:15:49.002756000 +0000 -@@ -0,0 +1,37 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/ftruncate.c 2014-12-10 19:17:29.082756000 +0000 +@@ -0,0 +1,40 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -10256,7 +10291,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/ftruncate.c newlib-2.1.0-arm/libglo + int ret = -1; + unsigned int dev = 0; + unsigned int fd = -1; -+ ++ struct _reent *r = _REENT; ++ + __handle * handle; + + if ( fileDesc < 3) { @@ -10265,22 +10301,24 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/ftruncate.c newlib-2.1.0-arm/libglo + handle = __get_handle(fileDesc); + + if ( NULL == handle ) { -+ errno = EINVAL; ++ r->_errno = EINVAL; + return ret; + } -+ ++ + dev = handle->device; + fd = (int)handle->fileStruct; + + if(devoptab_list[dev]->ftruncate_r) -+ ret = devoptab_list[dev]->ftruncate_r( _REENT, fd, len); ++ ret = devoptab_list[dev]->ftruncate_r(r, fd, len); ++ else ++ r->_errno=ENOSYS; + } + + return ret; +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/getpid.c newlib-2.1.0-arm/libgloss/libsysbase/getpid.c --- newlib-2.1.0/libgloss/libsysbase/getpid.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/getpid.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/getpid.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,21 @@ +#include "config.h" +#include <_ansi.h> @@ -10305,7 +10343,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/getpid.c newlib-2.1.0-arm/libgloss/ + diff -NBaur newlib-2.1.0/libgloss/libsysbase/getreent.c newlib-2.1.0-arm/libgloss/libsysbase/getreent.c --- newlib-2.1.0/libgloss/libsysbase/getreent.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/getreent.c 2014-12-06 03:10:40.042756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/getreent.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,22 @@ + +/* default reentrant pointer when multithread enabled */ @@ -10331,7 +10369,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/getreent.c newlib-2.1.0-arm/libglos + diff -NBaur newlib-2.1.0/libgloss/libsysbase/gettod.c newlib-2.1.0-arm/libgloss/libsysbase/gettod.c --- newlib-2.1.0/libgloss/libsysbase/gettod.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/gettod.c 2014-11-30 18:26:39.234756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/gettod.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,35 @@ +#include "config.h" +#include <_ansi.h> @@ -10370,7 +10408,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/gettod.c newlib-2.1.0-arm/libgloss/ + diff -NBaur newlib-2.1.0/libgloss/libsysbase/handle_manager.c newlib-2.1.0-arm/libgloss/libsysbase/handle_manager.c --- newlib-2.1.0/libgloss/libsysbase/handle_manager.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/handle_manager.c 2014-11-30 18:32:09.658756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/handle_manager.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,52 @@ +#include +#include @@ -10426,7 +10464,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/handle_manager.c newlib-2.1.0-arm/l + diff -NBaur newlib-2.1.0/libgloss/libsysbase/handle_manager.h newlib-2.1.0-arm/libgloss/libsysbase/handle_manager.h --- newlib-2.1.0/libgloss/libsysbase/handle_manager.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/handle_manager.h 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/handle_manager.h 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,10 @@ +#ifndef __HANDLE_MANAGER_H__ +#define __HANDLE_MANAGER_H__ @@ -10440,7 +10478,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/handle_manager.h newlib-2.1.0-arm/l +#endif diff -NBaur newlib-2.1.0/libgloss/libsysbase/iosupport.c newlib-2.1.0-arm/libgloss/libsysbase/iosupport.c --- newlib-2.1.0/libgloss/libsysbase/iosupport.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/iosupport.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/iosupport.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,122 @@ +#include +#include @@ -10566,7 +10604,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/iosupport.c newlib-2.1.0-arm/libglo + diff -NBaur newlib-2.1.0/libgloss/libsysbase/isatty.c newlib-2.1.0-arm/libgloss/libsysbase/isatty.c --- newlib-2.1.0/libgloss/libsysbase/isatty.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/isatty.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/isatty.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,20 @@ +#include "config.h" +#include <_ansi.h> @@ -10590,7 +10628,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/isatty.c newlib-2.1.0-arm/libgloss/ +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/kill.c newlib-2.1.0-arm/libgloss/libsysbase/kill.c --- newlib-2.1.0/libgloss/libsysbase/kill.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/kill.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/kill.c 2014-12-10 19:17:29.082756000 +0000 @@ -0,0 +1,23 @@ +/* + * Stub version of kill. @@ -10617,7 +10655,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/kill.c newlib-2.1.0-arm/libgloss/li +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/link.c newlib-2.1.0-arm/libgloss/libsysbase/link.c --- newlib-2.1.0/libgloss/libsysbase/link.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/link.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/link.c 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,37 @@ +#include "config.h" +#include <_ansi.h> @@ -10658,8 +10696,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/link.c newlib-2.1.0-arm/libgloss/li + diff -NBaur newlib-2.1.0/libgloss/libsysbase/lseek.c newlib-2.1.0-arm/libgloss/libsysbase/lseek.c --- newlib-2.1.0/libgloss/libsysbase/lseek.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/lseek.c 2014-11-28 23:15:49.002756000 +0000 -@@ -0,0 +1,55 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/lseek.c 2014-12-10 19:17:29.086756000 +0000 +@@ -0,0 +1,57 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -10710,6 +10748,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/lseek.c newlib-2.1.0-arm/libgloss/l + + if(devoptab_list[dev]->seek_r) + ret = devoptab_list[dev]->seek_r( r, fd, pos, dir); ++ else ++ r->_errno=ENOSYS; + + } + return ret; @@ -10717,7 +10757,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/lseek.c newlib-2.1.0-arm/libgloss/l +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/Makefile.in newlib-2.1.0-arm/libgloss/libsysbase/Makefile.in --- newlib-2.1.0/libgloss/libsysbase/Makefile.in 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/Makefile.in 2014-12-06 02:56:33.934756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/Makefile.in 2014-12-10 19:17:29.074756000 +0000 @@ -0,0 +1,148 @@ +# Copyright (c) 1998 Cygnus Support +# @@ -10791,7 +10831,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/Makefile.in newlib-2.1.0-arm/libglo + unlink.o wait.o write.o _exit.o malloc_vars.o \ + chdir.o mkdir.o rename.o build_argv.o statvfs.o \ + flock.o syscall_support.o handle_manager.o truncate.o ftruncate.o dirent.o fsync.o \ -+ fchmod.o chmod.o getreent.o ++ fchmod.o chmod.o getreent.o rmdir.o + +# Object files specific to particular targets. +EVALOBJS = ${OBJS} @@ -10869,13 +10909,13 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/Makefile.in newlib-2.1.0-arm/libglo + $(SHELL) config.status --recheck diff -NBaur newlib-2.1.0/libgloss/libsysbase/malloc_vars.c newlib-2.1.0-arm/libgloss/libsysbase/malloc_vars.c --- newlib-2.1.0/libgloss/libsysbase/malloc_vars.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/malloc_vars.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/malloc_vars.c 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,2 @@ +char *fake_heap_end = (char*)0; +char *fake_heap_start = (char*)0; diff -NBaur newlib-2.1.0/libgloss/libsysbase/mkdir.c newlib-2.1.0-arm/libgloss/libsysbase/mkdir.c --- newlib-2.1.0/libgloss/libsysbase/mkdir.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/mkdir.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/mkdir.c 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,18 @@ +#include +#include @@ -10897,8 +10937,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/mkdir.c newlib-2.1.0-arm/libgloss/l +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/open.c newlib-2.1.0-arm/libgloss/libsysbase/open.c --- newlib-2.1.0/libgloss/libsysbase/open.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/open.c 2014-11-28 23:15:49.002756000 +0000 -@@ -0,0 +1,57 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/open.c 2014-12-10 19:17:29.086756000 +0000 +@@ -0,0 +1,60 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -10932,23 +10972,26 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/open.c newlib-2.1.0-arm/libgloss/li + dev = FindDevice(file); + + fd = -1; -+ if(dev!=-1 && devoptab_list[dev]->open_r) { ++ if(dev!=-1) { ++ if (devoptab_list[dev]->open_r) { ++ fd = __alloc_handle(sizeof(__handle) + devoptab_list[dev]->structSize ); + -+ fd = __alloc_handle(sizeof(__handle) + devoptab_list[dev]->structSize ); ++ if ( -1 != fd ) { ++ handle = __get_handle(fd); ++ handle->device = dev; ++ handle->fileStruct = ((void *)handle) + sizeof(__handle); + -+ if ( -1 != fd ) { -+ handle = __get_handle(fd); -+ handle->device = dev; -+ handle->fileStruct = ((void *)handle) + sizeof(__handle); ++ ret = devoptab_list[dev]->open_r(r, handle->fileStruct, file, flags, mode); + -+ ret = devoptab_list[dev]->open_r(r, handle->fileStruct, file, flags, mode); -+ -+ if ( ret == -1 ) { -+ __release_handle(fd); -+ fd = -1; ++ if ( ret == -1 ) { ++ __release_handle(fd); ++ fd = -1; ++ } ++ } else { ++ r->_errno = ENOSR; + } + } else { -+ r->_errno = ENOSR; ++ r->_errno=ENOSYS; + } + } else { + r->_errno = ENOSYS; @@ -10958,8 +11001,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/open.c newlib-2.1.0-arm/libgloss/li +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/read.c newlib-2.1.0-arm/libgloss/libsysbase/read.c --- newlib-2.1.0/libgloss/libsysbase/read.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/read.c 2014-11-28 23:15:49.002756000 +0000 -@@ -0,0 +1,48 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/read.c 2014-12-10 19:17:29.086756000 +0000 +@@ -0,0 +1,50 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -11004,13 +11047,15 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/read.c newlib-2.1.0-arm/libgloss/li + } + if(devoptab_list[dev]->read_r) + ret = devoptab_list[dev]->read_r(r,fd,ptr,len); ++ else ++ r->_errno=ENOSYS; + } + return ret; +} + diff -NBaur newlib-2.1.0/libgloss/libsysbase/rename.c newlib-2.1.0-arm/libgloss/libsysbase/rename.c --- newlib-2.1.0/libgloss/libsysbase/rename.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/rename.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/rename.c 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,40 @@ +#include "config.h" +#include @@ -11052,9 +11097,37 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/rename.c newlib-2.1.0-arm/libgloss/ + + return ret; +} +diff -NBaur newlib-2.1.0/libgloss/libsysbase/rmdir.c newlib-2.1.0-arm/libgloss/libsysbase/rmdir.c +--- newlib-2.1.0/libgloss/libsysbase/rmdir.c 1970-01-01 01:00:00.000000000 +0100 ++++ newlib-2.1.0-arm/libgloss/libsysbase/rmdir.c 2014-12-10 19:17:29.086756000 +0000 +@@ -0,0 +1,24 @@ ++#include "config.h" ++#include <_ansi.h> ++#include <_syslist.h> ++#include ++#include ++#include ++ ++int rmdir (const char *name) { ++ struct _reent *r = _REENT; ++ int dev,ret=-1; ++ ++ dev = FindDevice(name); ++ if(dev!=-1) { ++ if(devoptab_list[dev]->rmdir_r) { ++ ret = devoptab_list[dev]->rmdir_r(r,name); ++ } else { ++ r->_errno = ENOSYS; ++ } ++ } else { ++ r->_errno = ENODEV; ++ } ++ ++ return ret; ++} diff -NBaur newlib-2.1.0/libgloss/libsysbase/sbrk.c newlib-2.1.0-arm/libgloss/libsysbase/sbrk.c --- newlib-2.1.0/libgloss/libsysbase/sbrk.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/sbrk.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/sbrk.c 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,60 @@ +#include "config.h" +#include <_ansi.h> @@ -11118,8 +11191,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/sbrk.c newlib-2.1.0-arm/libgloss/li +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/stat.c newlib-2.1.0-arm/libgloss/libsysbase/stat.c --- newlib-2.1.0/libgloss/libsysbase/stat.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/stat.c 2014-11-28 23:15:49.002756000 +0000 -@@ -0,0 +1,39 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/stat.c 2014-12-10 19:17:29.086756000 +0000 +@@ -0,0 +1,43 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -11150,8 +11223,12 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/stat.c newlib-2.1.0-arm/libgloss/li + + dev = FindDevice(file); + -+ if(dev!=-1 && devoptab_list[dev]->stat_r) { -+ ret = devoptab_list[dev]->stat_r(r,file,st); ++ if(dev!=-1) { ++ if (devoptab_list[dev]->stat_r) { ++ ret = devoptab_list[dev]->stat_r(r,file,st); ++ } else { ++ r->_errno=ENOSYS; ++ } + } else { + ret = -1; + r->_errno = ENODEV; @@ -11161,7 +11238,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/stat.c newlib-2.1.0-arm/libgloss/li + diff -NBaur newlib-2.1.0/libgloss/libsysbase/statvfs.c newlib-2.1.0-arm/libgloss/libsysbase/statvfs.c --- newlib-2.1.0/libgloss/libsysbase/statvfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/statvfs.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/statvfs.c 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,23 @@ +#include +#include @@ -11188,7 +11265,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/statvfs.c newlib-2.1.0-arm/libgloss +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/syscall_support.c newlib-2.1.0-arm/libgloss/libsysbase/syscall_support.c --- newlib-2.1.0/libgloss/libsysbase/syscall_support.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/syscall_support.c 2014-12-06 02:53:28.898756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/syscall_support.c 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,51 @@ +#include + @@ -11205,7 +11282,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/syscall_support.c newlib-2.1.0-arm/ + NULL, // __getreent +}; + -+int __libc_lock_init(int *lock,int recursive) { ++int __libc_lock_init(_LOCK_T *lock,int recursive) { + + if ( __syscalls.lock_init ) { + return __syscalls.lock_init(lock, recursive); @@ -11214,7 +11291,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/syscall_support.c newlib-2.1.0-arm/ + return 0; +} + -+int __libc_lock_close( int *lock ) { ++int __libc_lock_close(_LOCK_T *lock ) { + + if ( __syscalls.lock_close) { + return __syscalls.lock_close(lock); @@ -11223,7 +11300,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/syscall_support.c newlib-2.1.0-arm/ + return 0; +} + -+int __libc_lock_release( int *lock ) { ++int __libc_lock_release(_LOCK_T *lock ) { + + if ( __syscalls.lock_release) { + return __syscalls.lock_release(lock); @@ -11232,7 +11309,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/syscall_support.c newlib-2.1.0-arm/ + return 0; +} + -+int __libc_lock_acquire( int *lock ) { ++int __libc_lock_acquire(_LOCK_T *lock ) { + + if ( __syscalls.lock_acquire) { + return __syscalls.lock_acquire(lock); @@ -11243,7 +11320,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/syscall_support.c newlib-2.1.0-arm/ + diff -NBaur newlib-2.1.0/libgloss/libsysbase/times.c newlib-2.1.0-arm/libgloss/libsysbase/times.c --- newlib-2.1.0/libgloss/libsysbase/times.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/times.c 2014-12-01 00:49:42.786756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/times.c 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,21 @@ +#include "config.h" +#include <_ansi.h> @@ -11263,12 +11340,12 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/times.c newlib-2.1.0-arm/libgloss/l + struct _reent *r = _REENT; +#endif + r->_errno = ENOSYS; -+ return (clock_t)-1; ++ return (clock_t)-1; +} + diff -NBaur newlib-2.1.0/libgloss/libsysbase/truncate.c newlib-2.1.0-arm/libgloss/libsysbase/truncate.c --- newlib-2.1.0/libgloss/libsysbase/truncate.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/truncate.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/truncate.c 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,59 @@ +#include "config.h" +#include <_ansi.h> @@ -11331,8 +11408,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/truncate.c newlib-2.1.0-arm/libglos +} diff -NBaur newlib-2.1.0/libgloss/libsysbase/unlink.c newlib-2.1.0-arm/libgloss/libsysbase/unlink.c --- newlib-2.1.0/libgloss/libsysbase/unlink.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/unlink.c 2014-11-28 23:15:49.002756000 +0000 -@@ -0,0 +1,33 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/unlink.c 2014-12-10 19:17:29.086756000 +0000 +@@ -0,0 +1,36 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -11353,14 +11430,17 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/unlink.c newlib-2.1.0-arm/libgloss/ +//--------------------------------------------------------------------------------- + struct _reent *r = _REENT; +#endif -+ int dev,ret; ++ int dev,ret=-1; + + dev = FindDevice(name); -+ if(dev!=-1 && devoptab_list[dev]->unlink_r) { -+ ret = devoptab_list[dev]->unlink_r(r,name); -+ } else { -+ ret = -1; ++ if(dev<0) { + r->_errno = ENODEV; ++ } else { ++ if (devoptab_list[dev]->unlink_r) { ++ ret = devoptab_list[dev]->unlink_r(r,name); ++ } else { ++ r->_errno=ENOSYS; ++ } + } + + return ret; @@ -11368,7 +11448,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/unlink.c newlib-2.1.0-arm/libgloss/ + diff -NBaur newlib-2.1.0/libgloss/libsysbase/wait.c newlib-2.1.0-arm/libgloss/libsysbase/wait.c --- newlib-2.1.0/libgloss/libsysbase/wait.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/wait.c 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/wait.c 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,28 @@ +/* + * Stub version of wait. @@ -11400,7 +11480,7 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/wait.c newlib-2.1.0-arm/libgloss/li + diff -NBaur newlib-2.1.0/libgloss/libsysbase/warning.h newlib-2.1.0-arm/libgloss/libsysbase/warning.h --- newlib-2.1.0/libgloss/libsysbase/warning.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/warning.h 2014-11-28 23:15:49.002756000 +0000 ++++ newlib-2.1.0-arm/libgloss/libsysbase/warning.h 2014-12-10 19:17:29.086756000 +0000 @@ -0,0 +1,43 @@ +#ifndef __WARNING_H__ +#define __WARNING_H__ @@ -11447,8 +11527,8 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/warning.h newlib-2.1.0-arm/libgloss +#endif /* __WARNING_H__ */ diff -NBaur newlib-2.1.0/libgloss/libsysbase/write.c newlib-2.1.0-arm/libgloss/libsysbase/write.c --- newlib-2.1.0/libgloss/libsysbase/write.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/libgloss/libsysbase/write.c 2014-11-28 23:15:49.002756000 +0000 -@@ -0,0 +1,49 @@ ++++ newlib-2.1.0-arm/libgloss/libsysbase/write.c 2014-12-10 19:17:29.086756000 +0000 +@@ -0,0 +1,51 @@ +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> @@ -11495,13 +11575,15 @@ diff -NBaur newlib-2.1.0/libgloss/libsysbase/write.c newlib-2.1.0-arm/libgloss/l + } + if(devoptab_list[dev]->write_r) + ret = devoptab_list[dev]->write_r(r,fd,ptr,len); ++ else ++ r->_errno=ENOSYS; + } + return ret; +} diff -NBaur newlib-2.1.0/newlib/configure.host newlib-2.1.0-arm/newlib/configure.host --- newlib-2.1.0/newlib/configure.host 2013-12-20 10:27:49.000000000 +0000 -+++ newlib-2.1.0-arm/newlib/configure.host 2014-12-05 22:43:44.014756000 +0000 -@@ -589,6 +589,13 @@ ++++ newlib-2.1.0-arm/newlib/configure.host 2014-12-10 19:17:29.086756000 +0000 +@@ -589,6 +589,14 @@ arc-*-*) syscall_dir=syscalls ;; @@ -11511,6 +11593,7 @@ diff -NBaur newlib-2.1.0/newlib/configure.host newlib-2.1.0-arm/newlib/configure + default_newlib_io_pos_args="yes" + newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED -D__DEFAULT_UTF8__" + newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections" ++ syscall_dir=syscalls + ;; arm*-*-pe) syscall_dir=syscalls @@ -11952,7 +12035,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/include/pthread.h newlib-2.1.0-arm/newlib/l -/* end of include file */ diff -NBaur newlib-2.1.0/newlib/libc/include/sys/config.h newlib-2.1.0-arm/newlib/libc/include/sys/config.h --- newlib-2.1.0/newlib/libc/include/sys/config.h 2013-10-23 11:04:42.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/include/sys/config.h 2014-12-06 02:45:02.150756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/include/sys/config.h 2014-12-10 19:17:29.094756000 +0000 @@ -4,6 +4,9 @@ #include /* floating point macros */ #include /* POSIX defs */ @@ -11965,7 +12048,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/include/sys/config.h newlib-2.1.0-arm/newli #endif diff -NBaur newlib-2.1.0/newlib/libc/include/sys/dirent.h newlib-2.1.0-arm/newlib/libc/include/sys/dirent.h --- newlib-2.1.0/newlib/libc/include/sys/dirent.h 2005-10-04 21:47:39.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/include/sys/dirent.h 2014-11-28 23:15:49.006756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/include/sys/dirent.h 2014-12-10 19:17:29.094756000 +0000 @@ -4,10 +4,49 @@ not support , we will get this file which uses #error to force an error. */ @@ -12020,8 +12103,8 @@ diff -NBaur newlib-2.1.0/newlib/libc/include/sys/dirent.h newlib-2.1.0-arm/newli \ No newline at end of file diff -NBaur newlib-2.1.0/newlib/libc/include/sys/iosupport.h newlib-2.1.0-arm/newlib/libc/include/sys/iosupport.h --- newlib-2.1.0/newlib/libc/include/sys/iosupport.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/include/sys/iosupport.h 2014-12-06 02:51:35.130756000 +0000 -@@ -0,0 +1,94 @@ ++++ newlib-2.1.0-arm/newlib/libc/include/sys/iosupport.h 2014-12-10 19:17:29.094756000 +0000 +@@ -0,0 +1,95 @@ +//--------------------------------------------------------------------------------- +#ifndef __iosupp_h__ +#define __iosupp_h__ @@ -12084,6 +12167,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/include/sys/iosupport.h newlib-2.1.0-arm/ne + + int (*chmod_r)(struct _reent *r, const char *path, mode_t mode); + int (*fchmod_r)(struct _reent *r, int fd, mode_t mode); ++ int (*rmdir_r)(struct _reent *r, const char *name); + +} devoptab_t; + @@ -12094,10 +12178,10 @@ diff -NBaur newlib-2.1.0/newlib/libc/include/sys/iosupport.h newlib-2.1.0-arm/ne + void *(*sbrk_r) (struct _rent *ptr, ptrdiff_t incr); + void (*exit) ( int rc ); + int (*gettod_r) (struct _reent *ptr, struct timeval *tp, struct timezone *tz); -+ int (*lock_init) (int *lock,int recursive); -+ int (*lock_close) (int *lock); -+ int (*lock_release) (int *lock); -+ int (*lock_acquire) (int *lock); ++ int (*lock_init) (_LOCK_T *lock,int recursive); ++ int (*lock_close) (_LOCK_T *lock); ++ int (*lock_release) (_LOCK_T *lock); ++ int (*lock_acquire) (_LOCK_T *lock); + struct _reent *(*__getreent) (); +} __syscalls_t; + @@ -12118,7 +12202,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/include/sys/iosupport.h newlib-2.1.0-arm/ne +//--------------------------------------------------------------------------------- diff -NBaur newlib-2.1.0/newlib/libc/include/sys/statvfs.h newlib-2.1.0-arm/newlib/libc/include/sys/statvfs.h --- newlib-2.1.0/newlib/libc/include/sys/statvfs.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/include/sys/statvfs.h 2014-11-28 23:15:49.006756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/include/sys/statvfs.h 2014-12-10 19:17:29.094756000 +0000 @@ -0,0 +1,35 @@ +#ifndef _SYS_STATVFS_H +#define _SYS_STATVFS_H @@ -12156,9 +12240,27 @@ diff -NBaur newlib-2.1.0/newlib/libc/include/sys/statvfs.h newlib-2.1.0-arm/newl + +#endif // _SYS_STATVFS_H \ No newline at end of file +diff -NBaur newlib-2.1.0/newlib/libc/include/sys/syslimits.h newlib-2.1.0-arm/newlib/libc/include/sys/syslimits.h +--- newlib-2.1.0/newlib/libc/include/sys/syslimits.h 2002-08-23 02:56:03.000000000 +0100 ++++ newlib-2.1.0-arm/newlib/libc/include/sys/syslimits.h 2014-12-10 19:17:29.094756000 +0000 +@@ -44,12 +44,12 @@ + #define LINK_MAX 32767 /* max file link count */ + #define MAX_CANON 255 /* max bytes in term canon input line */ + #define MAX_INPUT 255 /* max bytes in terminal input */ +-#define NAME_MAX 255 /* max bytes in a file name */ ++#define NAME_MAX 768 /* max bytes in a file name */ + #define NGROUPS_MAX 16 /* max supplemental group id's */ + #ifndef OPEN_MAX + #define OPEN_MAX 64 /* max open files per process */ + #endif +-#define PATH_MAX 1024 /* max bytes in pathname */ ++#define PATH_MAX 4096 /* max bytes in pathname */ + #define PIPE_BUF 512 /* max bytes for atomic pipe writes */ + #define IOV_MAX 1024 /* max elements in i/o vector */ + diff -NBaur newlib-2.1.0/newlib/libc/include/sys/_types.h newlib-2.1.0-arm/newlib/libc/include/sys/_types.h --- newlib-2.1.0/newlib/libc/include/sys/_types.h 2013-10-15 18:37:37.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/include/sys/_types.h 2014-11-28 23:15:49.010756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/include/sys/_types.h 2014-12-10 19:17:29.094756000 +0000 @@ -17,7 +17,7 @@ #endif @@ -12170,7 +12272,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/include/sys/_types.h newlib-2.1.0-arm/newli #ifndef __uid_t_defined diff -NBaur newlib-2.1.0/newlib/libc/include/sys/types.h newlib-2.1.0-arm/newlib/libc/include/sys/types.h --- newlib-2.1.0/newlib/libc/include/sys/types.h 2013-11-29 23:14:57.000000000 +0000 -+++ newlib-2.1.0-arm/newlib/libc/include/sys/types.h 2014-11-28 23:15:49.010756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/include/sys/types.h 2014-12-10 19:17:29.094756000 +0000 @@ -152,7 +152,7 @@ defined(__sparc__) || defined(__SPU__) typedef unsigned long ino_t; @@ -12192,7 +12294,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/include/sys/types.h newlib-2.1.0-arm/newlib diff -NBaur newlib-2.1.0/newlib/libc/include/sys/unistd.h newlib-2.1.0-arm/newlib/libc/include/sys/unistd.h --- newlib-2.1.0/newlib/libc/include/sys/unistd.h 2013-11-22 22:39:51.000000000 +0000 -+++ newlib-2.1.0-arm/newlib/libc/include/sys/unistd.h 2014-11-28 23:15:49.010756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/include/sys/unistd.h 2014-12-10 19:17:29.098756000 +0000 @@ -222,12 +222,10 @@ int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] )); #endif @@ -12208,7 +12310,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/include/sys/unistd.h newlib-2.1.0-arm/newli int _EXFUN(getdtablesize, (void)); diff -NBaur newlib-2.1.0/newlib/libc/locale/locale.c newlib-2.1.0-arm/newlib/libc/locale/locale.c --- newlib-2.1.0/newlib/libc/locale/locale.c 2012-03-29 21:27:15.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/locale/locale.c 2014-11-28 23:15:49.010756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/locale/locale.c 2014-12-10 19:17:29.098756000 +0000 @@ -188,7 +188,12 @@ #define _LC_LAST 7 #define ENCODING_LEN 31 @@ -12243,15 +12345,11 @@ diff -NBaur newlib-2.1.0/newlib/libc/locale/locale.c newlib-2.1.0-arm/newlib/lib static char lc_ctype_charset[ENCODING_LEN + 1] = "ASCII"; diff -NBaur newlib-2.1.0/newlib/libc/machine/arm/sys/lock.h newlib-2.1.0-arm/newlib/libc/machine/arm/sys/lock.h --- newlib-2.1.0/newlib/libc/machine/arm/sys/lock.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/machine/arm/sys/lock.h 2014-12-06 03:31:29.422756000 +0000 -@@ -0,0 +1,82 @@ ++++ newlib-2.1.0-arm/newlib/libc/machine/arm/sys/lock.h 2014-12-10 19:17:29.098756000 +0000 +@@ -0,0 +1,78 @@ +#ifndef __SYS_LOCK_H__ +#define __SYS_LOCK_H__ + -+ -+typedef int _LOCK_T; -+typedef int _LOCK_RECURSIVE_T; -+ +#include <_ansi.h> + +typedef int _LOCK_T; @@ -12319,17 +12417,17 @@ diff -NBaur newlib-2.1.0/newlib/libc/machine/arm/sys/lock.h newlib-2.1.0-arm/new + __libc_lock_release(&(NAME)) + + -+extern int __libc_lock_init(int*,int); -+extern int __libc_lock_close(int*); -+extern int __libc_lock_acquire(int*); -+extern int __libc_lock_try_acquire(int*); -+extern int __libc_lock_release(int*); ++int __libc_lock_init(_LOCK_T *,int); ++int __libc_lock_close(_LOCK_T *); ++int __libc_lock_acquire(_LOCK_T *); ++int __libc_lock_try_acquire(_LOCK_T *); ++int __libc_lock_release(_LOCK_T *); + + +#endif /* __SYS_LOCK_H__ */ diff -NBaur newlib-2.1.0/newlib/libc/machine/arm/sys/stdio.h newlib-2.1.0-arm/newlib/libc/machine/arm/sys/stdio.h --- newlib-2.1.0/newlib/libc/machine/arm/sys/stdio.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/machine/arm/sys/stdio.h 2014-11-28 23:15:49.010756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/machine/arm/sys/stdio.h 2014-12-10 19:17:29.098756000 +0000 @@ -0,0 +1,27 @@ +#ifndef _NEWLIB_STDIO_H +#define _NEWLIB_STDIO_H @@ -12360,7 +12458,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/machine/arm/sys/stdio.h newlib-2.1.0-arm/ne +#endif /* _NEWLIB_STDIO_H */ diff -NBaur newlib-2.1.0/newlib/libc/misc/init.c newlib-2.1.0-arm/newlib/libc/misc/init.c --- newlib-2.1.0/newlib/libc/misc/init.c 2010-06-04 16:30:40.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/misc/init.c 2014-11-28 23:15:49.010756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/misc/init.c 2014-12-10 19:17:29.098756000 +0000 @@ -40,4 +40,8 @@ for (i = 0; i < count; i++) __init_array_start[i] (); @@ -12372,7 +12470,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/misc/init.c newlib-2.1.0-arm/newlib/libc/mi #endif diff -NBaur newlib-2.1.0/newlib/libc/reent/getreent.c newlib-2.1.0-arm/newlib/libc/reent/getreent.c --- newlib-2.1.0/newlib/libc/reent/getreent.c 2007-09-07 01:45:55.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/reent/getreent.c 2014-12-06 02:46:49.018756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/reent/getreent.c 2014-12-10 19:17:29.102756000 +0000 @@ -1,3 +1,4 @@ +#if 0 /* default reentrant pointer when multithread enabled */ @@ -12386,7 +12484,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/reent/getreent.c newlib-2.1.0-arm/newlib/li +#endif diff -NBaur newlib-2.1.0/newlib/libc/reent/gettimeofdayr.c newlib-2.1.0-arm/newlib/libc/reent/gettimeofdayr.c --- newlib-2.1.0/newlib/libc/reent/gettimeofdayr.c 2007-07-06 17:56:30.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/reent/gettimeofdayr.c 2014-11-28 23:15:49.010756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/reent/gettimeofdayr.c 2014-12-10 19:17:29.102756000 +0000 @@ -59,7 +59,7 @@ Check libc.a to see if its available on yours. */ @@ -12403,22 +12501,9 @@ diff -NBaur newlib-2.1.0/newlib/libc/reent/gettimeofdayr.c newlib-2.1.0-arm/newl - +*/ #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */ -diff -NBaur newlib-2.1.0/newlib/libc/stdio/fopen.c newlib-2.1.0-arm/newlib/libc/stdio/fopen.c ---- newlib-2.1.0/newlib/libc/stdio/fopen.c 2013-11-18 17:28:05.000000000 +0000 -+++ newlib-2.1.0-arm/newlib/libc/stdio/fopen.c 2014-11-28 23:15:49.010756000 +0000 -@@ -151,6 +151,9 @@ - - _newlib_flockfile_start (fp); - -+ flags &= ~(__SLBF | __SNBF | __SMBF); -+ flags |= __SNBF; -+ - fp->_file = f; - fp->_flags = flags; - fp->_cookie = (_PTR) fp; diff -NBaur newlib-2.1.0/newlib/libc/stdlib/mbtowc_r.c newlib-2.1.0-arm/newlib/libc/stdlib/mbtowc_r.c --- newlib-2.1.0/newlib/libc/stdlib/mbtowc_r.c 2013-11-18 17:26:51.000000000 +0000 -+++ newlib-2.1.0-arm/newlib/libc/stdlib/mbtowc_r.c 2014-11-28 23:15:49.010756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/stdlib/mbtowc_r.c 2014-12-10 19:17:29.102756000 +0000 @@ -9,7 +9,7 @@ int (*__mbtowc) (struct _reent *, wchar_t *, const char *, size_t, @@ -12430,7 +12515,7 @@ diff -NBaur newlib-2.1.0/newlib/libc/stdlib/mbtowc_r.c newlib-2.1.0-arm/newlib/l #else diff -NBaur newlib-2.1.0/newlib/libc/stdlib/wctomb_r.c newlib-2.1.0-arm/newlib/libc/stdlib/wctomb_r.c --- newlib-2.1.0/newlib/libc/stdlib/wctomb_r.c 2012-08-08 12:04:18.000000000 +0100 -+++ newlib-2.1.0-arm/newlib/libc/stdlib/wctomb_r.c 2014-11-28 23:15:49.010756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/stdlib/wctomb_r.c 2014-12-10 19:17:29.102756000 +0000 @@ -8,7 +8,7 @@ int (*__wctomb) (struct _reent *, char *, wchar_t, const char *charset, @@ -12442,18 +12527,30 @@ diff -NBaur newlib-2.1.0/newlib/libc/stdlib/wctomb_r.c newlib-2.1.0-arm/newlib/l #else diff -NBaur newlib-2.1.0/newlib/libc/sys/arm/sys/param.h newlib-2.1.0-arm/newlib/libc/sys/arm/sys/param.h --- newlib-2.1.0/newlib/libc/sys/arm/sys/param.h 2005-02-02 19:00:30.000000000 +0000 -+++ newlib-2.1.0-arm/newlib/libc/sys/arm/sys/param.h 2014-11-28 23:15:49.010756000 +0000 -@@ -6,6 +6,7 @@ - # define HZ (100) - # define NOFILE (60) - # define PATHSIZE (1024) -+# define MAXPATHLEN PATHSIZE ++++ newlib-2.1.0-arm/newlib/libc/sys/arm/sys/param.h 2014-12-10 19:19:15.174756000 +0000 +@@ -3,10 +3,17 @@ + #ifndef _SYS_PARAM_H + # define _SYS_PARAM_H +-# define HZ (100) ++#ifndef HZ ++# define HZ (60) ++#endif ++#ifndef NOFILE + # define NOFILE (60) +-# define PATHSIZE (1024) ++#endif ++#ifndef PATHSIZE ++# define PATHSIZE (4096) ++#endif + ++#define MAXPATHLEN 4096 #define BIG_ENDIAN 4321 #define LITTLE_ENDIAN 1234 + diff -NBaur newlib-2.1.0/newlib/libc/syscalls/Makefile.am newlib-2.1.0-arm/newlib/libc/syscalls/Makefile.am --- newlib-2.1.0/newlib/libc/syscalls/Makefile.am 2008-01-03 22:33:37.000000000 +0000 -+++ newlib-2.1.0-arm/newlib/libc/syscalls/Makefile.am 2014-11-28 23:15:49.010756000 +0000 ++++ newlib-2.1.0-arm/newlib/libc/syscalls/Makefile.am 2014-12-10 19:17:29.102756000 +0000 @@ -20,8 +20,9 @@ sysstat.c \ systimes.c \