dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Adding ICalls and Implementing Directory.cs


From: Charles Shuller
Subject: Re: [DotGNU]Adding ICalls and Implementing Directory.cs
Date: Mon, 21 Oct 2002 12:14:32 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020923

As requested, a detailed summary of my troubles :)

I am attempting to implement portions System.IO.Directory. Specifically, Delete and the Get*InDirectory methods, as Delete relies on the Get*InDirectory to recursively delete a directory and all it's contents.

I have been able to test the simplest form of Directory.Delete (i.e. on an empty directory), and the test was successfull; however, after implementing functions, ILOpendir, ILReaddir, ILClosedir, as well as a struct FileInfo, I have been unable to test, or even perform a metadata compile on pnetlib. The controling icall is: ILInt32 _IL_DirMethods_GetFilesInDirectory(ILExecThread *_thread, ILString *path, ILObject **files).

It creates conflicts in int_proto.h, which I can manually edit to remove. It creates the conflicts because it was origionally prototyped to return an array of strings. This greatly reduces it's flexibility, as the entire fammily of Get*InDirectory will be able to use this one function if it passes back a struct, FileInfo. Which consists of the file name, as well as the file type (or some other method of passing back filename and type associated, this just seemed the clearest way to go). File type is currently a series of defines in C, and an enum in CSharp. I changed this from enums on both sides before I realised it had nothing to do with my problems.

