From b945a6bdf089590cce80e17862d03fbacc5bb3c7 Mon Sep 17 00:00:00 2001 From: midipix Date: Jan 26 2019 22:47:02 +0000 Subject: psxglue.h: update following libpsxscl's introduction of __psx_user_frame(). --- diff --git a/arch/nt32/psxglue.h b/arch/nt32/psxglue.h index 8e32aae..db2a8ed 100644 --- a/arch/nt32/psxglue.h +++ b/arch/nt32/psxglue.h @@ -20,7 +20,7 @@ struct __ldso_vtbl { struct __psx_vtbl { void (*do_global_ctors_fn) (); void (*do_global_dtors_fn) (); - int (*start_main) (int (*)(int,char **,char **), int, char **, int (*)()); + int (*start_main) (int, char **, int (*)()); void (*convert_thread) (void); void (*unmapself) (void *, size_t); ssize_t (*log_output) (void *, ssize_t); diff --git a/arch/nt64/psxglue.h b/arch/nt64/psxglue.h index 8e32aae..db2a8ed 100644 --- a/arch/nt64/psxglue.h +++ b/arch/nt64/psxglue.h @@ -20,7 +20,7 @@ struct __ldso_vtbl { struct __psx_vtbl { void (*do_global_ctors_fn) (); void (*do_global_dtors_fn) (); - int (*start_main) (int (*)(int,char **,char **), int, char **, int (*)()); + int (*start_main) (int, char **, int (*)()); void (*convert_thread) (void); void (*unmapself) (void *, size_t); ssize_t (*log_output) (void *, ssize_t); diff --git a/src/arch/nt32/crt_glue.c b/src/arch/nt32/crt_glue.c index eb5cc6a..29effe8 100644 --- a/src/arch/nt32/crt_glue.c +++ b/src/arch/nt32/crt_glue.c @@ -9,9 +9,6 @@ extern const struct __ldso_vtbl * __ldso_vtbl; extern const struct __psx_vtbl * __psx_vtbl; -typedef int __app_main(); -typedef int __pthread_surrogate_routine(struct pthread *); - static int __pthread_surrogate_init(struct pthread * self); extern int __libc_start_main( @@ -52,7 +49,7 @@ void __init_tls (size_t * auxv) }; void __libc_entry_routine( - __app_main * __main, + int (*main)(), __psx_init_routine * __psx_init, const unsigned short * __ctty, int options) @@ -65,7 +62,7 @@ void __libc_entry_routine( /* ctx init */ ctx.size = sizeof(ctx); ctx.options = options; - ctx.usrmain = __main; + ctx.usrmain = main; ctx.ldsoaddr = _init; ctx.ctty = __ctty; ctx.pthread_create_fn = pthread_create; @@ -91,7 +88,7 @@ void __libc_entry_routine( __global_dtors_fn = __psx_vtbl->do_global_dtors_fn; /* enter libc */ - __psx_vtbl->start_main(__main,argc,argv,__libc_start_main); + __psx_vtbl->start_main(argc,argv,__libc_start_main); /* guard */ a_crash(); diff --git a/src/arch/nt64/crt_glue.c b/src/arch/nt64/crt_glue.c index eb5cc6a..29effe8 100644 --- a/src/arch/nt64/crt_glue.c +++ b/src/arch/nt64/crt_glue.c @@ -9,9 +9,6 @@ extern const struct __ldso_vtbl * __ldso_vtbl; extern const struct __psx_vtbl * __psx_vtbl; -typedef int __app_main(); -typedef int __pthread_surrogate_routine(struct pthread *); - static int __pthread_surrogate_init(struct pthread * self); extern int __libc_start_main( @@ -52,7 +49,7 @@ void __init_tls (size_t * auxv) }; void __libc_entry_routine( - __app_main * __main, + int (*main)(), __psx_init_routine * __psx_init, const unsigned short * __ctty, int options) @@ -65,7 +62,7 @@ void __libc_entry_routine( /* ctx init */ ctx.size = sizeof(ctx); ctx.options = options; - ctx.usrmain = __main; + ctx.usrmain = main; ctx.ldsoaddr = _init; ctx.ctty = __ctty; ctx.pthread_create_fn = pthread_create; @@ -91,7 +88,7 @@ void __libc_entry_routine( __global_dtors_fn = __psx_vtbl->do_global_dtors_fn; /* enter libc */ - __psx_vtbl->start_main(__main,argc,argv,__libc_start_main); + __psx_vtbl->start_main(argc,argv,__libc_start_main); /* guard */ a_crash();