make PPC/Linux buildable on ppc64 hosts
[sbcl.git] / src / runtime / os.h
index 7eb58f1..8170a70 100644 (file)
@@ -173,8 +173,26 @@ extern void os_deallocate(os_vm_address_t addr, os_vm_size_t len);
 int os_get_errno(void);
 
 /* Return an absolute path to the runtime executable, or NULL if this
- * information is unavailable.  If a non-null pathname is returned, it
- * must be 'free'd. */
-extern char *os_get_runtime_executable_path();
+ * information is unavailable.  Unless external_path is non-zero the
+ * returned path may only be valid for the current process, ie:
+ * something like /proc/curproc/file.  If a non-null pathname is
+ * returned, it must be 'free'd. */
+extern char *os_get_runtime_executable_path(int external_path);
+
+/* Write platforms specific ones when necessary. This is to get us off
+ * the ground. */
+#if N_WORD_BITS == 32
+# define OS_VM_SIZE_FMT "u"
+# define OS_VM_SIZE_FMTX "x"
+#else
+# define OS_VM_SIZE_FMT "lu"
+# define OS_VM_SIZE_FMTX "lx"
+#endif
+
+/* FIXME: this is not the right place for this, but here we have
+ * a convenient base type to hand. If it turns out we can just use
+ * size_t everywhere, this can more to runtime.h. */
+typedef os_vm_size_t word_t;
+#define WORD_FMTX OS_VM_SIZE_FMTX
 
 #endif