1. 17 Oct, 2012 1 commit
  2. 08 Oct, 2012 2 commits
  3. 01 Oct, 2012 1 commit
  4. 30 Sep, 2012 1 commit
    • Fabrice Popineau's avatar
      Support x64 build on MS-Windows with MSVC. · 62aba0d4
      Fabrice Popineau authored
       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.
      62aba0d4
  5. 26 Sep, 2012 2 commits
  6. 17 Sep, 2012 1 commit
    • Glenn Morris's avatar
      Reduce the number of versioned files storing the short copyright string · 78f83752
      Glenn Morris authored
      * configure.ac (copyright): New output variable.
      (COPYRIGHT): New AC_DEFINE.
      
      * admin/admin.el (set-copyright): No more need to set copyrights for
      nextstep, or .c files.  Add configure.ac and config.nt.
      
      * lib-src/ebrowse.c (version):
      * lib-src/etags.c (print_version): Use COPYRIGHT.
      
      * nextstep/templates/Info-gnustep.plist.in:
      * nextstep/templates/InfoPlist.strings.in:
      * nextstep/templates/Info.plist.in: Let configure set copyright.
      
      * nt/config.nt (COPYRIGHT): New.
      
      * src/emacs.c: Use COPYRIGHT.
      78f83752
  7. 11 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Prefer assignment to memcpy when either will do. · ae1d87e2
      Paul Eggert authored
      * lib-src/pop.c (socket_connection) [HAVE_GETADDRINFO]:
      * src/bidi.c (bidi_push_it, bidi_pop_it):
      * src/fns.c (copy_hash_table):
      * src/image.c (define_image_type):
      * src/keyboard.c (kbd_buffer_store_event_hold):
      * src/process.c (Fprocess_send_eof):
      * src/xfaces.c (x_create_gc) [HAVE_NS]:
      * src/xgselect.c (xg_select):
      Use assignment, not memcpy, as either will do here, and assignment is
      more likely to catch type errors.
      ae1d87e2
  8. 31 Aug, 2012 1 commit
  9. 24 Aug, 2012 1 commit
  10. 20 Aug, 2012 1 commit
  11. 19 Aug, 2012 1 commit
    • Paul Eggert's avatar
      Rely on <unistd.h> to declare 'environ', · b69a6d22
      Paul Eggert authored
      as gnulib does this if the system doesn't.
      * lib-src/emacsclient.c (environ): Remove decl.
      * src/callproc.c, src/editfns.c, src/process.c (environ) [!USE_CRT_DLL]:
      * src/emacs.c (environ) [DOUG_LEA_MALLOC]:
      * src/vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
      * src/vm-limit.c: Include <unistd.h>, for 'environ'.
      b69a6d22
  12. 17 Aug, 2012 1 commit
  13. 15 Aug, 2012 2 commits
  14. 14 Aug, 2012 1 commit
    • Paul Eggert's avatar
      Use bool for Emacs Lisp booleans. · f5d9e83a
      Paul Eggert authored
      This is more natural, and on my platform (GCC 4.7.1 x86-64) it
      makes Emacs's text size .03% smaller and presumably a bit faster.
      * admin/merge-gnulib (GNULIB_MODULES): Add stdbool.  This documents a
      new direct dependency; stdbool was already being used indirectly
      via other gnulib modules.
      * lib-src/make-docfile.c (enum global_type): Sort values roughly in
      decreasing alignment, except put functions last.
      (compare_globals): Use this new property of enum global_type.
      (write_globals): Use bool, not int, for booleans.
      * src/lisp.h: Include <stdbool.h>.
      (struct Lisp_Boolfwd, defvar_bool):
      * src/lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
      * src/regex.c [!emacs]: Include <stdbool.h>.
      (false, true): Remove; <stdbool.h> does this for us now.
      f5d9e83a
  15. 10 Aug, 2012 3 commits
    • Glenn Morris's avatar
      Move IF_LINT from lisp.h to conf_post.h · 25e65510
      Glenn Morris authored
      * src/conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
      * src/lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
      
      * lib-src/make-docfile.c (IF_LINT):
      * lib-src/emacsclient.c (IF_LINT): Remove (in config.h now).
      25e65510
    • Glenn Morris's avatar
      Remove some make-docfile.c undes that are no longer needed · 9748df5d
      Glenn Morris authored
      * lib-src/make-docfile.c (main):
      (fopen) [!WINDOWSNT]:
      (chdir) [!DOS_NT]: No more need to undef.
      9748df5d
    • Glenn Morris's avatar
      Move DIRECTORY_SEP from lisp.h to config.h · 9374581a
      Glenn Morris authored
      * configure.ac (DIRECTORY_SEP): Move here from src/lisp.h.
      
      * src/lisp.h (DIRECTORY_SEP): Let configure set it.
      
      * nt/config.nt (DIRECTORY_SEP): Move here from src/lisp.h.
      
      * lib-src/movemail.c (DIRECTORY_SEP, IS_DIRECTORY_SEP):
      * lib-src/make-docfile.c (DIRECTORY_SEP, IS_DIRECTORY_SEP):
      * lib-src/emacsclient.c (DIRECTORY_SEP, IS_DIRECTORY_SEP, IS_DEVICE_SEP):
      Remove (they are in config.h now).
      9374581a
  16. 09 Aug, 2012 1 commit
  17. 03 Aug, 2012 2 commits
    • Juanma Barranquero's avatar
      * nt/config.nt: Sync with autogen/config.in. · 3fbc4b54
      Juanma Barranquero authored
      (DOS_NT, MSDOS): New macros.
      (WRETCODE, wait3): Remove.
      
      * nt/inc/ms-w32.h (DOS_NT): Remove; defined in config.nt.
      
      * lib-src/makefile.w32-in (LOCAL_FLAGS): Remove WINDOWSNT and DOS_NT,
      they are always defined in config.h.
      3fbc4b54
    • Eli Zaretskii's avatar
      Support symlinks on latest versions of MS-Windows. · 6dad7178
      Eli Zaretskii authored
       src/w32.c: Include winioctl.h and aclapi.h.
       (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
       (revert_to_self): Forward declarations of static functions.
       <static BOOL g_b_init_get_security_info>:
       <g_b_init_create_symbolic_link>: New static flags.
       (globals_of_w32): Initialize them to zero.
       (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
       (map_w32_filename): Improve commentary.  Simplify switch.
       (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
       headers (most versions of MinGW w32api don't).
       (get_security_info, create_symbolic_link)
       (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
       New functions.
       (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
       in the argument file name.
       (sys_access): Call unc_volume_file_attributes only if
       GetFileAttributes fails with network-related error codes.
       (sys_rename): Diagnose renaming of a symlink when the user doesn't
       have the required privileges.
       (get_file_security_desc_by_name): Renamed from
       get_file_security_desc.
       (stat_worker): New function, with most of the guts of 'stat', and
       with addition of handling of symlinks and support for 'lstat'.  If
       possible, get file's attributes and security information by
       handle, not by name.  Produce S_IFLNK bit for symlinks, when
       called from 'lstat'.
       (stat, lstat): New functions, call 'stat_worker'.
       (symlink, readlink, careadlinkat): Rewritten to create and resolve
       symlinks when the underlying filesystem supports them.
      
       lib/src/ntlib.c (lstat): New function, calls 'stat'.
      
       nt/inc/sys/stat.h (S_IFLNK): Define.
       (S_ISLNK): A non-trivial definition.
       (lstat): Prototype instead of a macro that redirects to 'stat'.
      
       lisp/files.el (file-truename): Don't skip symlink-chasing part on
       windows-nt.  Incorporate the resolution of 8+3 short aliases on
       Windows into the loop that recursively chases symlinks.  Compare
       directory and its parent case-insensitively on MS-Windows and
       MS-DOS.
      
       etc/NEWS: Announce the symlink support on MS-Windows.
      6dad7178
  18. 02 Aug, 2012 2 commits
    • Paul Eggert's avatar
      Use C99-style 'extern inline' if available. · f162bcc3
      Paul Eggert authored
      * lib-src/profile.c (SYSTIME_INLINE): Define.
      * nt/config.nt: Sync with autogen/config.in.
      (_GL_INLINE, _GL_EXTERN_INLINE, _GL_INLINE_HEADER_BEGIN)
      (_GL_INLINE_HEADER_END): New macros.
      * src/buffer.h (BUFFER_INLINE):
      * src/category.h (CATEGORY_INLINE):
      * src/character.h (CHARACTER_INLINE):
      * src/charset.h (CHARSET_INLINE):
      * src/composite.h (COMPOSITE_INLINE):
      * src/dispextern.h (DISPEXTERN_INLINE):
      * src/lisp.h (LISP_INLINE):
      * src/systime.h (SYSTIME_INLINE):
      New macro, replacing 'static inline' in this header.
      * src/buffer.h, src/category.h, src/character.h, src/charset.h:
      * src/composite.h, src/dispextern.h, lisp.h, systime.h:
      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
      * src/alloc.c (LISP_INLINE):
      * src/buffer.c (BUFFER_INLINE):
      * src/category.c (CATEGORY_INLINE):
      * src/character.c (CHARACTER_INLINE):
      * src/charset.c (CHARSET_INLINE):
      * src/composite.c (COMPOSITE_INLINE):
      * src/dispnew.c (DISPEXTERN_INLINE):
      * src/sysdep.c (SYSTIME_INLINE):
      Define to EXTERN_INLINE, so that the corresponding functions
      are compiled into code.
      * src/conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
      (INLINE_HEADER_END): New macros.
      * src/lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
      since it's used in non-static inline functions now.
      f162bcc3
    • Glenn Morris's avatar
      Move NT-specific include file to the NT include directory · 837b365b
      Glenn Morris authored
      * nt/inc/ms-w32.h: Move here from ../src/s.
      * nt/config.nt (config_opsysfile): Change to <ms-w32.h>.
      
      * s/ms-w32.h: Move to ../nt/inc.
      * src/makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
      Update for new ms-w32.h location.
      
      * lib-src/makefile.w32-in (MS_W32_H): Update for new ms-w32.h location.
      
      * lib/makefile.w32-in (MS_W32_H): Update for new ms-w32.h location.
      
      * lisp/emacs-lisp/authors.el (authors-renamed-files-alist): Add ms-w32.h.
      837b365b
  19. 01 Aug, 2012 2 commits
    • Glenn Morris's avatar
      Update lib-src config.h dependencies · de7de872
      Glenn Morris authored
      * lib-src/Makefile.in (config_h): New variable.
      Use throughout in place of ../src/config.h.
      de7de872
    • Juanma Barranquero's avatar
      Adapt Windows port to recent changes in autogen/config.in. · 552a99b4
      Juanma Barranquero authored
      * lib-src/makefile.w32-in (CONFIG_H): Update dependencies.
      (CONF_POST_H): New macro.
      
      * lib/makefile.w32-in (CONFIG_H): Update dependencies.
      (CONF_POST_H): New macro.
      
      * nt/config.nt: Sync with autogen/config.in.
      Remove code moved to conf_post.h and include <conf_post.h>
      (NULL_DEVICE, SEPCHAR, SIGNAL_H_AHB, TIOCSIGSEND, USER_FULL_NAME)
      (USG5_4, WRETCODE, _longjmp, _setjmp, wait3): New macros.
      
      * src/makefile.w32-in (CONFIG_H): Update dependencies.
      (CONF_POST_H): New macro.
      
      * src/s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
      552a99b4
  20. 30 Jul, 2012 1 commit
  21. 29 Jul, 2012 1 commit
  22. 12 Jul, 2012 1 commit
  23. 11 Jul, 2012 2 commits
  24. 10 Jul, 2012 2 commits
    • Paul Eggert's avatar
      EMACS_TIME simplification (Bug#11875). · e9a9ae03
      Paul Eggert authored
      This replaces macros (which typically do not work in GDB)
      with functions, typedefs and enums, making the code easier to debug.
      The functional style also makes code easier to read and maintain.
      * lib-src/profile.c (TV2): Remove no-longer-needed static var.
      * src/systime.h: Include <sys/time.h> on all hosts, not just if
      WINDOWSNT, since 'struct timeval' is needed in general.
      (EMACS_TIME): Now a typedef, not a macro.
      (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
      not macros.
      (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
      (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
      (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
      (EMACS_TIME_LE): Now functions, not macros.
      (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
      (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
      which are not functions.  All uses rewritten to use:
      (make_emacs_time): New function.
      (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
      (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
      not functions.  All uses rewritten to use the following, respectively:
      (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
      (add_emacs_time, sub_emacs_time): New functions.
      * src/atimer.c: Don't include <sys/time.h>,	as "systime.h" does this.
      * src/fileio.c (Fcopy_file):
      * src/xterm.c (XTflash): Get the current time closer to when it's used.
      * src/makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
      e9a9ae03
    • Paul Eggert's avatar
      e99a530f
  25. 09 Jul, 2012 4 commits
  26. 07 Jul, 2012 1 commit
    • Juanma Barranquero's avatar
      Update Windows port to gnulib changes in 2012-07-06T21:07:46Z!eggert@cs.ucla.edu. · 07adc2c6
      Juanma Barranquero authored
      * lib-src/makefile.w32-in ($(BLD)/ctags.$(O), $(BLD)/etags.$(O)):
      Update dependencies.
      
      * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/c-ctype.$(O),
      $(BLD)/c-strcasecmp.$(O) and $(BLD)/c-strncasecmp.$(O).
      ($(BLD)/c-ctype.$(O), $(BLD)/c-strcasecmp.$(O))
      ($(BLD)/c-strncasecmp.$(O)): New dependencies.
      
      * src/makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
      Update dependencies.
      
      * src/s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
      07adc2c6
  27. 06 Jul, 2012 1 commit