I HAVE been able to get a clean compile of pnet, after modifying int_proto.h by hand, and have attempted to test by copying all relavant .cs files into a direcotry. Directory.cs and friends compile with only a warning about multiple entry points (Which I don't understand, as there is only one Main function in the files), however when I run the test, I get a NotImplemented exception.

Regarding metadatacompile on Pnetlib (./configure; make). It works fine till I add my code, then all of a sudden PathInfo is not defined, if I move PathInfo from PathInfo.cs into DirMethods.cs, It still can't find it, but if left in both files, it complains about PathInfo already being defined. If I simply comment out the offending line in Directory.cs, I get: ./System.dll: DLL's cannot have entry points. So I grep -r "Main " *, and get absolutly nothing back, so where the entry points are, boggles my mind.

Thanks!!

--Charles



--
Charles Shuller
Jabber ID: address@hidden
# Patch created by kyeran
# Date: Mon Oct 21 11:53:04 CDT 2002
# Repository: pnet
# Comments:
# Added icalls to add Directory.cs
#### End of Preamble ####

#### Patch data follows ####
Index: aclocal.m4
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/aclocal.m4,v
retrieving revision 1.2
diff -c -r1.2 aclocal.m4
*** aclocal.m4  20 Apr 2002 04:06:02 -0000      1.2
--- aclocal.m4  21 Oct 2002 16:53:12 -0000
***************
*** 1,70 ****
! dnl aclocal.m4 generated automatically by aclocal 1.4
  
! dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
! dnl This file is free software; the Free Software Foundation
! dnl gives unlimited permission to copy and/or distribute it,
! dnl with or without modifications, as long as this notice is preserved.
! 
! dnl This program is distributed in the hope that it will be useful,
! dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
! dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
! dnl PARTICULAR PURPOSE.
! 
! # Do all the work for Automake.  This macro actually does too much --
! # some checks are only needed if your package does certain things.
! # But this isn't really a big deal.
! 
! # serial 1
! 
! dnl Usage:
! dnl AM_INIT_AUTOMAKE(package,version, [no-define])
! 
! AC_DEFUN(AM_INIT_AUTOMAKE,
! [AC_REQUIRE([AC_PROG_INSTALL])
! PACKAGE=[$1]
! AC_SUBST(PACKAGE)
! VERSION=[$2]
! AC_SUBST(VERSION)
! dnl test to see if srcdir already configured
! if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; 
then
    AC_MSG_ERROR([source directory already configured; run "make distclean" 
there first])
  fi
! ifelse([$3],,
! AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
! AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
! AC_REQUIRE([AM_SANITY_CHECK])
! AC_REQUIRE([AC_ARG_PROGRAM])
! dnl FIXME This is truly gross.
! missing_dir=`cd $ac_aux_dir && pwd`
! AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
! AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
! AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
! AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
! AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
! AC_REQUIRE([AC_PROG_MAKE_SET])])
  
  #
  # Check to make sure that the build environment is sane.
  #
  
! AC_DEFUN(AM_SANITY_CHECK,
  [AC_MSG_CHECKING([whether build environment is sane])
  # Just in case
  sleep 1
! echo timestamp > conftestfile
  # Do `set' in a subshell so we don't clobber the current shell's
  # arguments.  Must try -L first in case configure is actually a
  # symlink; some systems play weird games with the mod time of symlinks
  # (eg FreeBSD returns the mod time of the symlink's containing
  # directory).
  if (
!    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
!    if test "[$]*" = "X"; then
        # -L didn't work.
!       set X `ls -t $srcdir/configure conftestfile`
     fi
!    if test "[$]*" != "X $srcdir/configure conftestfile" \
!       && test "[$]*" != "X conftestfile $srcdir/configure"; then
  
        # If neither matched, then we have a broken ls.  This can happen
        # if, for instance, CONFIG_SHELL is bash and it inherits a
--- 1,233 ----
! # aclocal.m4 generated automatically by aclocal 1.6 -*- Autoconf -*-
  
! # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
! # Free Software Foundation, Inc.
! # This file is free software; the Free Software Foundation
! # gives unlimited permission to copy and/or distribute it,
! # with or without modifications, as long as this notice is preserved.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
! # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
! # PARTICULAR PURPOSE.
! 
! # Do all the work for Automake.                            -*- Autoconf -*-
! 
! # This macro actually does too much some checks are only needed if
! # your package does certain things.  But this isn't really a big deal.
! 
! # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
! # Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! # serial 8
! 
! # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
! # written in clear, in which case automake, when reading aclocal.m4,
! # will think it sees a *use*, and therefore will trigger all it's
! # C support machinery.  Also note that it means that autoscan, seeing
! # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
! 
! 
! AC_PREREQ([2.52])
! 
! # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
! # the ones we care about.
! m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
! 
! # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
! # AM_INIT_AUTOMAKE([OPTIONS])
! # -----------------------------------------------
! # The call with PACKAGE and VERSION arguments is the old style
! # call (pre autoconf-2.50), which is being phased out.  PACKAGE
! # and VERSION should now be passed to AC_INIT and removed from
! # the call to AM_INIT_AUTOMAKE.
! # We support both call styles for the transition.  After
! # the next Automake release, Autoconf can make the AC_INIT
! # arguments mandatory, and then we can depend on a new Autoconf
! # release and drop the old call support.
! AC_DEFUN([AM_INIT_AUTOMAKE],
! [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
!  AC_REQUIRE([AC_PROG_INSTALL])dnl
! # test to see if srcdir already configured
! if test "`cd $srcdir && pwd`" != "`pwd`" &&
!    test -f $srcdir/config.status; then
    AC_MSG_ERROR([source directory already configured; run "make distclean" 
there first])
  fi
! 
! # Define the identity of the package.
! dnl Distinguish between old-style and new-style calls.
! m4_ifval([$2],
! [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
!  AC_SUBST([PACKAGE], [$1])dnl
!  AC_SUBST([VERSION], [$2])],
! [_AM_SET_OPTIONS([$1])dnl
!  AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
!  AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
! 
! _AM_IF_OPTION([no-define],,
! [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
!  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
! 
! # Some tools Automake needs.
! AC_REQUIRE([AM_SANITY_CHECK])dnl
! AC_REQUIRE([AC_ARG_PROGRAM])dnl
! AM_MISSING_PROG(ACLOCAL, "aclocal-${am__api_version}")
! AM_MISSING_PROG(AUTOCONF, autoconf)
! AM_MISSING_PROG(AUTOMAKE, "automake-${am__api_version}")
! AM_MISSING_PROG(AUTOHEADER, autoheader)
! AM_MISSING_PROG(MAKEINFO, makeinfo)
! AM_MISSING_PROG(AMTAR, tar)
! AM_PROG_INSTALL_SH
! AM_PROG_INSTALL_STRIP
! # We need awk for the "check" target.  The system "awk" is bad on
! # some platforms.
! AC_REQUIRE([AC_PROG_AWK])dnl
! AC_REQUIRE([AC_PROG_MAKE_SET])dnl
! 
! _AM_IF_OPTION([no-dependencies],,
! [AC_PROVIDE_IFELSE([AC_PROG_][CC],
!                   [_AM_DEPENDENCIES(CC)],
!                   [define([AC_PROG_][CC],
!                           defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
! AC_PROVIDE_IFELSE([AC_PROG_][CXX],
!                   [_AM_DEPENDENCIES(CXX)],
!                   [define([AC_PROG_][CXX],
!                           defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
! ])
! ])
! 
! # Copyright 2002  Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! 
! # AM_AUTOMAKE_VERSION(VERSION)
! # ----------------------------
! # Automake X.Y traces this macro to ensure aclocal.m4 has been
! # generated from the m4 files accompanying Automake X.Y.
! AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
! 
! # AM_SET_CURRENT_AUTOMAKE_VERSION
! # -------------------------------
! # Call AM_AUTOMAKE_VERSION so it can be traced.
! # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
! AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
!        [AM_AUTOMAKE_VERSION([1.6])])
! 
! # Helper functions for option handling.                    -*- Autoconf -*-
! 
! # Copyright 2001, 2002  Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! # serial 2
! 
! # _AM_MANGLE_OPTION(NAME)
! # -----------------------
! AC_DEFUN([_AM_MANGLE_OPTION],
! [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
! 
! # _AM_SET_OPTION(NAME)
! # ------------------------------
! # Set option NAME.  Presently that only means defining a flag for this option.
! AC_DEFUN([_AM_SET_OPTION],
! [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
! 
! # _AM_SET_OPTIONS(OPTIONS)
! # ----------------------------------
! # OPTIONS is a space-separated list of Automake options.
! AC_DEFUN([_AM_SET_OPTIONS],
! [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
! 
! # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
! # -------------------------------------------
! # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
! AC_DEFUN([_AM_IF_OPTION],
! [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  
  #
  # Check to make sure that the build environment is sane.
  #
  
! # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! # serial 3
! 
! # AM_SANITY_CHECK
! # ---------------
! AC_DEFUN([AM_SANITY_CHECK],
  [AC_MSG_CHECKING([whether build environment is sane])
  # Just in case
  sleep 1
! echo timestamp > conftest.file
  # Do `set' in a subshell so we don't clobber the current shell's
  # arguments.  Must try -L first in case configure is actually a
  # symlink; some systems play weird games with the mod time of symlinks
  # (eg FreeBSD returns the mod time of the symlink's containing
  # directory).
  if (
!    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
!    if test "$[*]" = "X"; then
        # -L didn't work.
!       set X `ls -t $srcdir/configure conftest.file`
     fi
!    rm -f conftest.file
!    if test "$[*]" != "X $srcdir/configure conftest.file" \
!       && test "$[*]" != "X conftest.file $srcdir/configure"; then
  
        # If neither matched, then we have a broken ls.  This can happen
        # if, for instance, CONFIG_SHELL is bash and it inherits a
***************
*** 74,80 ****
  alias in your environment])
     fi
  
!    test "[$]2" = conftestfile
     )
  then
     # Ok.
--- 237,243 ----
  alias in your environment])
     fi
  
!    test "$[2]" = conftest.file
     )
  then
     # Ok.
***************
*** 83,136 ****
     AC_MSG_ERROR([newly created file is older than distributed files!
  Check your system clock])
  fi
- rm -f conftest*
  AC_MSG_RESULT(yes)])
  
! dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
! dnl The program must properly implement --version.
! AC_DEFUN(AM_MISSING_PROG,
! [AC_MSG_CHECKING(for working $2)
! # Run test in a subshell; some versions of sh will print an error if
! # an executable is not found, even if stderr is redirected.
! # Redirect stdin to placate older versions of autoconf.  Sigh.
! if ($2 --version) < /dev/null > /dev/null 2>&1; then
!    $1=$2
!    AC_MSG_RESULT(found)
  else
!    $1="$3/missing $2"
!    AC_MSG_RESULT(missing)
  fi
! AC_SUBST($1)])
  
! # Like AC_CONFIG_HEADER, but automatically create stamp file.
  
! AC_DEFUN(AM_CONFIG_HEADER,
! [AC_PREREQ([2.12])
! AC_CONFIG_HEADER([$1])
! dnl When config.status generates a header, we must update the stamp-h file.
! dnl This file resides in the same directory as the config header
! dnl that is generated.  We must strip everything past the first ":",
! dnl and everything past the last "/".
! AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
! ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
! <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, 
<<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
! <<am_indx=1
! for am_file in <<$1>>; do
!   case " <<$>>CONFIG_HEADERS " in
!   *" <<$>>am_file "*<<)>>
!     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 
's%[^/]*$%%'`stamp-h$am_indx
!     ;;
!   esac
!   am_indx=`expr "<<$>>am_indx" + 1`
! done<<>>dnl>>)
! changequote([,]))])
  
  # Add --enable-maintainer-mode option to configure.
  # From Jim Meyering
  
  # serial 1
  
! AC_DEFUN(AM_MAINTAINER_MODE,
  [AC_MSG_CHECKING([whether to enable maintainer-specific portions of 
Makefiles])
    dnl maintainer-mode is disabled by default
    AC_ARG_ENABLE(maintainer-mode,
--- 246,856 ----
     AC_MSG_ERROR([newly created file is older than distributed files!
  Check your system clock])
  fi
  AC_MSG_RESULT(yes)])
  
! #  -*- Autoconf -*-
! 
! 
! # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! # serial 3
! 
! # AM_MISSING_PROG(NAME, PROGRAM)
! # ------------------------------
! AC_DEFUN([AM_MISSING_PROG],
! [AC_REQUIRE([AM_MISSING_HAS_RUN])
! $1=${$1-"${am_missing_run}$2"}
! AC_SUBST($1)])
! 
! 
! # AM_MISSING_HAS_RUN
! # ------------------
! # Define MISSING if not defined so far and test if it supports --run.
! # If it does, set am_missing_run to use it, otherwise, to nothing.
! AC_DEFUN([AM_MISSING_HAS_RUN],
! [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
! test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
! # Use eval to expand $SHELL
! if eval "$MISSING --run true"; then
!   am_missing_run="$MISSING --run "
  else
!   am_missing_run=
!   AC_MSG_WARN([`missing' script is too old or missing])
  fi
! ])
! 
! # AM_AUX_DIR_EXPAND
  
! # Copyright 2001 Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
! # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
! # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
! #
! # Of course, Automake must honor this variable whenever it calls a
! # tool from the auxiliary directory.  The problem is that $srcdir (and
! # therefore $ac_aux_dir as well) can be either absolute or relative,
! # depending on how configure is run.  This is pretty annoying, since
! # it makes $ac_aux_dir quite unusable in subdirectories: in the top
! # source directory, any form will work fine, but in subdirectories a
! # relative path needs to be adjusted first.
! #
! # $ac_aux_dir/missing
! #    fails when called from a subdirectory if $ac_aux_dir is relative
! # $top_srcdir/$ac_aux_dir/missing
! #    fails if $ac_aux_dir is absolute,
! #    fails when called from a subdirectory in a VPATH build with
! #          a relative $ac_aux_dir
! #
! # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
! # are both prefixed by $srcdir.  In an in-source build this is usually
! # harmless because $srcdir is `.', but things will broke when you
! # start a VPATH build or use an absolute $srcdir.
! #
! # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
! # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
! #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
! # and then we would define $MISSING as
! #   MISSING="\${SHELL} $am_aux_dir/missing"
! # This will work as long as MISSING is not called from configure, because
! # unfortunately $(top_srcdir) has no meaning in configure.
! # However there are other variables, like CC, which are often used in
! # configure, and could therefore not use this "fixed" $ac_aux_dir.
! #
! # Another solution, used here, is to always expand $ac_aux_dir to an
! # absolute PATH.  The drawback is that using absolute paths prevent a
! # configured tree to be moved without reconfiguration.
! 
! # Rely on autoconf to set up CDPATH properly.
! AC_PREREQ([2.50])
! 
! AC_DEFUN([AM_AUX_DIR_EXPAND], [
! # expand $ac_aux_dir to an absolute path
! am_aux_dir=`cd $ac_aux_dir && pwd`
! ])
! 
! # AM_PROG_INSTALL_SH
! # ------------------
! # Define $install_sh.
! 
! # Copyright 2001 Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! AC_DEFUN([AM_PROG_INSTALL_SH],
! [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
! install_sh=${install_sh-"$am_aux_dir/install-sh"}
! AC_SUBST(install_sh)])
! 
! # AM_PROG_INSTALL_STRIP
! 
! # Copyright 2001 Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! # One issue with vendor `install' (even GNU) is that you can't
! # specify the program used to strip binaries.  This is especially
! # annoying in cross-compiling environments, where the build's strip
! # is unlikely to handle the host's binaries.
! # Fortunately install-sh will honor a STRIPPROG variable, so we
! # always use install-sh in `make install-strip', and initialize
! # STRIPPROG with the value of the STRIP variable (set by the user).
! AC_DEFUN([AM_PROG_INSTALL_STRIP],
! [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
! # Installed binaries are usually stripped using `strip' when the user
! # run `make install-strip'.  However `strip' might not be the right
! # tool to use in cross-compilation environments, therefore Automake
! # will honor the `STRIP' environment variable to overrule this program.
! dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
! if test "$cross_compiling" != no; then
!   AC_CHECK_TOOL([STRIP], [strip], :)
! fi
! INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
! AC_SUBST([INSTALL_STRIP_PROGRAM])])
! 
! # serial 4                                            -*- Autoconf -*-
! 
! # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! 
! # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
! # written in clear, in which case automake, when reading aclocal.m4,
! # will think it sees a *use*, and therefore will trigger all it's
! # C support machinery.  Also note that it means that autoscan, seeing
! # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
! 
! 
! 
! # _AM_DEPENDENCIES(NAME)
! # ----------------------
! # See how the compiler implements dependency checking.
! # NAME is "CC", "CXX", "GCJ", or "OBJC".
! # We try a few techniques and use that to set a single cache variable.
! #
! # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
! # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
! # dependency, and given that the user is not expected to run this macro,
! # just rely on AC_PROG_CC.
! AC_DEFUN([_AM_DEPENDENCIES],
! [AC_REQUIRE([AM_SET_DEPDIR])dnl
! AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
! AC_REQUIRE([AM_MAKE_INCLUDE])dnl
! AC_REQUIRE([AM_DEP_TRACK])dnl
! 
! ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
!        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
!        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
!        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
!                    [depcc="$$1"   am_compiler_list=])
! 
! AC_CACHE_CHECK([dependency style of $depcc],
!                [am_cv_$1_dependencies_compiler_type],
! [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
!   # We make a subdir and do the tests there.  Otherwise we can end up
!   # making bogus files that we don't know about and never remove.  For
!   # instance it was reported that on HP-UX the gcc test will end up
!   # making a dummy file named `D' -- because `-MD' means `put the output
!   # in D'.
!   mkdir conftest.dir
!   # Copy depcomp to subdir because otherwise we won't find it if we're
!   # using a relative directory.
!   cp "$am_depcomp" conftest.dir
!   cd conftest.dir
! 
!   am_cv_$1_dependencies_compiler_type=none
!   if test "$am_compiler_list" = ""; then
!      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
!   fi
!   for depmode in $am_compiler_list; do
!     # We need to recreate these files for each test, as the compiler may
!     # overwrite some of them when testing with obscure command lines.
!     # This happens at least with the AIX C compiler.
!     echo '#include "conftest.h"' > conftest.c
!     echo 'int i;' > conftest.h
!     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
! 
!     case $depmode in
!     nosideeffect)
!       # after this tag, mechanisms are not by side-effect, so they'll
!       # only be used when explicitly requested
!       if test "x$enable_dependency_tracking" = xyes; then
!       continue
!       else
!       break
!       fi
!       ;;
!     none) break ;;
!     esac
!     # We check with `-c' and `-o' for the sake of the "dashmstdout"
!     # mode.  It turns out that the SunPro C++ compiler does not properly
!     # handle `-M -o', and we need to detect this.
!     if depmode=$depmode \
!        source=conftest.c object=conftest.o \
!        depfile=conftest.Po tmpdepfile=conftest.TPo \
!        $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
!        grep conftest.h conftest.Po > /dev/null 2>&1 &&
!        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
!       am_cv_$1_dependencies_compiler_type=$depmode
!       break
!     fi
!   done
! 
!   cd ..
!   rm -rf conftest.dir
! else
!   am_cv_$1_dependencies_compiler_type=none
! fi
! ])
! AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
! ])
  
! 
! # AM_SET_DEPDIR
! # -------------
! # Choose a directory name for dependency files.
! # This macro is AC_REQUIREd in _AM_DEPENDENCIES
! AC_DEFUN([AM_SET_DEPDIR],
! [rm -f .deps 2>/dev/null
! mkdir .deps 2>/dev/null
! if test -d .deps; then
!   DEPDIR=.deps
! else
!   # MS-DOS does not allow filenames that begin with a dot.
!   DEPDIR=_deps
! fi
! rmdir .deps 2>/dev/null
! AC_SUBST([DEPDIR])
! ])
! 
! 
! # AM_DEP_TRACK
! # ------------
! AC_DEFUN([AM_DEP_TRACK],
! [AC_ARG_ENABLE(dependency-tracking,
! [  --disable-dependency-tracking Speeds up one-time builds
!   --enable-dependency-tracking  Do not reject slow dependency extractors])
! if test "x$enable_dependency_tracking" != xno; then
!   am_depcomp="$ac_aux_dir/depcomp"
!   AMDEPBACKSLASH='\'
! fi
! AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
! AC_SUBST([AMDEPBACKSLASH])
! ])
! 
! # Generate code to set up dependency tracking.   -*- Autoconf -*-
! 
! # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! #serial 2
! 
! # _AM_OUTPUT_DEPENDENCY_COMMANDS
! # ------------------------------
! AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
! [for mf in $CONFIG_FILES; do
!   # Strip MF so we end up with the name of the file.
!   mf=`echo "$mf" | sed -e 's/:.*$//'`
!   if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
!     dirpart=`AS_DIRNAME("$mf")`
!   else
!     continue
!   fi
!   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
!   # Extract the definition of DEP_FILES from the Makefile without
!   # running `make'.
!   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
!   test -z "$DEPDIR" && continue
!   # When using ansi2knr, U may be empty or an underscore; expand it
!   U=`sed -n -e '/^U = / s///p' < "$mf"`
!   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
!   # We invoke sed twice because it is the simplest approach to
!   # changing $(DEPDIR) to its actual value in the expansion.
!   for file in `sed -n -e '
!     /^DEP_FILES = .*\\\\$/ {
!       s/^DEP_FILES = //
!       :loop
!       s/\\\\$//
!       p
!       n
!       /\\\\$/ b loop
!       p
!     }
!     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
!        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
!     # Make sure the directory exists.
!     test -f "$dirpart/$file" && continue
!     fdir=`AS_DIRNAME(["$file"])`
!     AS_MKDIR_P([$dirpart/$fdir])
!     # echo "creating $dirpart/$file"
!     echo '# dummy' > "$dirpart/$file"
!   done
! done
! ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
! 
! 
! # AM_OUTPUT_DEPENDENCY_COMMANDS
! # -----------------------------
! # This macro should only be invoked once -- use via AC_REQUIRE.
! #
! # This code is only required when automatic dependency tracking
! # is enabled.  FIXME.  This creates each `.P' file that we will
! # need in order to bootstrap the dependency handling code.
! AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
! [AC_CONFIG_COMMANDS([depfiles],
!      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
!      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
! ])
! 
! # Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! # serial 2
! 
! # AM_MAKE_INCLUDE()
! # -----------------
! # Check to see how make treats includes.
! AC_DEFUN([AM_MAKE_INCLUDE],
! [am_make=${MAKE-make}
! cat > confinc << 'END'
! doit:
!       @echo done
! END
! # If we don't find an include directive, just comment out the code.
! AC_MSG_CHECKING([for style of include used by $am_make])
! am__include="#"
! am__quote=
! _am_result=none
! # First try GNU make style include.
! echo "include confinc" > confmf
! # We grep out `Entering directory' and `Leaving directory'
! # messages which can occur if `w' ends up in MAKEFLAGS.
! # In particular we don't look at `^make:' because GNU make might
! # be invoked under some other name (usually "gmake"), in which
! # case it prints its new name instead of `make'.
! if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = 
"done"; then
!    am__include=include
!    am__quote=
!    _am_result=GNU
! fi
! # Now try BSD make style include.
! if test "$am__include" = "#"; then
!    echo '.include "confinc"' > confmf
!    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
!       am__include=.include
!       am__quote="\""
!       _am_result=BSD
!    fi
! fi
! AC_SUBST(am__include)
! AC_SUBST(am__quote)
! AC_MSG_RESULT($_am_result)
! rm -f confinc confmf
! ])
! 
! # AM_CONDITIONAL                                              -*- Autoconf -*-
! 
! # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! # serial 5
! 
! AC_PREREQ(2.52)
! 
! # AM_CONDITIONAL(NAME, SHELL-CONDITION)
! # -------------------------------------
! # Define a conditional.
! AC_DEFUN([AM_CONDITIONAL],
! [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
!         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
! AC_SUBST([$1_TRUE])
! AC_SUBST([$1_FALSE])
! if $2; then
!   $1_TRUE=
!   $1_FALSE='#'
! else
!   $1_TRUE='#'
!   $1_FALSE=
! fi
! AC_CONFIG_COMMANDS_PRE(
! [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
!   AC_MSG_ERROR([conditional \"$1\" was never defined.
! Usually this means the macro was only invoked conditionally.])
! fi])])
! 
! # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
! 
! # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
! 
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! AC_PREREQ([2.52])
! 
! # serial 6
! 
! # When config.status generates a header, we must update the stamp-h file.
! # This file resides in the same directory as the config header
! # that is generated.  We must strip everything past the first ":",
! # and everything past the last "/".
! 
! # _AM_DIRNAME(PATH)
! # -----------------
! # Like AS_DIRNAME, only do it during macro expansion
! AC_DEFUN([_AM_DIRNAME],
!        [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
!             m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
!                   m4_if(regexp([$1], [^/.*]), -1,
!                         [.],
!                         patsubst([$1], [^\(/\).*], [\1])),
!                   patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
!             patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
! ])# _AM_DIRNAME
! 
! 
! # The stamp files are numbered to have different names.
! # We could number them on a directory basis, but that's additional
! # complications, let's have a unique counter.
! m4_define([_AM_STAMP_Count], [0])
! 
! 
! # _AM_STAMP(HEADER)
! # -----------------
! # The name of the stamp file for HEADER.
! AC_DEFUN([_AM_STAMP],
! [m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
! AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
!                                [:.*])))/stamp-h[]_AM_STAMP_Count])
! 
! 
! # _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
! # ------------------------------------------------------------
! # We used to try to get a real timestamp in stamp-h.  But the fear is that
! # that will cause unnecessary cvs conflicts.
! AC_DEFUN([_AM_CONFIG_HEADER],
! [# Add the stamp file to the list of files AC keeps track of,
! # along with our hook.
! AC_CONFIG_HEADERS([$1],
!                   [# update the timestamp
! echo 'timestamp for $1' >"_AM_STAMP([$1])"
! $2],
!                   [$3])
! ])# _AM_CONFIG_HEADER
! 
! 
! # AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
! # --------------------------------------------------------------
! AC_DEFUN([AM_CONFIG_HEADER],
! [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
! ])# AM_CONFIG_HEADER
  
  # Add --enable-maintainer-mode option to configure.
  # From Jim Meyering
  
+ # Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
+ 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2, or (at your option)
+ # any later version.
+ 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ # 02111-1307, USA.
+ 
  # serial 1
  
! AC_DEFUN([AM_MAINTAINER_MODE],
  [AC_MSG_CHECKING([whether to enable maintainer-specific portions of 
Makefiles])
    dnl maintainer-mode is disabled by default
    AC_ARG_ENABLE(maintainer-mode,
***************
*** 138,169 ****
                            (and sometimes confusing) to the casual installer],
        USE_MAINTAINER_MODE=$enableval,
        USE_MAINTAINER_MODE=no)
!   AC_MSG_RESULT($USE_MAINTAINER_MODE)
!   AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
    MAINT=$MAINTAINER_MODE_TRUE
    AC_SUBST(MAINT)dnl
  ]
  )
  
- # Define a conditional.
  
! AC_DEFUN(AM_CONDITIONAL,
! [AC_SUBST($1_TRUE)
! AC_SUBST($1_FALSE)
! if $2; then
!   $1_TRUE=
!   $1_FALSE='#'
! else
!   $1_TRUE='#'
!   $1_FALSE=
! fi])
  
! 
! dnl AM_PROG_LEX
! dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
! AC_DEFUN(AM_PROG_LEX,
! [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
! AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
! AC_PROG_LEX
! AC_DECL_YYTEXT])
  
--- 858,900 ----
                            (and sometimes confusing) to the casual installer],
        USE_MAINTAINER_MODE=$enableval,
        USE_MAINTAINER_MODE=no)
!   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
!   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
    MAINT=$MAINTAINER_MODE_TRUE
    AC_SUBST(MAINT)dnl
  ]
  )
  
  
! # Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  
! # This program is free software; you can redistribute it and/or modify
! # it under the terms of the GNU General Public License as published by
! # the Free Software Foundation; either version 2, or (at your option)
! # any later version.
! 
! # This program is distributed in the hope that it will be useful,
! # but WITHOUT ANY WARRANTY; without even the implied warranty of
! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! # GNU General Public License for more details.
! 
! # You should have received a copy of the GNU General Public License
! # along with this program; if not, write to the Free Software
! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
! # 02111-1307, USA.
! 
! # serial 3
! 
! AC_PREREQ(2.50)
! 
! # AM_PROG_LEX
! # -----------
! # Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
! # "missing" invocation, for better error output.
! AC_DEFUN([AM_PROG_LEX],
! [AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
! AC_REQUIRE([AC_PROG_LEX])dnl
! if test "$LEX" = :; then
!   LEX=${am_missing_run}flex
! fi])
  
Index: configure.in
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/configure.in,v
retrieving revision 1.81
diff -c -r1.81 configure.in
*** configure.in        28 Sep 2002 02:13:56 -0000      1.81
--- configure.in        21 Oct 2002 16:53:20 -0000
***************
*** 195,201 ****
  AC_CHECK_HEADERS(sys/time.h sys/types.h regex.h dlfcn.h ieeefp.h)
  AC_CHECK_HEADERS(readline/readline.h readline/history.h wchar.h)
  AC_CHECK_HEADERS(sys/socket.h netinet/in.h langinfo.h locale.h)
! AC_CHECK_HEADERS(sys/select.h netdb.h sys/cygwin.h)
  
  dnl Checks for typedefs, structures, and compiler characteristics.
  AC_C_CONST
--- 195,201 ----
  AC_CHECK_HEADERS(sys/time.h sys/types.h regex.h dlfcn.h ieeefp.h)
  AC_CHECK_HEADERS(readline/readline.h readline/history.h wchar.h)
  AC_CHECK_HEADERS(sys/socket.h netinet/in.h langinfo.h locale.h)
! AC_CHECK_HEADERS(sys/select.h netdb.h sys/cygwin.h dirent.h)
  
  dnl Checks for typedefs, structures, and compiler characteristics.
  AC_C_CONST
***************
*** 278,284 ****
  AC_CHECK_FUNCS(log log10 pow rint sin sinh sqrt tan tanh)
  AC_CHECK_FUNCS(wctomb wcrtomb mbtowc mbrtowc nl_langinfo setlocale)
  AC_CHECK_FUNCS(usleep gethostbyname gethostbyaddr)
! AC_CHECK_FUNCS(cygwin_conv_to_win32_path)
  AC_FUNC_ALLOCA
  
  dnl Add the thread libraries to the end of the link line.
--- 278,284 ----
  AC_CHECK_FUNCS(log log10 pow rint sin sinh sqrt tan tanh)
  AC_CHECK_FUNCS(wctomb wcrtomb mbtowc mbrtowc nl_langinfo setlocale)
  AC_CHECK_FUNCS(usleep gethostbyname gethostbyaddr)
! AC_CHECK_FUNCS(cygwin_conv_to_win32_path opendir readdir readdir_r closedir)
  AC_FUNC_ALLOCA
  
  dnl Add the thread libraries to the end of the link line.
Index: csunit/Makefile.in
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/csunit/Makefile.in,v
retrieving revision 1.1
diff -c -r1.1 Makefile.in
*** csunit/Makefile.in  22 Jul 2002 11:44:51 -0000      1.1
--- csunit/Makefile.in  21 Oct 2002 16:53:26 -0000
***************
*** 1,6 ****
! # Makefile.in generated automatically by automake 1.4 from Makefile.am
  
! # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
--- 1,8 ----
! # Makefile.in generated by automake 1.6 from Makefile.am.
! # @configure_input@
  
! # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
! # Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
***************
*** 10,16 ****
  # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  # PARTICULAR PURPOSE.
  
! 
  SHELL = @SHELL@
  
  srcdir = @srcdir@
--- 12,18 ----
  # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  # PARTICULAR PURPOSE.
  
! @SET_MAKE@
  SHELL = @SHELL@
  
  srcdir = @srcdir@
***************
*** 31,43 ****
  mandir = @mandir@
  includedir = @includedir@
  oldincludedir = /usr/include
- 
- DESTDIR =
- 
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- 
  top_builddir = ..
  
  ACLOCAL = @ACLOCAL@
--- 33,41 ----
***************
*** 45,56 ****
  AUTOMAKE = @AUTOMAKE@
  AUTOHEADER = @AUTOHEADER@
  
  INSTALL = @INSTALL@
! INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  transform = @program_transform_name@
- 
  NORMAL_INSTALL = :
  PRE_INSTALL = :
  POST_INSTALL = :
--- 43,57 ----
  AUTOMAKE = @AUTOMAKE@
  AUTOHEADER = @AUTOHEADER@
  
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  INSTALL = @INSTALL@
! INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_DATA = @INSTALL_DATA@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_HEADER = $(INSTALL_DATA)
  transform = @program_transform_name@
  NORMAL_INSTALL = :
  PRE_INSTALL = :
  POST_INSTALL = :
***************
*** 63,210 ****
  host_triplet = @host@
  target_alias = @target_alias@
  target_triplet = @target@
  AWK = @AWK@
  CC = @CC@
! EXEEXT = @EXEEXT@
  FFILIBS = @FFILIBS@
  GCLIBS = @GCLIBS@
  LEX = @LEX@
  LN_S = @LN_S@
  MAINT = @MAINT@
- MAKEINFO = @MAKEINFO@
  NO_GCSE = @NO_GCSE@
- OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PROFILE_NAME = @PROFILE_NAME@
  RANLIB = @RANLIB@
  READLINELIBS = @READLINELIBS@
  REGEXLIBS = @REGEXLIBS@
  TREECC = @TREECC@
  VERSION = @VERSION@
  YACC = @YACC@
  
  noinst_DATA = cstest.dll csunit.exe
  
! cstest_CSSRC = $(srcdir)/Test.cs                     $(srcdir)/TestArray.cs   
               $(srcdir)/TestAssertFailed.cs                   
$(srcdir)/TestCase.cs                   $(srcdir)/TestException.cs              
        $(srcdir)/TestFailure.cs                        $(srcdir)/TestResult.cs 
                $(srcdir)/TestStop.cs                   $(srcdir)/TestSuite.cs  
                $(srcdir)/TestWriterResult.cs
  
  
! csunit_CSSRC = $(srcdir)/TestMain.cs                     TestVersion.cs
  
  
  CSCC = ../cscc/cscc
! CSFLAGS = -g -O2 -funsafe -filasm-path=../ilasm/ilasm                        
-fplugin-cs-path=../cscc/cscc-cs -L$(top_srcdir)/samples
  
  
  CLEANFILES = cstest.dll csunit.exe
  DISTCLEANFILES = TestVersion.cs
  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
! CONFIG_HEADER = ../include/il_config.h
! CONFIG_CLEAN_FILES =  TestVersion.cs
! DATA =  $(noinst_DATA)
! 
! DIST_COMMON =  README Makefile.am Makefile.in TestVersion.cs.in
! 
  
! DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  
- TAR = gtar
- GZIP_ENV = --best
- all: all-redirect
  .SUFFIXES:
! $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am 
$(top_srcdir)/configure.in $(ACLOCAL_M4) 
!       cd $(top_srcdir) && $(AUTOMAKE) --gnu csunit/Makefile
! 
! Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status 
$(BUILT_SOURCES)
!       cd $(top_builddir) \
!         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
! 
  TestVersion.cs: $(top_builddir)/config.status TestVersion.cs.in
!       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= 
$(SHELL) ./config.status
  tags: TAGS
  TAGS:
  
  
! distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
! 
! subdir = csunit
  
  distdir: $(DISTFILES)
-       here=`cd $(top_builddir) && pwd`; \
-       top_distdir=`cd $(top_distdir) && pwd`; \
-       distdir=`cd $(distdir) && pwd`; \
-       cd $(top_srcdir) \
-         && $(AUTOMAKE) --include-deps --build-dir=$$here 
--srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu csunit/Makefile
        @for file in $(DISTFILES); do \
!         d=$(srcdir); \
          if test -d $$d/$$file; then \
!           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
!           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
!           || cp -p $$d/$$file $(distdir)/$$file || :; \
          fi; \
        done
- info-am:
- info: info-am
- dvi-am:
- dvi: dvi-am
  check-am: all-am
  check: check-am
! installcheck-am:
! installcheck: installcheck-am
! install-exec-am: install-exec-local
! install-exec: install-exec-am
  
! install-data-am:
! install-data: install-data-am
  
- install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  install: install-am
! uninstall-am: uninstall-local
  uninstall: uninstall-am
- all-am: Makefile $(DATA)
- all-redirect: all-am
- install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
- installdirs:
  
  
  mostlyclean-generic:
  
  clean-generic:
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
  
  distclean-generic:
!       -rm -f Makefile $(CONFIG_CLEAN_FILES)
!       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
        -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
  
  maintainer-clean-generic:
! mostlyclean-am:  mostlyclean-generic
  
! mostlyclean: mostlyclean-am
  
! clean-am:  clean-generic mostlyclean-am
  
! clean: clean-am
  
! distclean-am:  distclean-generic clean-am
  
! distclean: distclean-am
  
! maintainer-clean-am:  maintainer-clean-generic distclean-am
!       @echo "This command is intended for maintainers to use;"
!       @echo "it deletes files that may require special tools to rebuild."
  
  maintainer-clean: maintainer-clean-am
  
! .PHONY: tags distdir info-am info dvi-am dvi check check-am \
! installcheck-am installcheck install-exec-local install-exec-am \
! install-exec install-data-am install-data install-am install \
! uninstall-local uninstall-am uninstall all-redirect all-am all \
! installdirs mostlyclean-generic distclean-generic clean-generic \
! maintainer-clean-generic clean mostlyclean distclean maintainer-clean
  
  
  cstest.dll: $(cstest_CSSRC)
--- 64,248 ----
  host_triplet = @host@
  target_alias = @target_alias@
  target_triplet = @target@
+ 
+ EXEEXT = @EXEEXT@
+ OBJEXT = @OBJEXT@
+ PATH_SEPARATOR = @PATH_SEPARATOR@
+ AMTAR = @AMTAR@
  AWK = @AWK@
  CC = @CC@
! DEPDIR = @DEPDIR@
  FFILIBS = @FFILIBS@
  GCLIBS = @GCLIBS@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  LN_S = @LN_S@
  MAINT = @MAINT@
  NO_GCSE = @NO_GCSE@
  PACKAGE = @PACKAGE@
  PROFILE_NAME = @PROFILE_NAME@
  RANLIB = @RANLIB@
  READLINELIBS = @READLINELIBS@
  REGEXLIBS = @REGEXLIBS@
+ STRIP = @STRIP@
  TREECC = @TREECC@
  VERSION = @VERSION@
  YACC = @YACC@
+ am__include = @am__include@
+ am__quote = @am__quote@
+ install_sh = @install_sh@
  
  noinst_DATA = cstest.dll csunit.exe
  
! cstest_CSSRC = $(srcdir)/Test.cs \
!                      $(srcdir)/TestArray.cs \
!                      $(srcdir)/TestAssertFailed.cs \
!                      $(srcdir)/TestCase.cs \
!                      $(srcdir)/TestException.cs \
!                      $(srcdir)/TestFailure.cs \
!                      $(srcdir)/TestResult.cs \
!                      $(srcdir)/TestStop.cs \
!                      $(srcdir)/TestSuite.cs \
!                      $(srcdir)/TestWriterResult.cs
  
  
! csunit_CSSRC = $(srcdir)/TestMain.cs \
!                          TestVersion.cs
  
  
  CSCC = ../cscc/cscc
! CSFLAGS = -g -O2 -funsafe -filasm-path=../ilasm/ilasm \
!                      -fplugin-cs-path=../cscc/cscc-cs -L$(top_srcdir)/samples
  
  
  CLEANFILES = cstest.dll csunit.exe
  DISTCLEANFILES = TestVersion.cs
+ subdir = csunit
  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
! CONFIG_HEADER = $(top_builddir)/include/il_config.h
! CONFIG_CLEAN_FILES = TestVersion.cs
! depcomp =
! am__depfiles_maybe =
! DIST_SOURCES =
! DATA = $(noinst_DATA)
  
! DIST_COMMON = README Makefile.am Makefile.in TestVersion.cs.in
! all: all-am
  
  .SUFFIXES:
! $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  
$(top_srcdir)/configure.in $(ACLOCAL_M4)
!       cd $(top_srcdir) && \
!         $(AUTOMAKE) --gnu  --ignore-deps csunit/Makefile
! Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  
$(top_builddir)/config.status
!       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)
  TestVersion.cs: $(top_builddir)/config.status TestVersion.cs.in
!       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
! uninstall-info-am:
  tags: TAGS
  TAGS:
  
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  
! top_distdir = ..
! distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
  
  distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
!         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
!         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
!         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
!           dir="/$$dir"; \
!           $(mkinstalldirs) "$(distdir)$$dir"; \
!         else \
!           dir=''; \
!         fi; \
          if test -d $$d/$$file; then \
!           cp -pR $$d/$$file $(distdir)$$dir \
!           || exit 1; \
          else \
            test -f $(distdir)/$$file \
!           || cp -p $$d/$$file $(distdir)/$$file \
!           || exit 1; \
          fi; \
        done
  check-am: all-am
  check: check-am
! all-am: Makefile $(DATA)
  
! installdirs:
  
  install: install-am
! install-exec: install-exec-am
! install-data: install-data-am
  uninstall: uninstall-am
  
+ install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  
+ installcheck: installcheck-am
+ install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  mostlyclean-generic:
  
  clean-generic:
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
  
  distclean-generic:
!       -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
        -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
  
  maintainer-clean-generic:
!       @echo "This command is intended for maintainers to use"
!       @echo "it deletes files that may require special tools to rebuild."
! clean: clean-am
  
! clean-am: clean-generic mostlyclean-am
  
! distclean: distclean-am
  
! distclean-am: clean-am distclean-generic
  
! dvi: dvi-am
  
! dvi-am:
  
! info: info-am
! 
! info-am:
! 
! install-data-am:
! 
! install-exec-am: install-exec-local
! 
! install-info: install-info-am
! 
! install-man:
! 
! installcheck-am:
  
  maintainer-clean: maintainer-clean-am
  
! maintainer-clean-am: distclean-am maintainer-clean-generic
! 
! mostlyclean: mostlyclean-am
! 
! mostlyclean-am: mostlyclean-generic
! 
! uninstall-am: uninstall-info-am uninstall-local
! 
! .PHONY: all all-am check check-am clean clean-generic distclean \
!       distclean-generic distdir dvi dvi-am info info-am install \
!       install-am install-data install-data-am install-exec \
!       install-exec-am install-exec-local install-info install-info-am \
!       install-man install-strip installcheck installcheck-am \
!       installdirs maintainer-clean maintainer-clean-generic \
!       mostlyclean mostlyclean-generic uninstall uninstall-am \
!       uninstall-info-am uninstall-local
  
  
  cstest.dll: $(cstest_CSSRC)
***************
*** 226,232 ****
        rm -f $(DESTDIR)$(libdir)/cscc/lib/cstest.dll
        rm -f $(DESTDIR)$(bindir)/csunit.exe
        rm -f $(DESTDIR)$(bindir)/csunit
- 
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
  # Otherwise a system limit (for SysV at least) may be exceeded.
  .NOEXPORT:
--- 264,269 ----
Index: engine/int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.25
diff -c -r1.25 int_proto.h
*** engine/int_proto.h  14 Sep 2002 15:29:17 -0000      1.25
--- engine/int_proto.h  21 Oct 2002 16:53:31 -0000
***************
*** 471,485 ****
  extern ILInt32 _IL_TimeMethods_GetTimeZoneAdjust(ILExecThread * _thread);
  extern ILInt32 _IL_TimeMethods_GetUpTime(ILExecThread * _thread);
  
  extern ILInt64 _IL_IPAddress_HostToNetworkOrder_l(ILExecThread * _thread, 
ILInt64 host);
  extern ILInt32 _IL_IPAddress_HostToNetworkOrder_i(ILExecThread * _thread, 
ILInt32 host);
  extern ILInt16 _IL_IPAddress_HostToNetworkOrder_s(ILExecThread * _thread, 
ILInt16 host);
  extern ILInt64 _IL_IPAddress_NetworkToHostOrder_l(ILExecThread * _thread, 
ILInt64 network);
  extern ILInt32 _IL_IPAddress_NetworkToHostOrder_i(ILExecThread * _thread, 
ILInt32 network);
  extern ILInt16 _IL_IPAddress_NetworkToHostOrder_s(ILExecThread * _thread, 
ILInt16 network);
- 
- extern ILBool _IL_Dns_InternalGetHostByName(ILExecThread * _thread, ILString 
* host, ILString * * h_name, System_Array * * h_aliases, System_Array * * 
h_addr_list);
- extern ILBool _IL_Dns_InternalGetHostByAddr(ILExecThread * _thread, ILInt64 
address, ILString * * h_name, System_Array * * h_aliases, System_Array * * 
h_addr_list);
- 
- extern ILUInt8 * _IL_CodeTable_GetAddress(ILExecThread * _thread, ILObject * 
stream, ILInt64 position);
  
--- 471,483 ----
  extern ILInt32 _IL_TimeMethods_GetTimeZoneAdjust(ILExecThread * _thread);
  extern ILInt32 _IL_TimeMethods_GetUpTime(ILExecThread * _thread);
  
+ extern ILBool _IL_Dns_InternalGetHostByName(ILExecThread * _thread, ILString 
* host, ILString * * h_name, System_Array * * h_aliases, System_Array * * 
h_addr_list);
+ extern ILBool _IL_Dns_InternalGetHostByAddr(ILExecThread * _thread, ILInt64 
address, ILString * * h_name, System_Array * * h_aliases, System_Array * * 
h_addr_list);
+ 
  extern ILInt64 _IL_IPAddress_HostToNetworkOrder_l(ILExecThread * _thread, 
ILInt64 host);
  extern ILInt32 _IL_IPAddress_HostToNetworkOrder_i(ILExecThread * _thread, 
ILInt32 host);
  extern ILInt16 _IL_IPAddress_HostToNetworkOrder_s(ILExecThread * _thread, 
ILInt16 host);
  extern ILInt64 _IL_IPAddress_NetworkToHostOrder_l(ILExecThread * _thread, 
ILInt64 network);
  extern ILInt32 _IL_IPAddress_NetworkToHostOrder_i(ILExecThread * _thread, 
ILInt32 network);
  extern ILInt16 _IL_IPAddress_NetworkToHostOrder_s(ILExecThread * _thread, 
ILInt16 network);
  
Index: engine/int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.27
diff -c -r1.27 int_table.c
*** engine/int_table.c  14 Sep 2002 15:29:17 -0000      1.27
--- engine/int_table.c  21 Oct 2002 16:53:39 -0000
***************
*** 2246,2311 ****
  
  #if !defined(HAVE_LIBFFI)
  
! static void marshal_lpl(void (*fn)(), void *rvalue, void **avalue)
  {
!       *((ILInt64 *)rvalue) = (*(ILInt64 (*)(void *, ILInt64))fn)(*((void * 
*)(avalue[0])), *((ILInt64 *)(avalue[1])));
  }
  
  #endif
  
  #if !defined(HAVE_LIBFFI)
  
! static void marshal_sps(void (*fn)(), void *rvalue, void **avalue)
  {
!       *((ILNativeInt *)rvalue) = (*(ILInt16 (*)(void *, ILInt16))fn)(*((void 
* *)(avalue[0])), *((ILInt16 *)(avalue[1])));
  }
  
  #endif
  
! #ifndef _IL_IPAddress_suppressed
  
! IL_METHOD_BEGIN(IPAddress_Methods)
!       IL_METHOD("HostToNetworkOrder", "(l)l", 
_IL_IPAddress_HostToNetworkOrder_l, marshal_lpl)
!       IL_METHOD("HostToNetworkOrder", "(i)i", 
_IL_IPAddress_HostToNetworkOrder_i, marshal_ipi)
!       IL_METHOD("HostToNetworkOrder", "(s)s", 
_IL_IPAddress_HostToNetworkOrder_s, marshal_sps)
!       IL_METHOD("NetworkToHostOrder", "(l)l", 
_IL_IPAddress_NetworkToHostOrder_l, marshal_lpl)
!       IL_METHOD("NetworkToHostOrder", "(i)i", 
_IL_IPAddress_NetworkToHostOrder_i, marshal_ipi)
!       IL_METHOD("NetworkToHostOrder", "(s)s", 
_IL_IPAddress_NetworkToHostOrder_s, marshal_sps)
  IL_METHOD_END
  
  #endif
  
  #if !defined(HAVE_LIBFFI)
  
! static void marshal_bppppp(void (*fn)(), void *rvalue, void **avalue)
  {
!       *((ILNativeInt *)rvalue) = (*(ILInt8 (*)(void *, void *, void *, void 
*, void *))fn)(*((void * *)(avalue[0])), *((void * *)(avalue[1])), *((void * 
*)(avalue[2])), *((void * *)(avalue[3])), *((void * *)(avalue[4])));
  }
  
  #endif
  
  #if !defined(HAVE_LIBFFI)
  
! static void marshal_bplppp(void (*fn)(), void *rvalue, void **avalue)
  {
!       *((ILNativeInt *)rvalue) = (*(ILInt8 (*)(void *, ILInt64, void *, void 
*, void *))fn)(*((void * *)(avalue[0])), *((ILInt64 *)(avalue[1])), *((void * 
*)(avalue[2])), *((void * *)(avalue[3])), *((void * *)(avalue[4])));
  }
  
  #endif
  
! #ifndef _IL_Dns_suppressed
! 
! IL_METHOD_BEGIN(Dns_Methods)
!       IL_METHOD("InternalGetHostByName", 
"(oSystem.String;&oSystem.String;&[oSystem.String;&[l)Z", 
_IL_Dns_InternalGetHostByName, marshal_bppppp)
!       IL_METHOD("InternalGetHostByAddr", 
"(l&oSystem.String;&[oSystem.String;&[l)Z", _IL_Dns_InternalGetHostByAddr, 
marshal_bplppp)
! IL_METHOD_END
! 
! #endif
! 
! #ifndef _IL_CodeTable_suppressed
  
! IL_METHOD_BEGIN(CodeTable_Methods)
!       IL_METHOD("GetAddress", "(oSystem.IO.Stream;l)*B", 
_IL_CodeTable_GetAddress, marshal_pppl)
  IL_METHOD_END
  
  #endif
--- 2246,2303 ----
  
  #if !defined(HAVE_LIBFFI)
  
! static void marshal_bppppp(void (*fn)(), void *rvalue, void **avalue)
  {
!       *((ILNativeInt *)rvalue) = (*(ILInt8 (*)(void *, void *, void *, void 
*, void *))fn)(*((void * *)(avalue[0])), *((void * *)(avalue[1])), *((void * 
*)(avalue[2])), *((void * *)(avalue[3])), *((void * *)(avalue[4])));
  }
  
  #endif
  
  #if !defined(HAVE_LIBFFI)
  
! static void marshal_bplppp(void (*fn)(), void *rvalue, void **avalue)
  {
!       *((ILNativeInt *)rvalue) = (*(ILInt8 (*)(void *, ILInt64, void *, void 
*, void *))fn)(*((void * *)(avalue[0])), *((ILInt64 *)(avalue[1])), *((void * 
*)(avalue[2])), *((void * *)(avalue[3])), *((void * *)(avalue[4])));
  }
  
  #endif
  
! #ifndef _IL_Dns_suppressed
  
! IL_METHOD_BEGIN(Dns_Methods)
!       IL_METHOD("InternalGetHostByName", 
"(oSystem.String;&oSystem.String;&[oSystem.String;&[l)Z", 
_IL_Dns_InternalGetHostByName, marshal_bppppp)
!       IL_METHOD("InternalGetHostByAddr", 
"(l&oSystem.String;&[oSystem.String;&[l)Z", _IL_Dns_InternalGetHostByAddr, 
marshal_bplppp)
  IL_METHOD_END
  
  #endif
  
  #if !defined(HAVE_LIBFFI)
  
! static void marshal_lpl(void (*fn)(), void *rvalue, void **avalue)
  {
!       *((ILInt64 *)rvalue) = (*(ILInt64 (*)(void *, ILInt64))fn)(*((void * 
*)(avalue[0])), *((ILInt64 *)(avalue[1])));
  }
  
  #endif
  
  #if !defined(HAVE_LIBFFI)
  
! static void marshal_sps(void (*fn)(), void *rvalue, void **avalue)
  {
!       *((ILNativeInt *)rvalue) = (*(ILInt16 (*)(void *, ILInt16))fn)(*((void 
* *)(avalue[0])), *((ILInt16 *)(avalue[1])));
  }
  
  #endif
  
! #ifndef _IL_IPAddress_suppressed
  
! IL_METHOD_BEGIN(IPAddress_Methods)
!       IL_METHOD("HostToNetworkOrder", "(l)l", 
_IL_IPAddress_HostToNetworkOrder_l, marshal_lpl)
!       IL_METHOD("HostToNetworkOrder", "(i)i", 
_IL_IPAddress_HostToNetworkOrder_i, marshal_ipi)
!       IL_METHOD("HostToNetworkOrder", "(s)s", 
_IL_IPAddress_HostToNetworkOrder_s, marshal_sps)
!       IL_METHOD("NetworkToHostOrder", "(l)l", 
_IL_IPAddress_NetworkToHostOrder_l, marshal_lpl)
!       IL_METHOD("NetworkToHostOrder", "(i)i", 
_IL_IPAddress_NetworkToHostOrder_i, marshal_ipi)
!       IL_METHOD("NetworkToHostOrder", "(s)s", 
_IL_IPAddress_NetworkToHostOrder_s, marshal_sps)
  IL_METHOD_END
  
  #endif
***************
*** 2365,2373 ****
  #endif
  #ifndef _IL_CodeAccessPermission_suppressed
        {"CodeAccessPermission", "System.Security", 
CodeAccessPermission_Methods},
- #endif
- #ifndef _IL_CodeTable_suppressed
-       {"CodeTable", "I18N.CJK", CodeTable_Methods},
  #endif
  #ifndef _IL_CryptoMethods_suppressed
        {"CryptoMethods", "Platform", CryptoMethods_Methods},
--- 2357,2362 ----
Index: engine/lib_dir.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_dir.c,v
retrieving revision 1.1
diff -c -r1.1 lib_dir.c
*** engine/lib_dir.c    14 Jun 2002 05:16:44 -0000      1.1
--- engine/lib_dir.c    21 Oct 2002 16:53:46 -0000
***************
*** 22,27 ****
--- 22,28 ----
  #include "lib_defs.h"
  #include "il_utils.h"
  #include "il_errno.h"
+ #include "il_sysio.h"
  
  #ifdef        __cplusplus
  extern        "C" {
***************
*** 40,45 ****
--- 41,50 ----
  
  } Platform_PathInfo;
  
+ 
+ 
+ 
+ 
  /*
   * public static PathInfo GetPathInfo();
   */
***************
*** 151,165 ****
  }
  
  /*
!  * public static Errno GetFilesInDirectory(String path, out String files);
   */
! ILInt32 _IL_DirMethods_GetFilesInDirectory(ILExecThread *_thread,
!                                                                               
   ILString *path,
!                                                                               
   ILString **files)
  {
!       /* TODO */
!       return IL_ERRNO_EPERM;
  }
  
  #ifdef        __cplusplus
  };
--- 156,199 ----
  }
  
  /*
!  * public static Errno GetFilesInDirectory(String path, out 
Platform.FileInfo[] files);
   */
! 
! ILInt32 _IL_DirMethods_GetFilesInDirectory(ILExecThread *_thread,  ILString 
*path, ILObject **files)
  {
!   ILDir *dirstream;
!   Platform_FileInfo *fileInfo_ptr;
!   const ILInt32 array_size = 512;
!   Platform_FileInfo **array_ptr_ptr;
!   ILInt32 i;  /*  How surprising, an index var named 'i', used in the for() 
loop  */
! 
!   *files = (Platform_FileInfo*) 
ILExecThreadNew(_thread,"[oPlatform.FileInfo;","(Ti)V",
!       (ILVaInt)array_size);
! 
!   (ILObject **)array_ptr_ptr = ArrayToBuffer(*files);
! 
! 
!   dirstream = ILOpenDir(_thread, ILStringToAnsi(_thread, path));
! 
!   for(i= 0; i < array_size; i++, array_ptr_ptr++)
!     {
!       if((fileInfo_ptr = ILReadDir(_thread, dirstream)) == NULL)
!       {
!         break;
!       }
!       else
!       {
!         (*array_ptr_ptr)->fileName = fileInfo_ptr->fileName;
!         (*array_ptr_ptr)->fileType = fileInfo_ptr->fileType;
!         free(fileInfo_ptr);
!       }
!     }
! 
!   ILCloseDir(_thread, dirstream);
! 
!   return 0;
  }
+ 
  
  #ifdef        __cplusplus
  };
