[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MSVC compiler support [patch 13]: glob.h and fnmatch.h
From: |
David Bateman |
Subject: |
Re: MSVC compiler support [patch 13]: glob.h and fnmatch.h |
Date: |
Tue, 17 Oct 2006 21:55:07 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
Michael Goffioul wrote:
> Do not use glob.h and fnmatch.h (not available under MSVC).
>
>
> ------------------------------------------------------------------------
>
> Index: configure.in
> ===================================================================
> RCS file: /cvs/octave/configure.in,v
> retrieving revision 1.526
> diff -p -c -r1.526 configure.in
> *** configure.in 13 Oct 2006 18:11:26 -0000 1.526
> --- configure.in 17 Oct 2006 11:07:41 -0000
> *************** fi
> *** 1248,1253 ****
> --- 1312,1321 ----
>
> LIBGLOB=
> AC_SUBST(LIBGLOB)
> + case "$canonical_host_type" in
> + *-*-msdos)
> + ;;
> + *)
> if test "$have_fnmatch_h" = yes && test "$have_glob_h" = yes; then
> AC_CHECK_FUNCS(fnmatch, have_fnmatch=yes, [
> AC_CHECK_LIB(glob, fnmatch, [have_fnmatch=yes; LIBGLOB=-lglob],
> *************** if test "$have_fnmatch_h" = yes && test
> *** 1262,1267 ****
> --- 1330,1337 ----
> else
> AC_MSG_ERROR([You are required to have fnmatch.h and glob.h])
> fi
> + ;;
> + esac
>
> ### Checks for functions and variables.
>
> Index: liboctave/glob-match.cc
> ===================================================================
> RCS file: /cvs/octave/liboctave/glob-match.cc,v
> retrieving revision 1.7
> diff -p -c -r1.7 glob-match.cc
> *** liboctave/glob-match.cc 24 Apr 2006 19:13:07 -0000 1.7
> --- liboctave/glob-match.cc 17 Oct 2006 11:07:41 -0000
> *************** Software Foundation, Inc., 51 Franklin S
> *** 25,32 ****
> --- 25,34 ----
> #include <config.h>
> #endif
>
> + #ifndef _MSC_VER
> #include <fnmatch.h>
> #include <glob.h>
> + #endif
>
> #include <iostream>
> #include <string>
> *************** Software Foundation, Inc., 51 Franklin S
> *** 38,43 ****
> --- 40,46 ----
> bool
> glob_match::match (const std::string& s)
> {
> + #ifndef _MSC_VER
> int npat = pat.length ();
>
> const char *str = s.c_str ();
> *************** glob_match::match (const std::string& s)
> *** 56,61 ****
> --- 59,65 ----
> for (int i = 0; i < npat; i++)
> if (fnmatch (pat(i).c_str (), str, fnmatch_flags) != FNM_NOMATCH)
> return true;
> + #endif
>
> return false;
> }
> *************** glob_match::glob (void)
> *** 86,91 ****
> --- 90,96 ----
> {
> string_vector retval;
>
> + #ifndef _MSC_VER
> int npat = pat.length ();
>
> int k = 0;
> *************** glob_match::glob (void)
> *** 125,130 ****
> --- 130,136 ----
> }
> }
> }
> + #endif
>
> return retval.qsort ();
> }
John/Michael,
There is the same problem with MingW. Maybe the glob/fnmatch should be
reincluded in octave. Michael in any case if you want glob/fnmatch here
are the files. I'd hesitate to disable this though..
Cheers
D.
glob-1.0.tar.bz2
Description: BZip2 compressed data
- MSVC compiler support [patch 10]: .oct file compilation, (continued)
- MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran), Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran), John W. Eaton, 2006/10/25
- Re: MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran), Michael Goffioul, 2006/10/25
- MSVC compiler support [patch 12]: Fortran code fix, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 12]: Fortran code fix, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 12]: Fortran code fix, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 13]: glob.h and fnmatch.h, Michael Goffioul, 2006/10/17
- Re: MSVC compiler support [patch 13]: glob.h and fnmatch.h,
David Bateman <=
- Re: MSVC compiler support [patch 13]: glob.h and fnmatch.h, Michael Goffioul, 2006/10/17
- Re: MSVC compiler support [patch 13]: glob.h and fnmatch.h, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 13]: glob.h and fnmatch.h, Michael Goffioul, 2006/10/18
- Re: MSVC compiler support [patch 13]: glob.h and fnmatch.h, John W. Eaton, 2006/10/24
- Re: MSVC compiler support [patch 13]: glob.h and fnmatch.h, Michael Goffioul, 2006/10/19
- MSVC compiler support [patch 14]: Additional configuration, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 14]: Additional configuration, John W. Eaton, 2006/10/25
- Re: MSVC compiler support [patch 14]: Additional configuration, Michael Goffioul, 2006/10/25
- MSVC compiler support [patch 15]: CRUFT.DLL exported symbols (C), Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 15]: CRUFT.DLL exported symbols (C), John W. Eaton, 2006/10/26