mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-31 03:20:28 +08:00
* path.cc (normalize_posix_path): Revert .. check removed by previous changes.
* cygheap.h: Temporarily declare path_prefix_p here.
This commit is contained in:
parent
9f13167f77
commit
ac5561f2ed
@ -1,3 +1,9 @@
|
||||
Sun Jun 3 20:52:13 2001 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* path.cc (normalize_posix_path): Revert .. check removed by previous
|
||||
changes.
|
||||
* cygheap.h: Temporarily declare path_prefix_p here.
|
||||
|
||||
Mon Jun 4 0:14:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* net.cc (wsock_event): Add destructor.
|
||||
|
@ -46,6 +46,9 @@ struct cygheap_root_mount_info
|
||||
unsigned native_pathlen;
|
||||
};
|
||||
|
||||
/* CGF: FIXME This doesn't belong here */
|
||||
|
||||
int path_prefix_p (const char *path1, const char *path2, int len1) __attribute__ ((regparm (3)));
|
||||
class cygheap_root
|
||||
{
|
||||
/* Root directory information.
|
||||
@ -55,7 +58,6 @@ class cygheap_root
|
||||
public:
|
||||
bool posix_ok (const char *path)
|
||||
{
|
||||
extern int path_prefix_p (const char *, const char *, int);
|
||||
if (!m)
|
||||
return 1;
|
||||
return path_prefix_p (m->posix_path, path, m->posix_pathlen);
|
||||
|
@ -26,9 +26,9 @@ details. */
|
||||
#include "perprocess.h"
|
||||
#include "fhandler.h"
|
||||
#include "dtable.h"
|
||||
#include "path.h"
|
||||
#include "cygheap.h"
|
||||
#include "child_info.h"
|
||||
#include "path.h"
|
||||
#include "perthread.h"
|
||||
#include "shared_info.h"
|
||||
#include "cygwin_version.h"
|
||||
|
@ -89,7 +89,6 @@ static DWORD available_drives;
|
||||
static int normalize_win32_path (const char *src, char *dst);
|
||||
static void slashify (const char *src, char *dst, int trailing_slash_p);
|
||||
static void backslashify (const char *src, char *dst, int trailing_slash_p);
|
||||
static int path_prefix_p (const char *path1, const char *path2, int len1);
|
||||
|
||||
struct symlink_info
|
||||
{
|
||||
@ -243,6 +242,12 @@ normalize_posix_path (const char *src, char *dst)
|
||||
}
|
||||
else if (src[2] && !isslash (src[2]))
|
||||
break;
|
||||
else
|
||||
{
|
||||
while (dst > dst_start && !isslash (*--dst))
|
||||
continue;
|
||||
src++;
|
||||
}
|
||||
}
|
||||
|
||||
*dst++ = '/';
|
||||
|
@ -167,5 +167,5 @@ has_exec_chars (const char *buf, int len)
|
||||
(buf[0] == 'M' && buf[1] == 'Z'));
|
||||
}
|
||||
|
||||
extern int pathmatch (const char *path1, const char *path2);
|
||||
extern int pathnmatch (const char *path1, const char *path2, int len);
|
||||
int pathmatch (const char *path1, const char *path2) __attribute__ ((regparm (2)));
|
||||
int pathnmatch (const char *path1, const char *path2, int len) __attribute__ ((regparm (2)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user