1. 26 Mar, 2013 1 commit
  2. 01 Jan, 2013 1 commit
  3. 17 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. 09 Aug, 2012 1 commit
  6. 03 Aug, 2012 1 commit
    • 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
  7. 11 Jan, 2012 1 commit
  8. 05 Jan, 2012 1 commit
  9. 23 Mar, 2011 1 commit
    • Juanma Barranquero's avatar
      w32: Fix some warnings reported by -Wall -Wextra. · 9c88f339
      Juanma Barranquero authored
      * lib-src/ntlib.c: Include <ctype.h>.
      
      * nt/cmdproxy.c: Include <ctype.h>.
        (make_absolute): Remove unused variable `i'.
      
      * src/w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
        (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
        (Fx_close_connection): Remove unused variable `i'.
      
      * src/w32font.c (w32font_draw): Return number of glyphs.
        (w32font_open_internal): Remove unused variable `i'.
        (w32font_driver): Add missing initializer.
      
      * src/w32menu.c (utf8to16): Remove unused variable `utf16'.
        (fill_in_menu): Remove unused variable `items_added'.
      
      * src/w32term.c (last_mouse_press_frame): Remove static global variable.
        (w32_clip_to_row): Remove unused variable `f'.
        (x_delete_terminal): Remove unused variable `i'.
      
      * src/w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
        (NOTHING): Remove unused static global variable.
        (uniscribe_check_otf): Remove unused variable `table'.
        (uniscribe_font_driver): Add missing initializers.
      9c88f339
  10. 29 Jan, 2011 1 commit
    • Eli Zaretskii's avatar
      Fix the MS-Windows build broken by 2011-01-17T19:01:01Z!eggert@cs.ucla.edu and... · f915f0f7
      Eli Zaretskii authored
      Fix the MS-Windows build broken by 2011-01-17T19:01:01Z!eggert@cs.ucla.edu and emacs-23/2010-05-21T19:51:48Z!acm@muc.de.
      
       lib/makefile.w32-in:
       lib/getopt_.h: New files.
       src/s/ms-w32.h (HAVE_MKTIME): Remove.
       src/makefile.w32-in (LOCAL_FLAGS): Add -I../lib.
       (GNULIB): New variable.
       (LIBS): Add $(GNULIB).
       $(TEMACS): Depend on $(GNULIB).
       <top-level>: Fix font-lock disrupted by a lone `"'.
       src/makefile.w32-in (LOCAL_FLAGS): Add -I../lib.
       (GETOPTOBJS, GETOPTDEPS): Remove targets.
       (MOVEMAILOBJS): Replace $(GETOPTOBJS) with ../lib/$(BLD)/libgnu.$(A).
       ($(BLD)/movemail.exe): Depend on ../lib/getopt.h.
       (ECLIENTOBJS, ETAGSOBJ, CTAGSOBJ, EBROWSEOBJ): Replace getopt.o
       and getopt1.o with ../lib/$(BLD)/libgnu.$(A).
       (clean): Don't remove getopt.h.
       (getopt.h, $(BLD)/getopt.$(O), $(BLD)/getopt1.$(O)): Remove targets.
       ($(BLD)/ctags.$(O), $(BLD)/etags.$(O)): Replace getopt.h with
       $(EMACS_ROOT)/lib/getopt.h.
       nt/makefile.w32-in (all-other-dirs-nmake, all-other-dirs-gmake)
       (bootstrap-nmake, bootstrap-gmake, bootstrap-clean-nmake)
       (bootstrap-clean-gmake, clean-other-dirs-nmake)
       (clean-other-dirs-gmake, cleanall-other-dirs-nmake)
       (cleanall-other-dirs-gmake, distclean-other-dirs-nmake)
       (distclean-other-dirs-gmake, maintainer-clean-other-dirs-nmake)
       (maintainer-clean-other-dirs-gmake): Recurse into ../lib as well.
       nt/configure.bat: Create lib/makefile.
       nt/config.nt (HAVE_MKTIME, BROKEN_MKTIME): Remove.
       (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE_DECL_GETENV)
       (HAVE_DECL_LOCALTIME_R, HAVE_WCHAR_T, PACKAGE, VERSION, inline)
       (_GL_UNUSED, _UNUSED_PARAMETER_): Add definitions, for gnulib.
      f915f0f7
  11. 28 Jan, 2011 1 commit
  12. 25 Jan, 2011 1 commit
  13. 15 Jan, 2011 1 commit
  14. 02 Jan, 2011 1 commit
  15. 20 Jul, 2010 1 commit
    • Juanma Barranquero's avatar
      Convert some more functions to standard C. · 7c3320d8
      Juanma Barranquero authored
      * lib-src/emacsclient.c (get_current_dir_name, w32_get_resource)
        (w32_getenv, w32_set_user_model_id, w32_window_app, w32_execvp)
        (close_winsock, initialize_sockets, w32_find_emacs_process)
        (w32_give_focus):
      * lib-src/ntlib.c (getlogin, getuid, getgid, getegid):
      * nt/addpm.c (add_registry, main):
      * nt/cmdproxy.c (get_env_size):
      * nt/ddeclient.c (main):
      * nt/runemacs.c (set_user_model_id):
      * src/alloc.c (emacs_blocked_free, emacs_blocked_malloc)
        (emacs_blocked_realloc, uninterrupt_malloc):
      * src/fringe.c (w32_reset_fringes):
      * src/image.c (convert_mono_to_color_image, lookup_rgb_color)
        (init_color_table, XPutPixel, jpeg_resync_to_restart_wrapper):
      * src/sound.c (be2hs, do_play_sound):
      * src/vm-limit.c (get_lim_data, ret_lim_data):
      * src/w32term.c (x_free_frame_resources):
      * src/xfaces.c (x_create_gc, x_free_gc):
        Convert definitions to standard C.
      7c3320d8
  16. 03 Apr, 2010 2 commits
  17. 13 Jan, 2010 1 commit
  18. 21 Mar, 2009 1 commit
    • Eli Zaretskii's avatar
      inc/sys/stat.h (struct stat): Change the types of st_uid and st_gid to unsigned. · 22749e9a
      Eli Zaretskii authored
      inc/pwd.h (struct passwd): Change the types of pw_uid and pw_gid to unsigned.
      	  (getpwuid): Argument is now unsigned.
      	  uid_t is now unsigned.
      
      ntlib.c (setuid): Argument is now unsigned.
      	(getuid): Return value is now unsigned.
      	(getpwuid): Argument is now unsigned.
      	(fchown): UID and GID arguments are now unsigned.
      
      ntlib.h (fchown): UID and GID arguments are now unsigned.
      	(getuid): Return value is now unsigned.
      	(setuid): Argument is now unsigned.
      	(getpwuid): Remove prototype (it's declared in nt/inc/pwd.h).
      
      w32.c   (getpwuid): Change argument type to unsigned.
      	(struct w32_id): Change type of `rid' member to unsigned.
      	(w32_cached_id, w32_add_to_cache, get_name_and_id): Change type of
      	argument ID to unsigned.  All callers changed.
      	(getuid, geteuid, getgid, getegid): Change return type to unsigned.
      22749e9a
  19. 08 Jan, 2009 1 commit
  20. 09 May, 2008 2 commits
  21. 07 Jan, 2008 1 commit
  22. 25 Jul, 2007 1 commit
  23. 16 Jan, 2007 1 commit
  24. 06 Feb, 2006 1 commit
  25. 07 Aug, 2005 1 commit
  26. 04 Jul, 2005 1 commit
  27. 16 Apr, 2004 1 commit
  28. 08 Sep, 2003 1 commit
  29. 01 Sep, 2003 1 commit
  30. 04 Feb, 2003 1 commit
  31. 22 Aug, 2000 1 commit
  32. 30 May, 1998 1 commit
  33. 03 Sep, 1997 1 commit
  34. 15 Jul, 1996 1 commit
  35. 03 May, 1996 1 commit
    • Geoff Voelker's avatar
      Include ntlib.h. · 14f29224
      Geoff Voelker authored
      (nt_sleep): Rename to sleep.
      (getwd): Return directory.
      (getlogin, cuserid, getuid, setuid, getpwuid, getpass, fchown,
      sys_ctime, sys_fopen): New functions.
      14f29224
  36. 19 Mar, 1996 1 commit
  37. 15 Jan, 1996 1 commit
  38. 01 Nov, 1994 1 commit