Browse Source

Obsd.Libc: __errno_location -> __errno

Alexander Shiryaev 12 years ago
parent
commit
41a4f07381
4 changed files with 3 additions and 6 deletions
  1. 2 2
      BlackBox/Lin/Mod/Obsd.Libc.txt
  2. 1 0
      BlackBox/build
  3. BIN
      BlackBox/libBB.so
  4. 0 4
      c/openbsd.c

+ 2 - 2
BlackBox/Lin/Mod/Obsd.Libc.txt

@@ -522,8 +522,8 @@ MODULE LinLibc ["libc.so.66.0"];
 	PROCEDURE [ccall] strftime* (s: PtrSTR; max: size_t; format: PtrSTR; ptm: tm): size_t;
 	PROCEDURE [ccall] time* (VAR [nil] t: time_t): time_t;
 
-	(* OpenBSD: wrapper *)
-	PROCEDURE [ccall] __errno_location*(): INTEGER;
+	(* PROCEDURE [ccall] __errno_location*(): INTEGER; *)
+	PROCEDURE [ccall] __errno_location* ["__errno"] (): INTEGER; (* OpenBSD *)
 
 	(* OpenBSD *)
 	PROCEDURE [ccall] mprotect* (addr: PtrVoid; len: size_t; prot: SET): INTEGER;

+ 1 - 0
BlackBox/build

@@ -106,6 +106,7 @@ LindevCompiler.Compile('Cons/Mod', 'Interp.txt')
 LindevCompiler.Compile('', 'Init-Interp.txt')
 
 LindevElfLinker.LinkDll('libBB.so := Kernel+ Files HostFiles StdLoader')
+# LindevElfLinker.LinkDll('libBB.so := Kernel+ Kernel_so_init# Files HostFiles StdLoader')
 DATA
 
 ./run-BlackBox <<DATA

BIN
BlackBox/libBB.so


+ 0 - 4
c/openbsd.c

@@ -23,10 +23,6 @@ int __xstat (int version, const char *path, struct stat *sb)
 	return stat(path, sb); /* XXX */
 }
 
-int * __errno_location () {
-	return __errno();
-}
-
 #undef stdin
 void * stdin = (&__sF[0]);