Index: include/il_sysio.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/include/il_sysio.h,v
retrieving revision 1.4
diff -c -r1.4 il_sysio.h
*** include/il_sysio.h  14 Sep 2002 15:29:17 -0000      1.4
--- include/il_sysio.h  21 Oct 2002 16:53:55 -0000
***************
*** 22,27 ****
--- 22,35 ----
  #define       _IL_SYSIO_H
  
  #include "il_system.h"
+ #include "il_sysio.h"
+ #include "il_engine.h"
+ #include "../confdefs.h"
+ 
+ #ifdef HAVE_DIRENT_H
+ #include <dirent.h>
+ #endif
+ 
  
  #ifdef        __cplusplus
  extern        "C" {
***************
*** 240,245 ****
--- 248,279 ----
  /* dns.c */
  struct hostent* ILGetHostByName(const char *name);
  struct hostent* ILGetHostByAddr(const void *addr, unsigned int len, int type);
+ 
+ 
+   /* dir.c  */
+ 
+ #define ILFT_REG_FILE 0
+ #define ILFT_DIRECTORY 0
+ #define ILFT_FIFO_SPEC 0
+ #define ILFT_SOCKET 0
+ #define ILFT_CHAR_SPEC 0
+ #define ILFT_BLOCK_SPEC 0
+ #define ILFT_UNKNOWN 0
+ 
+ typedef struct
+ {
+   ILString *fileName;
+   ILInt32 fileType;
+ } Platform_FileInfo;
+ 
+ #ifdef HAVE_DIRENT_H
+ typedef DIR ILDir;
+ #endif
+ 
+ 
+ #ifdef HAVE_DIRENT_H
+ typedef struct dirent ILDirEnt;
+ #endif
  
  #ifdef        __cplusplus 
  };
