Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause.
Everything else stays under GPLv3+.
New Linking Exception exempts resulting executables from LGPLv3 section 4.
Add CONTRIBUTORS file to keep track of licensing.
Remove 'Copyright Red Hat Inc' comments.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
(gfpod_helper): Drop equality sign from environment variable name
in call to check_path_access.
* exec.cc (execlp): Drop equality sign from environment variable name
in call to find_exec.
(execvp): Ditto.
(execvpe): Ditto.
* path.h (enum fe_types): Drop FE_NATIVE.
(find_exec): Rename third paramter in declaration from search. Drop
equality sign from default value.
* spawn.cc (perhaps_suffix): Add PC_POSIX to path_conv::check call.
(find_exec): Simplify function. Iterate over POSIX pathlist rather
than Windows pathlist. Drop handling of FE_NATIVE flag. Always fill
posix path of incoming path_conv buf, unless FE_NNF flag is given.
(av::setup): Drop equality sign from environment variable name
in call to find_exec. Call unshift with normalized_path.
* winf.cc (av::unshift): Drop conv parameter and code converting
Windows to POSIX path.
* winf.h (av::unshift): Accommodate prototype.
character command-line storage. Use wcs method to convert command line.
* winf.h (lb_wcs): Delete.
(linebuf::wcs): Implement new single-argument method.
* kernel32.cc: Add includes needed for GetCommandLine functions.
(ucmd): New function.
(cygwin_GetCommandLineW): Ditto.
(cygwin_GetCommandLineA): Ditto.
* spawn.cc (child_info_spawn::worker): Rename one_line -> cmd. Use lb_wcs
macro to generate a wide character version of the line buffer. Remove
duplicate printing of command line. Don't access members of linebuf directly.
* winf.h: Use pragma once.
(linebuf): Make storage private.
(linebuf::operator size_t): New operator. Return size of buf.
(linebuf::operator wchar_t): New operator.
(linebuf::wcs): New function.
(lb_wcs): New macro.
* include/cygwin/version.h: Bump API minor number to 268.
* strfuncs.cc: Clarify descriptive file comment.
of conglomerated newargv.setup(). Let newargv.setup() decide when to call
dup_all(). Only set argc and argv for cygwin processes.
(av::setup): Rename from av::fixup. Accept argc and argv parameters. Fill out
argv and argc here. Duplicate whole argv structure when this is a Cygwin
executable.
* winf.cc (linebuf::fromargv): Don't bother duplicating argv elements since
they will never be used.
* winf.h (av::set): Delete.
(av::setup): Rename from av::fixup. Add two parameters.
(av::replace0_maybe): Assign calloced to 1 rather than 'true' for clarity.
(av::dup_maybe): Delete.
(av::dup_all): Set calloced to show that we have duplicated all of the
arguments in the list.
(mainly in fhandler*) start fixing gcc 4.7.2 mismatch between regparm
definitions and declarations.
* gendef: Define some functions to take @ declaration to accommodate _regN
defines which use __stdcall.
* gentls_offsets: Define __regN macros as empty.
* autoload.cc (wsock_init): Remove unneeded regparm attribute.
* winsup.h (__reg1): Define.
(__reg2): Define.
(__reg3): Define.
* advapi32.cc (DuplicateTokenEx): Coerce some initializers to avoid warnings
from gcc 4.7.2.
* exceptions.cc (status_info): Declare struct to use NTSTATUS.
(cygwin_exception::dump_exception): Coerce e->ExceptionCode to NTSTATUS.
* fhandler_clipboard.cc (cygnativeformat): Redefine as UINT to avoid gcc 4.7.2
warnings.
(fhandler_dev_clipboard::read): Ditto.
* winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here...
* pinfo.h: ...to here.
(_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM.
(_P_MODE): Redefine so as not to mask out _P_SYSTEM.
* spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve.
(spawnlpe): Ditto.
(spawnvp): Ditto.
* exec.cc (execvp): Call spawnve with _P_PATH_TYPE_EXEC flag
from here.
(execvpe): Ditto.
* spawn.cc (spawn_guts): Filter _P_PATH_TYPE_EXEC from mode and
store in p_type_exec. Call av::fixup with addtional p_type_exec
argument.
(spawnve): Check for filtered mode.
(spawnvpe): Add _P_PATH_TYPE_EXEC flag when calling spawnve.
(av::fixup): Accept additional bool parameter p_type_exec. Only check
for script if p_type_exec is true.
* winf.h (_P_PATH_TYPE_EXEC): Define.
(_P_MODE): Define.
(av::fixup): Declare with additional bool parameter.
* cygheap.h: Remove stuff now included in cygheap_malloc.h and include that
file. Make cygheap_init a standard c++ function. Remove unneeded child_info
declaration.
* path.h: Include cygheap_malloc.h. Remove extra cstrdup declaration.
(path_conv): Reorganize to group variables together.
(path_conv::path): Make const char *.
(path_conv::known_suffix): Ditto.
(path_conv::normalized_path): Ditto.
(path_conv::path_conv): Reorganize initializers to reflect new element
ordering.
(path_conv::get_win32): Change return value to const char *.
(path_conv::set_path): Move back here from spawn.cc.
(parh_conv::modifiable_path): New function.
* path.cc (path_conv::add_ext_from_sym): Accommodate const'ness of
known_suffixes.
(path_conv::set_normalized_path): Ditto for normalized_path.
(path_conv::check): Use modifiable_path whereever we need to modify the path
element. Use set_path to set the path.
(path_conv::~path_conv): Accommodate new const'ness.
* spawn.cc (perhaps_suffix): Declare ext as const since that's what is being
returned.
(path_conv::set_path): Move back to path.h.
* winf.f (linebuf): Perform minor cleanup.
(linebuf::fromargv): Change second parameter to const.
* winf.cc (linebuf::fromargv): Ditto.
throughout for subkey name buffer size.
* fhandler_socket.cc (search_wsa_event_slot): Use MAX_PATH instead of
CYG_MAX_PATH for mutext name buffer size.
(fhandler_socket::init_events): Ditto.
* fhandler_virtual.cc (fhandler_virtual::opendir): Check path length
against PATH_MAX instead of against CYG_MAX_PATH.
* registry.cc (get_registry_hive_path): Use PATH_MAX instead of
CYG_MAX_PATH for registry value path buffer size.
* shared.cc (open_shared): Use MAX_PATH instead of CYG_MAX_PATH
for shared memory name buffer size.
* thread.cc (semaphore::semaphore): Use MAX_PATH instead of CYG_MAX_PATH
for semaphore name buffer size.
* uinfo.cc (cygheap_user::env_userprofile): Use PATH_MAX instead of
CYG_MAX_PATH for temporary path name buffer size.
* winf.h (LINE_BUF_CHUNK): Define as MAX_PATH * 2.
* include/sys/dirent.h: Include sys/limits.h. Define name buffer sizes
using NAME_MAX.
differently from those which are mounted with -X. Pass extra argument to
linebuf::fromargv.
* winf.h (MAXCYGWINCMDLEN): New define.
(linebuf::finish): Add a new argument denoting when command line overflow is
ok.
(linebuf::fromargv): Ditto.
* winf.cc (linebuf::finish): Implement above change.
(linebuf::fromargv): Ditto.