mirror of
https://github.com/drasko/codezero.git
synced 2026-08-05 22:10:07 +02:00
Correct placement of arguments and environment on stack.
int main(int argc, char *argv[]) style main function works now on Codezero/POSIX.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#ifndef __LIBPOSIX_INIT_H__
|
||||
#define __LIBPOSIX_INIT_H__
|
||||
|
||||
void libposix_init(void);
|
||||
void posix_service_init(void);
|
||||
int __libposix_init(void *envp);
|
||||
|
||||
#endif /* __LIBPOSIX_INIT_H__ */
|
||||
|
||||
14
conts/posix/libposix/init.c
Normal file
14
conts/posix/libposix/init.c
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <libposix.h>
|
||||
#include <posix_init.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int __libposix_init(void *envp)
|
||||
{
|
||||
__environ = envp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user