summaryrefslogtreecommitdiff
path: root/orc/orcprogram-unknown-os.c
diff options
context:
space:
mode:
Diffstat (limited to 'orc/orcprogram-unknown-os.c')
-rw-r--r--orc/orcprogram-unknown-os.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/orc/orcprogram-unknown-os.c b/orc/orcprogram-unknown-os.c
deleted file mode 100644
index 130fc34..0000000
--- a/orc/orcprogram-unknown-os.c
+++ /dev/null
@@ -1,58 +0,0 @@
-
-#include "config.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <unistd.h>
-#include <sys/types.h>
-#if 0
-#include <sys/mman.h>
-#endif
-
-#include <orc/orcprogram.h>
-
-#define SIZE 65536
-
-
-void
-orc_program_allocate_codemem (OrcProgram *program)
-{
-#if 0
- char filename[32] = "/tmp/orcexecXXXXXX";
- int fd;
-
- fd = mkstemp (filename);
- if (fd == -1) {
- /* FIXME oh crap */
- printf("failed to create temp file\n");
- program->error = TRUE;
- return;
- }
- unlink (filename);
-
- ftruncate (fd, SIZE);
-
- program->code = mmap (NULL, SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
- if (program->code == MAP_FAILED) {
- /* FIXME oh crap */
- printf("failed to create write map\n");
- program->error = TRUE;
- return;
- }
- program->code_exec = mmap (NULL, SIZE, PROT_READ|PROT_EXEC, MAP_SHARED, fd, 0);
- if (program->code_exec == MAP_FAILED) {
- /* FIXME oh crap */
- printf("failed to create exec map\n");
- program->error = TRUE;
- return;
- }
-
- close (fd);
-
- program->code_size = SIZE;
- program->codeptr = program->code;
-#endif
-}
-