* src/libelk.c:
+ Test for HAVE_STRUCT_RLIMIT, not HAVE_GETRLIMIT.
* src/loadlib.c:
+ Style fixes.
git-svn-id: svn://svn.zoy.org/elk/trunk@227 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
+11
-9
@@ -38,8 +38,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_GETRLIMIT
|
||||
# include <sys/time.h>
|
||||
#ifdef HAVE_STRUCT_RLIMIT
|
||||
# ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# endif
|
||||
# ifdef HAVE_SYS_RESOURCE_H
|
||||
# include <sys/resource.h>
|
||||
# endif
|
||||
@@ -49,12 +51,12 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef FIND_AOUT
|
||||
# ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
# else
|
||||
# include <sys/file.h>
|
||||
# endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_FILE_H
|
||||
# include <sys/file.h>
|
||||
#endif
|
||||
|
||||
#include "kernel.h"
|
||||
@@ -392,7 +394,7 @@ void Init_Everything () {
|
||||
}
|
||||
|
||||
void Get_Stack_Limit () {
|
||||
#ifdef HAVE_GETRLIMIT
|
||||
#ifdef HAVE_STRUCT_RLIMIT
|
||||
struct rlimit rl;
|
||||
|
||||
if (getrlimit (RLIMIT_STACK, &rl) == -1) {
|
||||
|
||||
+11
-7
@@ -37,12 +37,16 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined (HAVE_MACH_O_DYLD_H)
|
||||
# include <mach-o/dyld.h>
|
||||
#elif defined (WIN32)
|
||||
#if defined (HAVE_DL_DYLD)
|
||||
# if defined (HAVE_MACH_O_DYLD_H)
|
||||
# include <mach-o/dyld.h>
|
||||
# endif
|
||||
#elif defined (HAVE_DL_WINDOWS)
|
||||
# include <windows.h>
|
||||
#elif defined (HAVE_IMAGE_H)
|
||||
# include <image.h>
|
||||
#elif defined (HAVE_DL_BEOS)
|
||||
# if defined (HAVE_IMAGE_H)
|
||||
# include <image.h>
|
||||
# endif
|
||||
#elif defined (HAVE_DL_DLOPEN)
|
||||
# if defined (HAVE_DLFCN_H)
|
||||
# include <dlfcn.h>
|
||||
@@ -96,7 +100,7 @@ void Dlopen_File (char *obj) {
|
||||
|
||||
/* NSUnLinkModule (handle, FALSE); */
|
||||
|
||||
#elif defined (WIN32)
|
||||
#elif defined (HAVE_DL_WINDOWS)
|
||||
void *handle;
|
||||
|
||||
if (Verb_Load)
|
||||
@@ -170,7 +174,7 @@ void Dlopen_File (char *obj) {
|
||||
if (sym)
|
||||
sp->value = (unsigned long int)(intptr_t)NSAddressOfSymbol (sym);
|
||||
|
||||
#elif defined (WIN32)
|
||||
#elif defined (HAVE_DL_WINDOWS)
|
||||
sp->value = (unsigned long int)(intptr_t)GetProcAddress (handle, sp->name);
|
||||
|
||||
#elif defined (HAVE_DL_BEOS)
|
||||
|
||||
Reference in New Issue
Block a user