Index: support/Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/support/Makefile.am,v
retrieving revision 1.35
diff -c -r1.35 Makefile.am
*** support/Makefile.am 14 Sep 2002 15:29:17 -0000      1.35
--- support/Makefile.am 21 Oct 2002 16:54:04 -0000
***************
*** 11,16 ****
--- 11,17 ----
                                                 decimal.c \
                                                 def_gc.c \
                                                 des.c \
+                                                dir.c \
                                                 dns.c \
                                                 dynlib.c \
                                                 errno_map.c \
Index: confdefs.h
===================================================================
*** /dev/null   Wed Dec 31 18:00:00 1969
--- confdefs.h  Sat Oct 19 18:01:11 2002
***************
*** 0 ****
--- 1,129 ----
+ 
+ #define PACKAGE_NAME ""
+ #define PACKAGE_TARNAME ""
+ #define PACKAGE_VERSION ""
+ #define PACKAGE_STRING ""
+ #define PACKAGE_BUGREPORT ""
+ #define PACKAGE "pnet"
+ #define VERSION "0.4.5"
+ #define YYTEXT_POINTER 1
+ #define HAVE_LIBM 1
+ #define HAVE_LIBDL 1
+ #define HAVE_LIBNSL 1
+ #define STDC_HEADERS 1
+ #define HAVE_SYS_WAIT_H 1
+ #define TIME_WITH_SYS_TIME 1
+ #define HAVE_SYS_TYPES_H 1
+ #define HAVE_SYS_STAT_H 1
+ #define HAVE_STDLIB_H 1
+ #define HAVE_STRING_H 1
+ #define HAVE_MEMORY_H 1
+ #define HAVE_STRINGS_H 1
+ #define HAVE_INTTYPES_H 1
+ #define HAVE_STDINT_H 1
+ #define HAVE_UNISTD_H 1
+ #define HAVE_STRING_H 1
+ #define HAVE_STRINGS_H 1
+ #define HAVE_MEMORY_H 1
+ #define HAVE_STDLIB_H 1
+ #define HAVE_MATH_H 1
+ #define HAVE_FCNTL_H 1
+ #define HAVE_STDARG_H 1
+ #define HAVE_VARARGS_H 1
+ #define HAVE_SYS_MMAN_H 1
+ #define HAVE_UNISTD_H 1
+ #define HAVE_SYS_STAT_H 1
+ #define HAVE_SYS_TIME_H 1
+ #define HAVE_SYS_TYPES_H 1
+ #define HAVE_REGEX_H 1
+ #define HAVE_DLFCN_H 1
+ #define HAVE_WCHAR_H 1
+ #define HAVE_SYS_SOCKET_H 1
+ #define HAVE_NETINET_IN_H 1
+ #define HAVE_LANGINFO_H 1
+ #define HAVE_LOCALE_H 1
+ #define HAVE_SYS_SELECT_H 1
+ #define HAVE_NETDB_H 1
+ #define HAVE_DIRENT_H 1
+ #define SIZEOF_INT 4
+ #define SIZEOF_LONG 4
+ #define SIZEOF_LONG_LONG 8
+ #define SIZEOF_FLOAT 4
+ #define SIZEOF_DOUBLE 8
+ #define SIZEOF_LONG_DOUBLE 12
+ #define SIZEOF_VOID_P 4
+ #define HAVE_COMPUTED_GOTO 1
+ #define HAVE_PIC_COMPUTED_GOTO 1
+ #define HAVE_MEMSET 1
+ #define HAVE_MEMCMP 1
+ #define HAVE_MEMCHR 1
+ #define HAVE_MEMCPY 1
+ #define HAVE_MEMMOVE 1
+ #define HAVE_BCOPY 1
+ #define HAVE_BZERO 1
+ #define HAVE_BCMP 1
+ #define HAVE_ISNAN 1
+ #define HAVE_ISINF 1
+ #define HAVE_FINITE 1
+ #define HAVE_FMOD 1
+ #define HAVE_STRTOD 1
+ #define HAVE_MMAP 1
+ #define HAVE_MUNMAP 1
+ #define HAVE_GETPAGESIZE 1
+ #define HAVE_STAT 1
+ #define HAVE_VFPRINTF 1
+ #define HAVE_WAITPID 1
+ #define HAVE_WAIT 1
+ #define HAVE_FORK 1
+ #define HAVE_EXECV 1
+ #define HAVE_OPEN 1
+ #define HAVE_GETTIMEOFDAY 1
+ #define HAVE_GETPID 1
+ #define HAVE_QSORT 1
+ #define HAVE_REGCOMP 1
+ #define HAVE_RE_COMP 1
+ #define HAVE_UNLINK 1
+ #define HAVE_REMOVE 1
+ #define HAVE_GETCWD 1
+ #define HAVE_GETWD 1
+ #define HAVE_GET_CURRENT_DIR_NAME 1
+ #define HAVE_DLOPEN 1
+ #define HAVE_STRERROR 1
+ #define HAVE_FCNTL 1
+ #define HAVE_FTRUNCATE 1
+ #define HAVE_ACOS 1
+ #define HAVE_ASIN 1
+ #define HAVE_ATAN 1
+ #define HAVE_ATAN2 1
+ #define HAVE_CEIL 1
+ #define HAVE_COS 1
+ #define HAVE_COSH 1
+ #define HAVE_EXP 1
+ #define HAVE_FLOOR 1
+ #define HAVE_REMAINDER 1
+ #define HAVE_LOG 1
+ #define HAVE_LOG10 1
+ #define HAVE_POW 1
+ #define HAVE_RINT 1
+ #define HAVE_SIN 1
+ #define HAVE_SINH 1
+ #define HAVE_SQRT 1
+ #define HAVE_TAN 1
+ #define HAVE_TANH 1
+ #define HAVE_WCTOMB 1
+ #define HAVE_WCRTOMB 1
+ #define HAVE_MBTOWC 1
+ #define HAVE_MBRTOWC 1
+ #define HAVE_NL_LANGINFO 1
+ #define HAVE_SETLOCALE 1
+ #define HAVE_USLEEP 1
+ #define HAVE_GETHOSTBYNAME 1
+ #define HAVE_GETHOSTBYADDR 1
+ #define HAVE_OPENDIR 1
+ #define HAVE_READDIR 1
+ #define HAVE_READDIR_R 1
+ #define HAVE_CLOSEDIR 1
+ #define HAVE_ALLOCA_H 1
+ #define HAVE_ALLOCA 1
+ #define HAVE_LIBFFI 1
+ #define HAVE_LIBGC 1
Index: support/dir.c
===================================================================
*** /dev/null   Wed Dec 31 18:00:00 1969
--- support/dir.c       Fri Oct 18 03:06:38 2002
***************
*** 0 ****
--- 1,178 ----
+ /*
+  * dir.c - Directory Related Functions
+  *
+  * Copyright (C) 2001, 2002  Southern Storm Software, Pty Ltd.
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published by
+  * the Free Software Foundation; either version 2 of the License, or
+  * (at your option) any later version.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  *
+  * You should have received a copy of the GNU General Public License
+  * along with this program; if not, write to the Free Software
+  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  */
+ 
+ #include <stdio.h>
+ #include "il_system.h"
+ #include "il_sysio.h"
+ #include "il_errno.h"
+ 
+ #ifdef HAVE_SYS_STAT_H
+       #include <sys/stat.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+       #include <sys/types.h>
+ #endif
+ #ifdef HAVE_UNISTD_H
+       #include <unistd.h>
+ #endif
+ #ifdef HAVE_FCNTL_H
+         #include <fcntl.h>
+ #endif
+ #ifdef HAVE_DIRENT_H
+         #include <dirent.h>
+ #endif
+ #ifdef _WIN32
+       #include <windows.h>
+       #include <io.h>
+ #endif
+ #include <errno.h>
+ 
+ #ifdef        __cplusplus
+ extern        "C" {
+ #endif
+ 
+ ILInt32 ILDeleteDir(const char *path)
+ {
+   /*  I seem to recall errno as needing to be
+       reset to correctly test for success, so 
+       here it is
+   */
+         ILSysIOSetErrno(IL_ERRNO_Success);
+ 
+       /*
+         path == NULL appears to be undefined behavior, so
+         lets just get it out of the way now.
+       */
+       if (path == NULL)
+         {
+           /*  Set errno, just in case someone checks errno instead of the 
return.  */
+           ILSysIOSetErrno(IL_ERRNO_ENOENT);
+           return IL_ERRNO_ENOENT;
+         }
+       
+ 
+       /*  This branches to provide for unlink, actually it should
+           probably be rmdir() in this instance, but remove is
+           ANSI/ISO, so I don't see the reason for the branch, but
+           Just in case, I've left it in.  I'm not sure if HAVE_RMDIR
+           is actually checked in the configure script, so if
+           you do need to change it, you might need to check there as
+           well.
+       */
+       /*
+ #ifdef HAVE_RMDIR
+       rmdir(filename);
+ #else
+ #ifdef HAVE_REMOVE
+       remove(filename);
+ #endif
+ #endif
+       */
+ 
+       remove(path);
+       return ILSysIOConvertErrno(errno);
+ }
+ 
+   /*
+     Implementing this way because opendir seems to be somewhat 
non-standardised.
+     so basically I think this way will be a lot more portable.
+   */
+ ILDir *ILOpenDir(ILExecThread *_thread, char *path)
+ {
+ #ifdef HAVE_OPENDIR
+   return (ILDir *)opendir(path);
+ #endif
+   return NULL;
+ }
+ 
+ 
+ Platform_FileInfo *ILReadDir(ILExecThread *_thread, ILDir *directory)
+ {
+   Platform_FileInfo *FileInfo_ptr;
+   ILDirEnt *ILDirEnt_ptr;
+ 
+ 
+   /* Threadsafe version of readdir() */
+ #ifdef HAVE_READDIR_R
+   /*  Fetch a directory entry  */
+   if(readdir_r(directory, ILDirEnt_ptr, &ILDirEnt_ptr) != 0)
+     {
+       return NULL;
+     }
+ #else
+ #ifdef
+   /*  Not Threadsafe, so maby if systems need it, we should rewrite it.  */
+   if((ILDirEnt_ptr = readdir(directory)) == NULL))
+     {
+       return NULL;
+     }
+ #endif
+ #endif
+ 
+   /*  Load up FileInfo  */
+   if((FileInfo_ptr = (Platform_FileInfo *)malloc(sizeof(Platform_FileInfo))) 
== NULL)
+     {
+       /*  FIXME  -- More descriptive return needed here  */
+       return NULL;
+     }
+ 
+   FileInfo_ptr->fileName = ILStringCreate(_thread, ILDirEnt_ptr->d_name);
+   
+   switch (ILDirEnt_ptr->d_type)
+     {
+     case DT_REG:
+       FileInfo_ptr->fileType = ILFT_REG_FILE;
+       break;
+     case DT_DIR:
+       FileInfo_ptr->fileType = ILFT_DIRECTORY;
+       break;
+     case DT_FIFO:
+       FileInfo_ptr->fileType = ILFT_FIFO_SPEC;
+       break;
+     case DT_SOCK:
+       FileInfo_ptr->fileType = ILFT_SOCKET;
+       break;
+     case DT_CHR:
+       FileInfo_ptr->fileType = ILFT_CHAR_SPEC;
+       break;
+     case DT_BLK:
+       FileInfo_ptr->fileType = ILFT_BLOCK_SPEC;
+       break;
+     default:
+       FileInfo_ptr->fileType = ILFT_UNKNOWN;
+       break;
+     }
+ 
+   return FileInfo_ptr;
+ }
+ 
+ void ILCloseDir(ILExecThread *_thread, ILDir *directory)
+ {
+ #ifdef CLOSEDIR
+   closedir(directory);
+ #endif
+ 
+   return;
+ }
+ 
+ #ifdef        __cplusplus
+ };
+ #endif
+ 
#### End of Patch data ####
/*
 * DirMethods.cs - Implementation of the "Platform.DirMethods" class.
 *
 * Copyright (C) 2001, 2002  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Platform
{

using System;
using System.Runtime.CompilerServices;

internal enum FileType
{
        directory,
        characterSpecial,
        blockSpecial,
        regularFile,
        fifoSpecial,
        symbolicLink,
        socket
}

internal struct FileInfo
{
        public String fileName;
        public FileType fileType;
        FileInfo (String newFileName, FileType newFileType)
        {
                this.fileName = newFileName;
                this.fileType = newFileType;
        }
}


internal class DirMethods
{

        // Get the path character information from the runtime engine.
        [MethodImpl(MethodImplOptions.InternalCall)]
        extern public static PathInfo GetPathInfo();

        // Get the location of the "System" directory.
        [MethodImpl(MethodImplOptions.InternalCall)]
        extern public static String GetSystemDirectory();
        
        // Gets the last access time and date
        [MethodImpl(MethodImplOptions.InternalCall)]
        extern public static Errno GetLastAccess(string path, out long lastac);
        
        // Gets Last Modification(writes, etc.)  time and date
        [MethodImpl(MethodImplOptions.InternalCall)]
        extern public static Errno GetLastModification(string path, out long 
last_mod);
        
        // Gets Creation Time and Date
        [MethodImpl(MethodImplOptions.InternalCall)]
        extern public static Errno GetCreationTime(string path, out long 
create_time);
        
        [MethodImpl(MethodImplOptions.InternalCall)]
        extern public static Errno Copy(string src, string dest);
        
        [MethodImpl(MethodImplOptions.InternalCall)]
        extern public static Errno Delete(string path);
        
        [MethodImpl(MethodImplOptions.InternalCall)]
        extern public static Errno Rename(string old_name, string new_name);
        
        [MethodImpl(MethodImplOptions.InternalCall)]
        extern public static String GetCurrentDirectory();

        [MethodImpl(MethodImplOptions.InternalCall)]
        extern public static Errno GetFilesInDirectory(System.String path, out 
Platform.FileInfo[] 
        Files);

        

}; // class DirMethods

}; // namespace Platform





/*
 * Directory.cs - Implementation of the "System.IO.Directory" class.
 *
 * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
 *
 * Contribution from Abhaya Agarwal  <address@hidden>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */


