Borland Makefile cleanup
[fw/sdcc] / as / mcs51 / lklibr.c
index 84032719038eda114d6117ca2ee63d8a1e9c0fd6..555adb1756ac9d689f3bfa05fb1bb001439da212 100644 (file)
  *
  */
 
+#if defined(__APPLE__) && defined(__MACH__)
+#include <sys/types.h>
+#include <sys/malloc.h>
+#else
+#include <malloc.h>
+#endif
 #include <stdio.h>
 #include <string.h>
-//#if defined(_MSC_VER)
-//#include <malloc.h>
-//#else
-//#include <alloc.h>
-//#endif
 #include "aslink.h"
 
 /*)Module      lklibr.c
@@ -206,7 +207,6 @@ char *libfil;
                lbnh->libfil = (char *) new (strlen(libfil) + 1);
                strcpy(lbnh->libfil,libfil);
                lbnh->libspc = str;
-               fprintf(stderr,"library file %s\n",str);
        } else {
                free(str);
        }
@@ -460,8 +460,9 @@ char *name;
                        fclose(libfp);                 
                        /* if cdb information required & cdb file present */
                        if (dflag && dfp) {
-                           FILE *xfp = afile(str,"cdb",0);
+                           FILE *xfp = afile(str,"adb",0); //JCF: Nov 30, 2002
                            if (xfp) {
+                               SaveLinkedFilePath(str);
                                copyfile(dfp,xfp);
                                fclose(xfp);
                            }