Index: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/.cproject
===================================================================
--- asp3_tinet_ecnl_rx/trunk/musl-1.1.18/.cproject	(revision 342)
+++ asp3_tinet_ecnl_rx/trunk/musl-1.1.18/.cproject	(revision 364)
@@ -24,5 +24,5 @@
 			<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
 				<option id="toolchain.id" value="RENESAS_GCC_RX"/>
-				<option id="toolchain.version" value="4.8.4.201703"/>
+				<option id="toolchain.version" value="4.8.4.201803"/>
 			</storageModule>
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -38,5 +38,5 @@
 							<option id="com.renesas.cdt.managedbuild.gcc.core.option.deviceCommand.614640820" name="DeviceCommand" superClass="com.renesas.cdt.managedbuild.gcc.core.option.deviceCommand" useByScannerDiscovery="false" value="R5F563NB" valueType="string"/>
 							<option id="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize.223830224" name="Warn if stack size exceeds the limit (-Wstack-usage) (H')" superClass="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize" useByScannerDiscovery="false" value="100" valueType="string"/>
-							<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.otherFlags.1638796861" name="Other Flags" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.otherFlags" valueType="stringList">
+							<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.otherFlags.1638796861" name="Other Flags" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.otherFlags" useByScannerDiscovery="false" valueType="stringList">
 								<listOptionValue builtIn="false" value="-Werror=implicit-function-declaration"/>
 								<listOptionValue builtIn="false" value="-Werror=implicit-int"/>
@@ -44,5 +44,6 @@
 								<listOptionValue builtIn="false" value="-Werror=pointer-arith"/>
 							</option>
-							<option id="com.renesas.cdt.managedbuild.gcc.core.option.optimization.functionsections.730653111" name="Function sections (-ffunction-sections)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.optimization.functionsections" value="true" valueType="boolean"/>
+							<option id="com.renesas.cdt.managedbuild.gcc.core.option.optimization.functionsections.730653111" name="Function sections (-ffunction-sections)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.optimization.functionsections" useByScannerDiscovery="true" value="true" valueType="boolean"/>
+							<option id="com.renesas.cdt.managedbuild.gcc.core.option.cpu.64bitdouble.1900028908" name="Make the double data type be 64 bits in size" superClass="com.renesas.cdt.managedbuild.gcc.core.option.cpu.64bitdouble" useByScannerDiscovery="true" value="true" valueType="boolean"/>
 							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.renesas.cdt.managedbuild.gcc.core.targetPlatform.1287712370" isAbstract="false" osList="all" superClass="com.renesas.cdt.managedbuild.gcc.core.targetPlatform"/>
 							<builder buildPath="${workspace_loc:/musl}/Debug" id="com.renesas.cdt.managedbuild.gcc.core.builder.1709148240" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="GCC for Renesas Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
Index: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/arch/rx/crt_arch.h
===================================================================
--- asp3_tinet_ecnl_rx/trunk/musl-1.1.18/arch/rx/crt_arch.h	(revision 342)
+++ asp3_tinet_ecnl_rx/trunk/musl-1.1.18/arch/rx/crt_arch.h	(revision 364)
@@ -1,1 +1,9 @@
+#ifndef __c2__
 #define main sta_ker
+#else
+#define main dummy_start
+static int dummy_start(int argc, char **argv, char **envp)
+{
+	return 0;
+}
+#endif
Index: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/arch/rx/syscall_arch.h
===================================================================
--- asp3_tinet_ecnl_rx/trunk/musl-1.1.18/arch/rx/syscall_arch.h	(revision 342)
+++ asp3_tinet_ecnl_rx/trunk/musl-1.1.18/arch/rx/syscall_arch.h	(revision 364)
@@ -87,12 +87,29 @@
 long __syscall_ret(unsigned long), __syscall_nr(long nr, ...);
 
-#define __syscall(n, ...) n(__VA_ARGS__)
-#define __syscall_cp(n, ...) n(__VA_ARGS__)
-#define syscall(n, ...) __syscall_ret(__syscall(n, __VA_ARGS__))
-#define syscall_cp(n, ...) __syscall_ret(__syscall_cp(n, __VA_ARGS__))
+#define __syscall0(n) n()
+#define __syscall1(n,a) n(__scc(a))
+#define __syscall2(n,a,b) n(__scc(a),__scc(b))
+#define __syscall3(n,a,b,c) n(__scc(a),__scc(b),__scc(c))
+#define __syscall4(n,a,b,c,d) n(__scc(a),__scc(b),__scc(c),__scc(d))
+#define __syscall5(n,a,b,c,d,e) n(__scc(a),__scc(b),__scc(c),__scc(d),__scc(e))
+#define __syscall6(n,a,b,c,d,e,f) n(__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),__scc(f))
+#define __syscall7(n,a,b,c,d,e,f,g) n(__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),__scc(f),__scc(g))
 
