octave-maintainers
[Top][All Lists]
Advanced

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

MSVC compiler support [patch 13]: glob.h and fnmatch.h


From: Michael Goffioul
Subject: MSVC compiler support [patch 13]: glob.h and fnmatch.h
Date: Tue, 17 Oct 2006 21:48:52 +0200
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

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 ();
  }

reply via email to

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