[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MSVC compiler support [patch 13]: glob.h and fnmatch.h
From: |
Michael Goffioul |
Subject: |
Re: MSVC compiler support [patch 13]: glob.h and fnmatch.h |
Date: |
Thu, 19 Oct 2006 23:25:31 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (Windows/20060909) |
John W. Eaton a écrit :
The glob function allows things like
who x*
and
load foo.dat x*
to work. I think it is best to arrange to build a glob library before
building Octave, so I won't apply this patch.
Would it be still possible to make octave compilable without
glob/fnmatch support? See attached
patch for a proposal.
Michael.
Index: configure.in
===================================================================
RCS file: /cvs/octave/configure.in,v
retrieving revision 1.528
diff -c -r1.528 configure.in
*** configure.in 18 Oct 2006 20:57:04 -0000 1.528
--- configure.in 19 Oct 2006 21:22:29 -0000
***************
*** 1257,1266 ****
have_glob=no)])
if test "$have_fnmatch" != yes || test "$have_glob" != yes; then
! AC_MSG_ERROR([You are required to have fnmatch and glob])
fi
else
! AC_MSG_ERROR([You are required to have fnmatch.h and glob.h])
fi
### Checks for functions and variables.
--- 1321,1333 ----
have_glob=no)])
if test "$have_fnmatch" != yes || test "$have_glob" != yes; then
! AC_MSG_WARN([You are required to have fnmatch and glob to enable globbing
features])
! else
! AC_DEFINE(HAVE_FNMATCH, 1, [Define to 1 if you have the `fnmatch'
function])
! AC_DEFINE(HAVE_GLOB, 1, [Define to 1 if you have the `glob' function])
fi
else
! AC_MSG_WARN([You are required to have fnmatch.h and glob.h to enable
globbing features])
fi
### Checks for functions and variables.
Index: liboctave/glob-match.cc
===================================================================
RCS file: /cvs/octave/liboctave/glob-match.cc,v
retrieving revision 1.7
diff -c -r1.7 glob-match.cc
*** liboctave/glob-match.cc 24 Apr 2006 19:13:07 -0000 1.7
--- liboctave/glob-match.cc 19 Oct 2006 21:22:29 -0000
***************
*** 25,32 ****
--- 25,37 ----
#include <config.h>
#endif
+ #ifdef HAVE_FNMATCH
#include <fnmatch.h>
+ #endif
+
+ #ifdef HAVE_GLOB
#include <glob.h>
+ #endif
#include <iostream>
#include <string>
***************
*** 38,43 ****
--- 43,49 ----
bool
glob_match::match (const std::string& s)
{
+ #ifdef HAVE_FNMATCH
int npat = pat.length ();
const char *str = s.c_str ();
***************
*** 56,61 ****
--- 62,68 ----
for (int i = 0; i < npat; i++)
if (fnmatch (pat(i).c_str (), str, fnmatch_flags) != FNM_NOMATCH)
return true;
+ #endif
return false;
}
***************
*** 86,91 ****
--- 93,99 ----
{
string_vector retval;
+ #ifdef HAVE_GLOB
int npat = pat.length ();
int k = 0;
***************
*** 125,130 ****
--- 133,139 ----
}
}
}
+ #endif
return retval.qsort ();
}
- Re: MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran), (continued)
- 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, 2006/10/17
- 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 <=
- 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
- MSVC compiler support [patch 16]: liboctave exported symbols, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 16]: liboctave exported symbols, John W. Eaton, 2006/10/26
- MSVC compiler support [patch 17]: octinterp.dll exported symbols, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 17]: octinterp.dll exported symbols, John W. Eaton, 2006/10/26
- MSVC compiler support [patch 18]: recursion stack overflow, Michael Goffioul, 2006/10/17