namespace System.IO
{
        using System;
        using System.Security;
        using Platform;

        public sealed class Directory 
        {
/*
        Added to emulate the internal _() method in Object.cs
*/
                private static String _(String tag){return tag;}

//              private static PathInfo pathinfo = DirMethods.GetPathInfo();


                public static void Delete(string path)
                {
                  Platform.DirMethods.Delete(path);
                  //Delete(path,false); 
                }
                
                [TODO]
                public static void Delete(string path, bool recursive)
                {
                        if(path==null)
                        {
                                throw new ArgumentNullException();
                        }
                        if(path.Length==0 || (path.Trim()).Length==0 || 
path.IndexOfAny(pathinfo.invalidPathChars)!= -1)
                        {
                                throw new ArgumentException();
                        }

                        Errno errno = DirMethods.Delete(path);

                        switch(errno)
                        {
                                case Errno.ENOENT:
                                        throw new 
DirectoryNotFoundException(_("IO_DirNotFound"));

                                case Errno.ENOTEMPTY:
                                        if(!recursive)
                                        {
                                                throw new 
IOException(_("IO_Error"));
                                        }
                                        else
                                        {
                                                // TODO
                                        }
                                        break;

                                case Errno.EROFS:
                                        throw new IOException(_("IO_Error"));

                                case Errno.EACCES:
                                        throw new 
SecurityException(_("IO_PathnameSecurity"));

                                // Needs to be confirmed.
                                case Errno.ENAMETOOLONG:                        
                
                                        throw new PathTooLongException();
                                // TODO
                                // Throw some appropriate exception.
                                default:
                                        throw new ArgumentException();
                        }
                }

