summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/winf.h
Commit message (Collapse)AuthorAgeFilesLines
* Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen2016-06-231-2/+0
| | | | | | | | | | | | | | 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>
* * dlfcn.cc (check_path_access): Drop FE_NATIVE from find_exec call.Corinna Vinschen2015-02-111-2/+2
| | | | | | | | | | | | | | | | | | | | | (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.
* * spawn.cc (child_info_spawn::worker): Reinstate using temp buffer for wideChristopher Faylor2013-07-191-9/+1
| | | | | | character command-line storage. Use wcs method to convert command line. * winf.h (lb_wcs): Delete. (linebuf::wcs): Implement new single-argument method.
* * common.din: Export GetCommandLine{A,W}.Christopher Faylor2013-07-191-6/+28
| | | | | | | | | | | | | | | | | | * 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.
* * winf.h (av::unshift): Make __reg2.Christopher Faylor2013-06-191-2/+3
|
* * spawn.cc (child_info_spawn::worker): Eliminate call to newargv.set() in favorChristopher Faylor2013-06-191-10/+4
| | | | | | | | | | | | | | | | 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.
* Throughout, change __attribute__ ((regparm (N))) to just __regN. Throughout,Christopher Faylor2013-01-211-4/+4
| | | | | | | | | | | | | | | | | | | (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.
* * exec.cc: Include pinfo.h.Corinna Vinschen2011-01-201-10/+0
| | | | | | | | | | * 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.
* * errno.cc (errmap): Add error codes for invalid binaries.Corinna Vinschen2011-01-191-2/+12
| | | | | | | | | | | | | | | | * 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_malloc.h: New file.Christopher Faylor2009-08-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * fhandler_registry.cc: Use NAME_MAX + 1 instead of CYG_MAX_PATHCorinna Vinschen2007-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* Change many cygheap allocation routines to their *_abort analogs.Christopher Faylor2007-11-261-1/+1
| | | | | | * cygheap.cc (cmalloc_abort): New function. (crealloc_abort): Ditto. (ccalloc_abort): Ditto.
* * fhandler_console.cc (fhandler_console::need_invisible): DropCorinna Vinschen2007-02-231-4/+3
| | | | | | | | | | | pty_needs_alloc_console check. * spawn.cc (spawn_guts): Ditto. (av::fixup): Remove setting iscui. * syscalls.cc (rename): Drop has_move_file_ex checks. Remove 9x specific code. * wincap.cc: Remove has_move_file_ex and pty_needs_alloc_console throughout. * wincap.h: Ditto.
* * winf.h (MAXCYGWINCMDLEN): Set down size to 30000 or suffer fork errors.Christopher Faylor2006-05-291-3/+3
|
* * spawn.cc (spawn_guts): Revert patch which treated derived cygwin programsChristopher Faylor2006-04-131-2/+10
| | | | | | | | | | | 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.
* * Makefile.in (DLL_OFILES): Add winf.o.Christopher Faylor2006-04-121-0/+82
* spawn.cc: Move command line handling stuff into winf.cc. * winf.h: New file. * winf.cc: New file.