newlib/winsup/cygwin/lib/_cygwin_S_IEXEC.cc
Christopher Faylor 95a8465ba0 * dlopen.c (dlopen): Return NULL when name is NULL (suggested by
chrisiasci@aol.com).
* cygwin.din: Add a new, internally used export - _check_for_executable.
* dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries.  Pass
user_data to premain functions.
* fhandler.cc (fhandler_disk_file::open): Only check for executable if the
linked program is intereested in the executable bit.
(fhandler_disk_file::check_execable_p): Delete.
* fhandler.h (executable_states): New enumeration of various states of
executable bit caring.
(fhandler_base::set_execable_p): New method.
* fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal has
been sent to the tty.  Return -1 when this is so.
* fhandler_console.cc (fhandler_console::read): Return -1 when signal sending
character encountered.
* path.cc (path_conv::check): Record when path refers to a disk device.  Move
executable extension check here.
(check_sysfile): Accomodate new EXEC path states.
(has_suffix): Remove.
(next_suffix): Remove.
(class suffix_scan): New clas.
(suffix_scan::has): New method.
(suffix_scan:next): New method.
(symlink_info::check): Use suffix_scan method to control for scanning for
suffixes.
* path.h (path_conv::exec_state): New method.
* perprocess.h: Make "C" friendly.
* include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC.  Bump
CYGWIN_VERSION_API_MINOR.
* include/sys/cygwin.h: Change premain declarations.
* winsup.h: Move __cplusplus test to after builtin defines.
2001-03-05 06:28:25 +00:00

30 lines
733 B
C++

/* _cygwin_S_IEXEC.cc: stat helper stuff
Copyright 2001 Red Hat, Inc.
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. */
#if 0
#include "windows.h"
#include <sys/cygwin.h>
#include "perprocess.h"
#endif
#include <sys/stat.h>
#include <sys/unistd.h>
const unsigned _cygwin_S_IEXEC = S_IEXEC;
const unsigned _cygwin_S_IXUSR = S_IXUSR;
const unsigned _cygwin_S_IXGRP = S_IXGRP;
const unsigned _cygwin_S_IXOTH = S_IXOTH;
const unsigned _cygwin_X_OK = X_OK;
extern int __declspec (dllimport) _check_for_executable;
struct _cygwin_bob__
{
_cygwin_bob__ () {_check_for_executable = 1;}
} _cygwin_dummy_bob__;