2001-11-12 01:19:17 +01:00
|
|
|
/* path.h
|
|
|
|
|
2009-07-22 12:20:26 +02:00
|
|
|
Copyright 2001, 2002, 2003, 2006, 2008, 2009 Red Hat, Inc.
|
2001-11-12 01:19:17 +01:00
|
|
|
|
|
|
|
This file is part of Cygwin.
|
|
|
|
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
details. */
|
|
|
|
|
2009-07-22 12:20:26 +02:00
|
|
|
struct mnt_t
|
|
|
|
{
|
|
|
|
char *native;
|
|
|
|
char *posix;
|
|
|
|
unsigned flags;
|
|
|
|
};
|
|
|
|
|
2003-03-04 06:30:50 +01:00
|
|
|
char *cygpath (const char *s, ...);
|
2008-03-11 18:20:02 +01:00
|
|
|
char *cygpath_rel (const char *cwd, const char *s, ...);
|
* cygcheck.cc (get_word, get_dword): Move to path.cc.
(LINK_EXTENSION): New macro.
(check_existence): New static function.
(find_on_path): Check for symbolic links if asked.
(dll_info): New error handling.
(track_down): Only call dll_info() for executables, display
an error for symlinks, and print magic number for others.
(find_app_on_path): New static function.
(cygcheck, dump_sysinfo): Call find_app_on_path() instead of
find_on_path().
* path.cc (cmp_shortcut_header): New static function.
(get_word, get_dword): Moved from cygcheck.cc.
(EXE_MAGIC, SHORTCUT_MAGIC, SYMLINK_COOKIE, SYMLINK_MAGIC): New
macros.
(is_exe, is_symlink, readlink): New functions.
* path.h (is_exe, is_symlink, readlink): Declare.
(get_word, get_dword): Ditto.
2006-10-05 19:24:13 +02:00
|
|
|
bool is_exe (HANDLE);
|
|
|
|
bool is_symlink (HANDLE);
|
|
|
|
bool readlink (HANDLE, char *, int);
|
|
|
|
int get_word (HANDLE, int);
|
|
|
|
int get_dword (HANDLE, int);
|
2009-07-22 12:20:26 +02:00
|
|
|
bool from_fstab_line (mnt_t *m, char *line, bool user);
|
|
|
|
|
|
|
|
extern mnt_t mount_table[255];
|
|
|
|
extern int max_mount_entry;
|
* cygcheck.cc (get_word, get_dword): Move to path.cc.
(LINK_EXTENSION): New macro.
(check_existence): New static function.
(find_on_path): Check for symbolic links if asked.
(dll_info): New error handling.
(track_down): Only call dll_info() for executables, display
an error for symlinks, and print magic number for others.
(find_app_on_path): New static function.
(cygcheck, dump_sysinfo): Call find_app_on_path() instead of
find_on_path().
* path.cc (cmp_shortcut_header): New static function.
(get_word, get_dword): Moved from cygcheck.cc.
(EXE_MAGIC, SHORTCUT_MAGIC, SYMLINK_COOKIE, SYMLINK_MAGIC): New
macros.
(is_exe, is_symlink, readlink): New functions.
* path.h (is_exe, is_symlink, readlink): Declare.
(get_word, get_dword): Ditto.
2006-10-05 19:24:13 +02:00
|
|
|
|
2009-07-22 12:20:26 +02:00
|
|
|
#ifndef SYMLINK_MAX
|
2008-03-11 18:20:02 +01:00
|
|
|
#define SYMLINK_MAX 4095 /* PATH_MAX - 1 */
|
2009-07-22 12:20:26 +02:00
|
|
|
#endif
|