Commit 1073131f authored by Armando I. Rivera's avatar Armando I. Rivera

Added emitted prototype for standalone function, added return type to main section that is emitted.

parent bf1d9231
......@@ -656,6 +656,7 @@ CUT*/
fprintf(fp," called on your platform.\n");
fprintf(fp,"*/\n");
fprintf(fp,"int stndlone(int argc, char *argv[], char *env[]);\n");
fprintf(fp,"unsigned long ulGlobalVariables=%ld;\n",pBuild->cGlobalVariables);
fprintf(fp,"unsigned long ulNodeCounter=%ld;\n",pBuild->NodeCounter);
fprintf(fp,"unsigned long ulStartNode=%ld;\n",pBuild->StartNode);
......@@ -678,10 +679,10 @@ CUT*/
}
fprintf(fp,"\n0x00 };\n");
fprintf(fp,"#ifdef WIN32\n");
fprintf(fp,"main(int argc, char *argv[]){stndlone(argc,argv);}\n");
fprintf(fp,"int main(int argc, char *argv[]){stndlone(argc,argv);}\n");
fprintf(fp,"#else\n");
fprintf(fp,"char **_environ;\n");
fprintf(fp,"main(int argc, char *argv[], char *env[]){stndlone(argc,argv,env);}\n");
fprintf(fp,"int main(int argc, char *argv[], char *env[]){stndlone(argc,argv,env);}\n");
fprintf(fp,"#endif\n");
fprintf(fp,"/*End of file %s */",szFileName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment