| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
src/w32.c (normalize_filename): Accept an additional argument
MULTIBYTE; if non-zero, traverse the file name by bytes and don't
downcase it even if w32-downcase-file-names is non-nil.
(dostounix_filename): Accept an additional argument MULTIBYTE and
pass it to normalize_filename.
(emacs_root_dir): Adjust.
src/msdos.h (dostounix_filename): Adjust prototype.
src/w32.h (dostounix_filename): Adjust prototype.
src/msdos.c (dostounix_filename): Accept an additional argument and
ignore it.
(init_environment): Adjust callers of dostounix_filename.
src/fileio.c (Ffile_name_directory, file_name_as_directory)
(directory_file_name, Fexpand_file_name)
(Fsubstitute_in_file_name): [DOS_NT] Adjust call to
dostounix_filename.
[WINDOWSNT]: Downcase file names if w32-downcase-file-names is
non-nil.
(Fsubstitute_in_file_name): [DOS_NT] Don't downcase environment
variables, as egetenv is case-insensitive for DOS_NT.
src/dired.c (file_name_completion): Don't call Fdirectory_file_name
with an encoded file name.
src/w32proc.c (Fw32_short_file_name, Fw32_long_file_name): Adjust
calls to dostounix_filename.
src/w32fns.c (Fx_file_dialog): Adjust call to dostounix_filename.
src/unexw32.c (unexec): Adjust call to dostounix_filename.
src/termcap.c (tgetent) [MSDOS]: Adjust call to dostounix_filename.
src/emacs.c (decode_env_path) [DOS_NT]: Adjust call to
dostounix_filename.
src/callproc.c (Fcall_process) [MSDOS]: Adjust call to
dostounix_filename.
|
|\ |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
src/makefile.w32-in ($(BLD)/w32.$(O)):
($(BLD)/vm-limit.$(O)):
($(BLD)/term.$(O)):
($(BLD)/unexw32.$(O)):
($(BLD)/fileio.$(O)):
($(BLD)/dispnew.$(O)): Update dependencies.
src/w32term.h (w32_initialize_display_info, initialize_w32_display):
Add prototypes.
src/w32proc.c: Include ctype.h.
src/w32.h (init_environment, check_windows_init_file)
(syms_of_ntproc, syms_of_ntterm, dostounix_filename)
(unixtodos_filename, init_winsock, srandom, random, sys_pipe)
(set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
(sys_link): Add prototypes.
src/w32.c: Include w32select.h.
(sys_access, e_malloc, sys_select): Add prototypes.
(emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
src/vm-limit.c [WINDOWSNT]: Include w32heap.h.
src/unexw32.c: Include lisp.h and w32.h.
src/term.c [WINDOWSNT]: Include w32term.h.
src/process.c [WINDOWSNT]: Add prototype of sys_select.
src/fileio.c [WINDOWSNT]: Include w32.h.
src/dispnew.c [WINDOWSNT]: Include w32.h.
nt/inc/pwd.h (getuid, geteuid): Add prototypes.
nt/inc/ms-w32.h (sys_wait, _getpid, gmtgime_r, localtime_r)
(signal_handler, sys_signal, sigemptyset, sigfillset, sigprocmask)
(pthread_sigmask, sigismember, setpgrp, sigaction, alarm)
(sys_kill, getpagesize): Add prototypes for emulated functions.
nt/inc/grp.h (getgid, getegid): Add prototypes.
nt/gmake.defs (DEBUG_CFLAGS) [NOOPT]: Add -std=gnu99.
nt/configure.bat (chkapiN): Avoid compiler warning in junk.c when
compiling with -std=gnu99.
nt/config.nt (CHECK_LISP_OBJECT_TYPE): Don't undef, so that it
could be used via --cflags switch to configure.bat.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
nt/preprep.c (RVA_TO_PTR): Use 'unsigned char *' instead of
'void *', for pointer arithmetics.
(OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET): Enclose all
macro arguments in parentheses.
src/unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
(RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
(RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
as the previous version used 'void *'.
src/ralloc.c (ROUNDUP): Fix last change.
(MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
'size_t'.
Fixes: debbugs:12544
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
src/w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
(SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
compatibility with x64.
src/w32term.c (w32_draw_underwave): Don't use GCC extensions for
defining an XRectangle structure.
src/w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
arithmetics for compatibility with x64.
src/w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
compatibility with x64.
src/w32heap.h: Adjust prototypes and declarations.
src/w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
(round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
DWORD, long, and unsigned long, for compatibility with x64.
(allocate_heap) [_WIN64]: Reserve 32GB of memory.
(sbrk): Argument is now of type ptrdiff_t.
src/w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
less than 0x0500.
(w32_msg_pump): Use WPARAM type for 'result'.
src/w32.c (init_environment, get_emacs_configuration): Support AMD64
architecture.
(init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
compatibility with x64.
src/vm-limit.c (lim_data): Now size_t.
(check_memory_limits): Adjust prototypes of real_morecore and
__morecore to receive argument of type ptrdiff_t. Use size_t for
five_percent and data_size.
src/unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
variables, for compatibility with x64.
(rva_to_section, offset_to_section, relocate_offset)
(OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
(PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
(copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
for compatibility with x64.
src/sysdep.c (STDERR_FILENO): Define if not already defined.
src/ralloc.c (real_morecore): Argument type is now ptrdiff_t.
(__morecore): Argument type is now ptrdiff_t.
(ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
(relinquish): Use ptrdiff_t type for 'excess'.
(r_alloc_sbrk): Argument type is now ptrdiff_t.
src/makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
(bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
instead of a literal number.
src/gmalloc.c [WINDOWSNT]: Include w32heap.h.
(min): Define only if not already defined.
src/frame.c (x_report_frame_params): Use EMACS_UINT for the return
value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
hosts.
src/image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
'bitmaps' is a pointer.
src/dispextern.h (x_bitmap_pixmap): Adjust prototype.
src/alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
nt/makefile.w32-in ($(TRES)): Use $(EMACS_MANIFEST).
nt/inc/sys/socket.h: Don't map Winsock error codes to standard ones
that are already defined.
nt/inc/ms-w32.h (EMACS_INT, EMACS_UINT, EMACS_INT_MAX, PRIuMAX)
(pI, _INTPTR) [_MSC_VER]: Fix definitions for MSVC.
[_MSC_VER]: Add pragmas to suppress some MSVC warnings.
nt/preprep.c (pfnCheckSumMappedFile, rva_to_section)
(offset_to_section, relocate_offset, OFFSET_TO_RVA)
(RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA)
(OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN)
(copy_executable_and_move_sections, ADJUST_IMPORT_RVA, main): Use
DWORD_PTR instead of DWORD for compatibility with x64.
nt/nmake.defs: Support AMD64.
(EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST): New macros.
nt/gmake.defs: (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST):
New macros.
nt/addsection.c (pfnCheckSumMappedFile, rva_to_section)
(offset_to_section, relocate_offset, OFFSET_TO_RVA)
(RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA)
(OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN)
(copy_executable_and_add_section, main): Use DWORD_PTR instead of
DWORD, for compatibility with x64.
nt/emacs-x64.manifest: New file.
nt/emacs-x86.manifest: Renamed from emacs.manifest.
lib-src/ntlib.c (gettimeofday): Copy from src/w32.c. lib/gettime.
needs this function.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here, we use the generic window-system configuration system we just
implemented to support the w32 window-system in the mainline build
under Cygwin. (Previously, the w32 window system could only be
compiled as part of the NT-native Emacs build process.)
The changes in this patch need to be applied atomically in order to
avoid breaking Emacs. The changes include:
- Changes throughout the Lisp and C code to not assume that
NT Emacs and the w32 window system are synonymous.
- Wiring up the regular select(2) event loop to Windows messages
- Cleaning up the w32 drag-and-drop receiving code.
- Exposing Cygwin path conversion functions to elisp.
- Unicode file dialog support when compiling for Cygwin.
- Splitting the w32 term lisp initialization code into code
applicable to any w32 window-system and code specific to
system-type windows-nt.
- Integrating the old and new w32 code into the build system.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* nt/addpm.c (main): Remove unused variable `retval'.
* nt/preprep.c (main): Remove unused variable `ptr'.
* src/dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
* src/fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
and `suffix'.
(Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
of variables specific to SELinux and computation of `encoded_absname'.
* src/image.c (XPutPixel): Remove unused variable `height'.
* src/keyboard.c (make_lispy_event): Remove unused variable `hpos'.
* src/unexw32.c (get_section_info): Remove unused variable `section'.
* src/w32.c (stat): Remove unused variables `drive_root' and `devtype'.
(system_process_attributes): Remove unused variable `sess'.
(sys_read): Remove unused variable `err'.
* src/w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
(w32_wnd_proc): Remove unused variable `isdead'.
(unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
(Fx_server_max_request_size): Remove unused variable `dpyinfo'.
(x_create_tip_frame): Remove unused variable `tem'.
* src/w32inevt.c (w32_console_read_socket): Remove unused variable `no_events'.
* src/w32term.c (x_draw_composite_glyph_string_foreground):
Remove unused variable `width'.
|
| |
|
|
|
|
|
|
|
|
|
| |
* deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
(unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
Depend on unexec.h.
* emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
* unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
* unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
|
| |
|
| |
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The third one is never used, and the last two are always passed as zero.
* src/emacs.c (unexec): Add declaration.
(Fdump_emacs): Only pass the first two arguments to unexec.
Simplify #ifdef.
* src/unexw32.c (unexec):
* src/unexsol.c (unexec):
* src/unexhp9k800.c (unexec):
* src/unexcw.c (unexec): Remove the last 3 arguments, unused.
* src/unexelf.c (unexec): Remove the last 3 arguments, unused.
(find_section): Use const.
* src/unexmacosx.c (unexec): Remove the last 3 arguments, unused.
(unexec_error): Declare it NO_RETURN.
* src/unexcoff.c (make_hdr): Assume bss_start is always zero, remove
it as an argument, remove data_start and entry_address arguments, unused.
(unexec): Remove bss_start, data_start and
entry_address arguments.
* src/unexaix.c (make_hdr): Assume bss_start is always zero, remove
it as an argument, remove data_start and entry_address arguments, unused.
(unexec): Remove bss_start, data_start and
entry_address arguments.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
2001).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
`verbose'; print diagnostic messages only if it is non-zero. All
callers changed to pass a zero value unless DEBUG_DUMP is defined
in the environment.
(copy_executable_and_dump_data): Print section names with %.8s.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(PTR_TO_OFFSET): Cast ptr to unsigned char *.
(relocate_offset):
(get_section_info):
(copy_executable_and_dump_data): Remove unnecessary static defs.
(copy_executable_and_dump_data): Fix compile warnings.
(unexec): Ignore old_name, and use the actual location
of the current executable instead. Base new_name on this.
|
|
|
|
| |
as possible to be dumped, for safety.
|
|
|
|
|
| |
section if we can put Emacs' initialized data in a separate
section, otherwise use the my_begdata/my_edata method.
|
|
|
|
|
| |
(copy_executable_and_dump_data): Use it to ensure alignment slop
is zeroed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
static "bss" section is used for heap space during preload, and
bss data is now written to the proper section area when dumping.
(need_to_recreate_heap): Renamed to using_dynamic_heap.
(heap_index_in_executable): Obsolete variable removed.
(data_section): New variable.
(data_start_va): Renamed to data_start.
(data_start_file): Obsolete variable removed.
(bss_section):
(extra_bss_size):
(bss_section_static):
(bss_start_static):
(bss_size_static):
(extra_bss_size_static):
(heap_section): New variables.
(_start): Remove code based on old unexec method. Call init_heap
to initialize sbrk heap.
(close_file_data): Update size of file when closing, so that
unexec doesn't have to work out exact size in advance.
(get_bss_info_from_map_file):
(get_section_size): Obsolete functions removed.
(rva_to_section): Fix minor bug, and add a work-around for a bug
in very old linkers.
(offset_to_section):
(relocate_offset): New functions.
(OFFSET_TO_RVA):
(RVA_TO_OFFSET):
(RVA_TO_SECTION_OFFSET):
(PTR_TO_RVA):
(PTR_TO_OFFSET):
(OFFSET_TO_PTR): New macros.
(get_section_info): Modify to support new unexec method;
determines address ranges in process that need dumping, and COFF
sections where data will be dumped. Allows for static and global
bss data to be in separate ranges. No longer relies on knowledge
of section names.
(copy_executable_and_dump_data_section): Renamed
copy_executable_and_dump_data. Completely rewritten to copy
executable section by section, so that raw data areas can be
expanded to hold dumped data as necessary. Allows for bss data to
be in same section as initialized data. Reduces size of static
heap section to that used during preload.
(dump_bss_and_heap):
(w32_fatal_reload_error):
(read_in_bss):
(map_in_heap): Obsolete functions removed.
(unexec): Rounds off preload heap to nearest page rather than
virtual allocation unit. Modified to match other changes.
|
|
|
|
| |
without prompting.
|
| |
|
|
|
|
|
|
|
|
| |
(get_bss_info_from_map_file): Only define if SEPARATE_BSS_SECTION.
(get_section_info): Use my_begbss_static, my_endbss_static to
determine bounds of bss.
(w32_fatal_reload_error): New function.
(read_in_bss, map_in_heap): Invoke w32_fatal_reload_error upon error.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Declare extern data and functions.
(file_data): Move definition from w32heap.c.
(_start): Add debug hook for when profiling.
Spoof executable name when using profilers.
Invoke sbrk immediately when undumped.
(unexec): Print error messages when input and output dump files
cannot be opened.
Reset header checksum.
(open_input_file, open_output_file): Return status instead of aborting.
(get_section_size): Handle different linkers.
(find_section, rva_to_section): New functions.
(get_section_info) [SEPARATE_BSS_SECTION]: Make code for using
a separate .bss section conditional.
Use my_begbss and my_endbss to determine .bss size by default.
Look for Emacs data in EMDATA section.
|