-#define __syscall2(n, ...) n(__VA_ARGS__)
-#define __syscall3(n, ...) n(__VA_ARGS__)
-#define __syscall_cp2(n, ...) n(__VA_ARGS__)
-#define __syscall_cp3(n, ...) n(__VA_ARGS__)
+#define __syscall_cp0(n) n()
+#define __syscall_cp1(n,a) n(__scc(a))
+#define __syscall_cp2(n,a,b) n(__scc(a),__scc(b))
+#define __syscall_cp3(n,a,b,c) n(__scc(a),__scc(b),__scc(c))
+#define __syscall_cp4(n,a,b,c,d) n(__scc(a),__scc(b),__scc(c),__scc(d))
+#define __syscall_cp5(n,a,b,c,d,e) n(__scc(a),__scc(b),__scc(c),__scc(d),__scc(e))
+#define __syscall_cp6(n,a,b,c,d,e,f) n(__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),__scc(f))
+#define __syscall_cp7(n,a,b,c,d,e,f,g) n(__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),__scc(f),__scc(g))
+
+#define __SYSCALL_NARGS_X(a,b,c,d,e,f,g,h,n,...) n
+#define __SYSCALL_NARGS(...) __SYSCALL_NARGS_X(__VA_ARGS__,7,6,5,4,3,2,1,0,)
+#define __SYSCALL_CONCAT_X(a,b) a##b
+#define __SYSCALL_CONCAT(a,b) __SYSCALL_CONCAT_X(a,b)
+#define __SYSCALL_DISP(b,...) __SYSCALL_CONCAT(b,__SYSCALL_NARGS(__VA_ARGS__))(__VA_ARGS__)
+
+#define syscall(...) __syscall_ret(__SYSCALL_DISP(__syscall, __VA_ARGS__))
+#define syscall_cp(...) __syscall_ret(__SYSCALL_DISP(__syscall_cp, __VA_ARGS__))
 #endif
Index: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/bits/alltypes.h
===================================================================
--- asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/bits/alltypes.h	(revision 342)
+++ asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/bits/alltypes.h	(revision 364)
@@ -1,9 +1,17 @@
 #if defined(_MSC_VER) || defined(__c2__)
+#define asctime musl_asctime
+#define calloc musl_calloc
+#define clock musl_clock
 #define close musl_close
 #define execvp musl_execvp
+#define exit musl_exit
 #define fclose musl_fclose
 #define fdopen musl_fdopen
 #define fflush musl_fflush
+#define fma _musl_fma
+#define fgetc musl_fgetc
 #define fopen musl_fopen
+#define fprintf musl_fprintf
+#define fputc musl_fputc
 #define free musl_free
 #define fwrite musl_fwrite
@@ -11,17 +19,16 @@
 #define localtime musl_localtime
 #define lseek musl_lseek
+#define malloc musl_malloc
+#define memmove musl_memmove
 #define open musl_open
+#define perror musl_perror
 #define read musl_read
-#define malloc musl_malloc
-#define calloc musl_calloc
 #define realloc musl_realloc
+#define strftime musl_strftime
+#define strnlen musl_strnlen
+#define strtoul musl_strtoul
 #define time musl_time
+#define tzset musl_tzset
 #define unlink musl_unlink
-#define perror musl_perror
-#define strnlen musl_strnlen
-#define strftime musl_strftime
-#define asctime musl_asctime
-#define tzset musl_tzset
-#define clock musl_clock
 #endif
 #ifdef _MSC_VER
@@ -72,5 +79,9 @@
 
 #if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
+#if defined(_MSC_VER) || defined(__c2__)
+typedef long long time_t;
+#else
 typedef long time_t;
+#endif
 #define __DEFINED_time_t
 #endif
Index: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/math.h
===================================================================
--- asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/math.h	(revision 342)
+++ asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/math.h	(revision 364)
@@ -15,7 +15,11 @@
 #define NAN       __builtin_nanf("")
 #define INFINITY  __builtin_inff()
