Some day we're going to want a miniparrot which can build almost anywhere. 
Just out of curiousity, I was wondering how we're doing as far as being 
portable.

So I wrote this script (attached, along with a makefile patch to invoke
it properly).  Here are the results:

Found 1836 symbols defined within the 45 supplied object files.
Found 55 external symbols
Of these, 16 are not defined by ANSI C89:
    close
    creat64
    dlclose
    dlerror
    dlopen
    dlsym
    fopen64
    gettimeofday
    isatty
    lseek64
    mmap64
    open64
    read
    sleep
    stat64
    write

Really not too bad.  Most of those are from unistd.h.

If we can organize the source tree so that platform-dependent stuff is all 
in one place (which is mostly is, but probably not all) I can exclude that
from this list, and we can write dummy versions of those functions for
miniparrot.

Note that this doesn't look at macros, includes, and the like- just 
symbols in the object files.

-- 
Josh Wilmes  ([EMAIL PROTECTED]) | http://www.hitchhiker.org


Index: Makefile.in
===================================================================
RCS file: /home/perlcvs/parrot/Makefile.in,v
retrieving revision 1.130
diff -u -r1.130 Makefile.in
--- Makefile.in	5 Feb 2002 09:20:07 -0000	1.130
+++ Makefile.in	6 Feb 2002 02:38:26 -0000
@@ -149,6 +149,8 @@
 $(TEST_PROG): test_main$(O) $(GEN_HEADERS) $(O_FILES) lib/Parrot/OpLib/core.pm lib/Parrot/PMC.pm
 	$(LD) ${ld_out}$(TEST_PROG) $(LDFLAGS) $(O_FILES) test_main$(O) $(C_LIBS)
 
+lib_deps: $(O_FILES)
+	$(PERL) lib_deps.pl $(O_FILES)
 
 ###############################################################################
 #

Attachment: lib_deps.pl
Description: lib_deps.pl

Reply via email to