                [TODO]
                public static bool Exists(string path)
                {
                        return false;
                }

                public static DateTime GetCreationTime(string path)
                {
                        return File.GetCreationTime(path);
                }

                [TODO]
                public static string GetCurrentDirectory()
                {
                        return null;
                }

                [TODO]
                public static string[] GetDirectories(string path)
                {
                        return null;
                }

                [TODO]
                public static string[] GetDirectories(string path, string 
searchPattern)
                {
                        return null;
                }

                [TODO]
                public static string GetDirectoryRoot(string path)
                {
                        return null;
                }

                public static System.String[] GetFileSystemEntries(String path)
                {
                        Platform.FileInfo[] files;
                        System.String[] strings = new String[5];

                        Platform.DirMethods.GetFilesInDirectory(path, out 
files);
                        
                        return strings;
                }

                [TODO]
                public static string[] GetFileSystemEntries(string path, string 
searchPattern)
                {
                        return null;
                }

                [TODO]
                public static string[] GetFiles(string path)
                {
                        return null;
                }

                [TODO]
                public static string[] GetFiles(string path, string 
searchPattern)
                {
                        return null;
                }

                public static DateTime GetLastAccessTime(string path)
                {
                        return File.GetLastAccessTime(path);
                }

                public static DateTime GetLastWriteTime(string path)
                {
                        return File.GetLastWriteTime(path);
                }

                [TODO]
                public static void Move(string sourceDirName, string 
destDirName)
                {
                }

                [TODO]
                public static void SetCreationTime(string path, DateTime 
creationTime)
                {
                }

                [TODO]
                public static void SetCurrentDirectory(string path)
                {
                }

                [TODO]
                public static void SetLastAccessTime(string path, DateTime 
lastAccessTime)
                {
                }

                [TODO]
                public static void SetLastWriteTime(string path, DateTime 
lastWriteTime)
                {
                }
                public static void Main()
                {
                        Console.WriteLine(Exists("/tmp/"));     
                }

        }; //Directory
}; // namespace System.IO
namespace Platform
{

internal struct FileInfo
{
        public String fileName;
        public FileType fileType;
        FileInfo (String newFileName, FileType newFileType)
        {
                this.fileName = newFileName;
                this.fileType = newFileType;
        }
}

} // namespace Platform
namespace Platform
{
        internal enum FileType
        {
                directory,
                characterSpecial,
                blockSpecial,
                regularFile,
                fifoSpecial,
                symbolicLink,
                socket
        }

} //namespace Platform

reply via email to

[Prev in Thread] Current Thread [Next in Thread]