-#else
+#elif !defined(_MSC_VER)
 #define NAN       (0.0f/0.0f)
 #define INFINITY  1e5000f
+#else
+#define _HUGE_ENUF  1e+300
+#define INFINITY   ((float)(_HUGE_ENUF * _HUGE_ENUF))
+#define NAN        ((float)(INFINITY * 0.0F))
 #endif
 
Index: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/stdarg.h
===================================================================
--- asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/stdarg.h	(revision 342)
+++ asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/stdarg.h	(revision 364)
@@ -10,8 +10,25 @@
 #include <bits/alltypes.h>
 
+#if !defined(_MSC_VER) && !defined(__c2__)
+
 #define va_start(v,l)   __builtin_va_start(v,l)
 #define va_end(v)       __builtin_va_end(v)
 #define va_arg(v,l)     __builtin_va_arg(v,l)
 #define va_copy(d,s)    __builtin_va_copy(d,s)
+
+#else
+
+#define _INTSIZEOF(n)          ((sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1))
+
+#define __crt_va_start(ap, v)   ((void)(ap = (va_list)&(v) + _INTSIZEOF(v)))
+#define __crt_va_arg(ap, t)     (*(t*)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)))
+#define __crt_va_end(ap)        ((void)(ap = (va_list)0))
+
+#define va_start __crt_va_start
+#define va_arg   __crt_va_arg
+#define va_end   __crt_va_end
+#define va_copy(destination, source) ((destination) = (source))
+
+#endif
 
 #ifdef __cplusplus
Index: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/env/__libc_start_main.c
===================================================================
--- asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/env/__libc_start_main.c	(revision 342)
+++ asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/env/__libc_start_main.c	(revision 364)
@@ -84,4 +84,6 @@
 	libc_start_init();
 }
+#undef exit
+#define exit(x) x
 #endif
 
Index: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/internal/syscall.h
===================================================================
--- asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/internal/syscall.h	(revision 342)
+++ asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/internal/syscall.h	(revision 364)
@@ -44,5 +44,5 @@
 #endif
 #define __syscall7(n,a,b,c,d,e,f,g) (__syscall)(n,__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),__scc(f),__scc(g))
-#endif
+
 #define __SYSCALL_NARGS_X(a,b,c,d,e,f,g,h,n,...) n
 #define __SYSCALL_NARGS(...) __SYSCALL_NARGS_X(__VA_ARGS__,7,6,5,4,3,2,1,0,)
@@ -50,8 +50,8 @@
 #define __SYSCALL_CONCAT(a,b) __SYSCALL_CONCAT_X(a,b)
 #define __SYSCALL_DISP(b,...) __SYSCALL_CONCAT(b,__SYSCALL_NARGS(__VA_ARGS__))(__VA_ARGS__)
-#if 0
+#endif
 #define __syscall(...) __SYSCALL_DISP(__syscall,__VA_ARGS__)
-#define syscall(...) __syscall_ret(__syscall(__VA_ARGS__))
-#endif
+//#define syscall(...) __syscall_ret(__syscall(__VA_ARGS__))
+
 #define socketcall __socketcall
 #define socketcall_cp __socketcall_cp
@@ -64,8 +64,7 @@
 #define __syscall_cp5(n,a,b,c,d,e) (__syscall_cp)(n,__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),0)
 #define __syscall_cp6(n,a,b,c,d,e,f) (__syscall_cp)(n,__scc(a),__scc(b),__scc(c),__scc(d),__scc(e),__scc(f))
-
+#endif
 #define __syscall_cp(...) __SYSCALL_DISP(__syscall_cp,__VA_ARGS__)
-#define syscall_cp(...) __syscall_ret(__syscall_cp(__VA_ARGS__))
-#endif
+//#define syscall_cp(...) __syscall_ret(__syscall_cp(__VA_ARGS__))
 
 #ifndef SYSCALL_USE_SOCKETCALL
Index: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/stdlib/strtol.c
===================================================================
--- asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/stdlib/strtol.c	(revision 342)
+++ asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/stdlib/strtol.c	(revision 364)
@@ -58,5 +58,9 @@
 
 weak_alias(strtol, __strtol_internal);
+#if defined(_MSC_VER) || defined(__c2__)
+weak_alias(musl_strtoul, __strtoul_internal);
+#else
 weak_alias(strtoul, __strtoul_internal);
+#endif
 weak_alias(strtoll, __strtoll_internal);
 weak_alias(strtoull, __strtoull_internal);
