Some minor updates; that's all what was left when merging my changes with

Ingo's... (snivel) :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11717 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-03-14 00:53:59 +00:00
parent edc47dd584
commit f4c3d28a1d
3 changed files with 18 additions and 23 deletions
+8 -6
View File
@@ -1,8 +1,10 @@
/* /*
** Copyright 2002, Manuel J. Petit. All rights reserved. * Copyright 2003-2005, Axel Dörfler, [email protected].
** Distributed under the terms of the NewOS License. * Distributed under the terms of the MIT License.
*/ *
* Copyright 2002, Manuel J. Petit. All rights reserved.
* Distributed under the terms of the NewOS License.
*/
#ifndef RUN_TIME_LINKER_H #ifndef RUN_TIME_LINKER_H
#define RUN_TIME_LINKER_H #define RUN_TIME_LINKER_H
@@ -26,8 +28,8 @@ void rldelf_init(struct uspace_program_args const *uspa);
void rldexport_init(struct uspace_program_args *uspa); void rldexport_init(struct uspace_program_args *uspa);
// RLD heap // RLD heap
void rldheap_init(void); void rldheap_init(void);
void *rldalloc(size_t); void *rldalloc(size_t);
void rldfree(void *p); void rldfree(void *p);
#endif /* RUN_TIME_LINKER_H */ #endif /* RUN_TIME_LINKER_H */
+3 -11
View File
@@ -39,7 +39,6 @@
// ToDo: implement better locking strategy // ToDo: implement better locking strategy
// ToDo: implement unload_program() // ToDo: implement unload_program()
// ToDo: implement search paths $LIBRARY_PATH, $ADDON_PATH
// ToDo: implement lazy binding // ToDo: implement lazy binding
#define PAGE_MASK (B_PAGE_SIZE - 1) #define PAGE_MASK (B_PAGE_SIZE - 1)
@@ -209,6 +208,8 @@ rld_lock()
char * char *
getenv(const char *name) getenv(const char *name)
{ {
// ToDo: this should use the real environ pointer once available!
// (or else, any updates to the search paths while the app is running are ignored)
char **environ = gProgramArgs->envp; char **environ = gProgramArgs->envp;
int32 length = strlen(name); int32 length = strlen(name);
int32 i; int32 i;
@@ -1021,7 +1022,6 @@ try_open_container(const char *dir, int dirLen, const char *name, char *path,
memcpy(buffer, dir, dirLen); memcpy(buffer, dir, dirLen);
buffer[dirLen] = '/'; buffer[dirLen] = '/';
strcpy(buffer + dirLen + 1, name); strcpy(buffer + dirLen + 1, name);
} else { } else {
if (nameLen >= pathLen) if (nameLen >= pathLen)
return B_NAME_TOO_LONG; return B_NAME_TOO_LONG;
@@ -1347,16 +1347,8 @@ put_image(image_t *image)
// #pragma mark - // #pragma mark -
// Exported functions (to libroot.so)
/*
* exported functions:
*
* + load_program()
* + load_library()
* + unload_program()
* + unload_library()
* + dynamic_symbol()
*/
image_id image_id
load_program(char const *path, void **_entry) load_program(char const *path, void **_entry)
+7 -6
View File
@@ -1,8 +1,11 @@
/* /*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003-2005, Axel Dörfler, [email protected].
** Copyright 2002, Manuel J. Petit. All rights reserved. * Distributed under the terms of the MIT License.
** Distributed under the terms of the NewOS License. *
*/ * Copyright 2002, Manuel J. Petit. All rights reserved.
* Distributed under the terms of the NewOS License.
*/
#include "rld_priv.h" #include "rld_priv.h"
@@ -13,8 +16,6 @@
static image_id static image_id
export_load_add_on(char const *name, uint32 flags) export_load_add_on(char const *name, uint32 flags)
{ {
// ToDo: use load_add_on() here when it's implemented, or better, unify
// load_library() and load_add_on().
return load_library(name, flags, true); return load_library(name, flags, true);
} }