*
*/
+#if defined(__APPLE__) && defined(__MACH__)
+#include <sys/types.h>
+#include <sys/malloc.h>
+#else
+#include <malloc.h>
+#endif
#include <stdio.h>
#include <string.h>
-#include <alloc.h>
#include "aslink.h"
/*)Module lklibr.c
if (libfil[0] == '/') { libfil++; }
#endif
strcat(str,libfil);
- if(strchr(str,FSEPX) == NULL) {
+ if(strchr(libfil,FSEPX) == NULL) {
sprintf(&str[strlen(str)], "%clib", FSEPX);
}
if ((fp = fopen(str, "r")) != NULL) {
lbnh->libfil = (char *) new (strlen(libfil) + 1);
strcpy(lbnh->libfil,libfil);
lbnh->libspc = str;
- fprintf(stderr,"library file %s\n",str);
} else {
free(str);
}
} else {
strcat(str,relfil);
}
- if(strchr(str,FSEPX) == NULL) {
+ if(strchr(relfil,FSEPX) == NULL) {
sprintf(&str[strlen(str)], "%crel", FSEPX);
}
/*3*/ if ((fp = fopen(str, "r")) != NULL) {