#include <stdlib.h>
#include <string.h>
+#ifndef NONITCNI
se_exec_data_t* exec_Process_Process_basic_exec_execute_4(Process s, char *prog, char *args, int len, int pipeflag) {
se_exec_data_t* result = NULL;
int id;
}
return result;
}
+#endif
int exec_NativeProcess_NativeProcess_is_finished_0(void*d) {
se_exec_data_t*data = (se_exec_data_t*)d;
#include <sys/wait.h>
#include <signal.h>
+#ifndef NONITCNI
#include <exec._nitni.h>
+#endif
typedef struct se_exec_data se_exec_data_t;
struct se_exec_data {
int err_fd;
};
+#ifndef NONITCNI
+se_exec_data_t* exec_Process_Process_basic_exec_execute_4(Process, char *, char *, int, int);
+#endif
+
#define string_NativeString_NativeString_system_0(self) (system(self))
#define exec_NativeProcess_NativeProcess_id_0(self) (((se_exec_data_t*)self)->id)
int exec_NativeProcess_NativeProcess_is_finished_0(void*);
void exec_NativeProcess_NativeProcess_wait_0(void*);
-se_exec_data_t* exec_Process_Process_basic_exec_execute_4(Process, char *, char *, int, int);
#endif
#include "file_nit.h"
-
+#ifndef NONITCNI
/*
C implementation of file::String::files
return HashSet_as_Set( results );
}
}
+#endif
int string_NativeString_NativeString_file_exists_0(char *f){
FILE *hdl = fopen(f,"r");
#include <stdio.h>
#include <sys/types.h>
+#ifndef NONITCNI
#include <file._nitni.h>
Set String_files___impl( String recv );
+#endif
extern int string_NativeString_NativeString_file_exists_0(char *f);
extern void *string_NativeString_NativeString_file_stat_0(char *f);
write(fd, &c, 1);
}
-
+#ifndef NONITCNI
/*
C implementation of stream::Object::intern_poll
return null_Int();
}
+#endif
#include <unistd.h>
+#ifndef NONITCNI
#include <stream._nitni.h>
+nullable_Int Object_intern_poll___impl( Object recv, Array in_fds, Array out_fds );
+#endif
#define stream_FDStream_FDStream_native_close_1(self, p0) (close(p0))
#define stream_FDStream_FDStream_native_read_3(s, i, b, l) read((i), ((b)), ((l)))
#define stream_FDStream_FDStream_native_write_3(s, i, b, l) write((i), ((b)), ((l)))
-nullable_Int Object_intern_poll___impl( Object recv, Array in_fds, Array out_fds );
-
#endif
#include "string_nit.h"
+#ifndef NONITCNI
/*
C implementation of string::String::to_f
return value;
}
+#endif
* another product.
*/
+#ifndef NONITCNI
#include <string._nitni.h>
+float String_to_f___impl( String recv );
+#endif
#define kernel_Sys_Sys_native_argc_0(self) (glob_argc)
#define kernel_Sys_Sys_native_argv_1(self, p0) (glob_argv[(p0)])
-float String_to_f___impl( String recv );
#endif
var ofiles = new Array[String]
for f in cfiles do
var o = f.strip_extension(".c") + ".o"
- makefile.write("{o}: {f}\n\t$(CC) $(CFLAGS) -I .nit_compile -I ../clib -c -o {o} {f}\n\n")
+ makefile.write("{o}: {f}\n\t$(CC) $(CFLAGS) -D NONITCNI -c -o {o} {f}\n\n")
ofiles.add(o)
end
- makefile.write("{outname}: {ofiles.join(" ")} {compiler.extern_bodies.join(" ")}\n\t$(CC) -Wl,--warn-unresolved-symbols $(CFLAGS) $(LDFLAGS) $(LDLIBS) -I .nit_compile -I ../clib -o {outname} {ofiles.join(" ")} {compiler.extern_bodies.join(" ")}\n\n")
+ makefile.write("{outname}: {ofiles.join(" ")} {compiler.extern_bodies.join(" ")}\n\t$(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -D NONITCNI -o {outname} {ofiles.join(" ")} {compiler.extern_bodies.join(" ")}\n\n")
makefile.close
self.toolcontext.info("Generated makefile: {makename}", 2)
if tryfile.file_exists then
self.extern_bodies.add(tryfile)
end
- #(new OFStream.open("{file.basename("")}._nitni.h")).close
end
end