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:
Bahadir Balban
2009-10-07 19:17:24 +03:00
parent 8a55a80c23
commit 96cd0949b6
11 changed files with 147 additions and 215 deletions

View File

@@ -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__ */

View 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;
}