* glob_pattern_p.cc: New file.
* Makefile.in (DLL_OFILES): Add glob_pattern_p.o. * glob.h: Add declaration for glob_pattern_p. * pinfo.cc (pinfo::thisproc): Remove __stdcall attribute.
This commit is contained in:
parent
762cf3ee22
commit
ecd5bc4ea8
@ -1,3 +1,11 @@
|
||||
2008-12-31 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* glob_pattern_p.cc: New file.
|
||||
* Makefile.in (DLL_OFILES): Add glob_pattern_p.o.
|
||||
* glob.h: Add declaration for glob_pattern_p.
|
||||
|
||||
* pinfo.cc (pinfo::thisproc): Remove __stdcall attribute.
|
||||
|
||||
2008-12-30 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* include/bits/wordsize.h: New linux-compatibility header.
|
||||
|
@ -135,17 +135,18 @@ DLL_OFILES:=assert.o autoload.o bsdlib.o ctype.o cxx.o cygheap.o cygthread.o \
|
||||
fhandler_registry.o fhandler_serial.o fhandler_socket.o fhandler_tape.o \
|
||||
fhandler_termios.o fhandler_tty.o fhandler_virtual.o fhandler_windows.o \
|
||||
fhandler_zero.o flock.o fnmatch.o fork.o fts.o ftw.o getopt.o glob.o \
|
||||
grp.o heap.o hookapi.o inet_addr.o inet_network.o init.o ioctl.o ipc.o \
|
||||
kernel32.o localtime.o lsearch.o malloc_wrapper.o minires-os-if.o \
|
||||
minires.o miscfuncs.o mktemp.o mmap.o msg.o mount.o net.o netdb.o nfs.o \
|
||||
nftw.o ntea.o passwd.o path.o pinfo.o pipe.o poll.o posix_ipc.o \
|
||||
pthread.o random.o regcomp.o regerror.o regexec.o regfree.o registry.o \
|
||||
resource.o rexec.o rcmd.o scandir.o sched.o sec_acl.o sec_auth.o \
|
||||
sec_helper.o security.o select.o sem.o setlsapwd.o shared.o shm.o \
|
||||
sigfe.o signal.o sigproc.o smallprint.o spawn.o strace.o strfuncs.o \
|
||||
strptime.o strsep.o strsig.o sync.o syscalls.o sysconf.o syslog.o \
|
||||
termios.o thread.o timer.o times.o tls_pbuf.o tty.o uinfo.o uname.o \
|
||||
wait.o wincap.o window.o winf.o xsique.o \
|
||||
glob_pattern_p.o grp.o heap.o hookapi.o inet_addr.o inet_network.o \
|
||||
init.o ioctl.o ipc.o kernel32.o localtime.o lsearch.o malloc_wrapper.o \
|
||||
minires-os-if.o minires.o miscfuncs.o mktemp.o mmap.o msg.o mount.o \
|
||||
net.o netdb.o nfs.o nftw.o ntea.o passwd.o path.o pinfo.o pipe.o \
|
||||
poll.o posix_ipc.o pthread.o random.o regcomp.o regerror.o regexec.o \
|
||||
regfree.o registry.o resource.o rexec.o rcmd.o scandir.o sched.o \
|
||||
sec_acl.o sec_auth.o sec_helper.o security.o select.o sem.o \
|
||||
setlsapwd.o shared.o shm.o sigfe.o signal.o sigproc.o smallprint.o \
|
||||
spawn.o strace.o strfuncs.o strptime.o strsep.o strsig.o sync.o \
|
||||
syscalls.o sysconf.o syslog.o termios.o thread.o timer.o times.o \
|
||||
tls_pbuf.o tty.o uinfo.o uname.o wait.o wincap.o window.o winf.o \
|
||||
xsique.o \
|
||||
$(EXTRA_DLL_OFILES) $(EXTRA_OFILES) $(MALLOC_OFILES) $(MT_SAFE_OBJECTS)
|
||||
|
||||
GMON_OFILES:=gmon.o mcount.o profil.o
|
||||
|
@ -719,9 +719,8 @@ getwd SIGFE
|
||||
_getwd = getwd SIGFE
|
||||
getxattr SIGFE
|
||||
glob SIGFE
|
||||
_glob = glob SIGFE
|
||||
globfree SIGFE
|
||||
_globfree = globfree SIGFE
|
||||
glob_pattern_p
|
||||
gmtime SIGFE
|
||||
_gmtime = gmtime SIGFE
|
||||
gmtime_r SIGFE
|
||||
|
28
winsup/cygwin/glob_pattern_p.cc
Normal file
28
winsup/cygwin/glob_pattern_p.cc
Normal file
@ -0,0 +1,28 @@
|
||||
/* glob_pattern_p.c
|
||||
|
||||
int glob_pattern_p (__const char *__pattern, int __quote)
|
||||
|
||||
Return nonzero if PATTERN contains any metacharacters.
|
||||
Metacharacters can be quoted with backslashes if QUOTE is nonzero.
|
||||
|
||||
This function is not part of the interface specified by POSIX.2
|
||||
but several programs want to use it. */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
int glob_pattern_p (const char *pattern, int quote)
|
||||
{
|
||||
const char *quote_chars = "\\?*[]";
|
||||
if (!quote)
|
||||
quote_chars++;
|
||||
while ((pattern = strpbrk (pattern, quote_chars)) != NULL)
|
||||
if (*pattern == '\\')
|
||||
pattern++;
|
||||
else
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
} /* extern "C" */
|
@ -109,8 +109,9 @@ __BEGIN_DECLS
|
||||
# define DLLEXPORT __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
int DLLEXPORT glob(const char *, int, int (*)(const char *, int), glob_t *);
|
||||
void DLLEXPORT globfree(glob_t *);
|
||||
int DLLEXPORT glob (const char *, int, int (*)(const char *, int), glob_t *);
|
||||
void DLLEXPORT globfree (glob_t *);
|
||||
int DLLEXPORT glob_pattern_p (const char *, int);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_GLOB_H_ */
|
||||
|
@ -51,7 +51,7 @@ bool is_toplevel_proc;
|
||||
/* Setup the pinfo structure for this process. There may already be a
|
||||
_pinfo for this "pid" if h != NULL. */
|
||||
|
||||
void __stdcall
|
||||
void
|
||||
pinfo::thisproc (HANDLE h)
|
||||
{
|
||||
procinfo = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user