1. 01 Jan, 2019 1 commit
  2. 01 Jan, 2018 1 commit
  3. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  4. 01 Jan, 2017 1 commit
  5. 17 Sep, 2016 1 commit
    • Paul Eggert's avatar
      Port January __morecore changes to AIX 7.1 · 7fa96cb5
      Paul Eggert authored
      * src/vm-limit.c (__MALLOC_HOOK_VOLATILE, __morecore)
      (__after_morecore_hook):
      * src/ralloc.c (__morecore):
      Declare if DOUG_LEA_MALLOC is not defined, not if HAVE_MALLOC_H is
      not defined.  <malloc.h> does not declare these in AIX 7.1.
      7fa96cb5
  6. 22 Jun, 2016 1 commit
    • Paul Eggert's avatar
      Improve --without-x GCC pacification · 1c019905
      Paul Eggert authored
      * src/composite.c (autocmp_chars):
      * src/conf_post.h (DebPrint) [HAVE_NTGUI && !DebPrint && !EMACSDEBUG]:
      Use simpler ((void) 0) for no-op expression returning void.
      * src/dispextern.h [HAVE_WINDOW_SYSTEM]:
      Include fontset.h, for face_for_char.
      (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_FOR_CHAR):
      Now inline functions instead of macros.  This avoids the need for
      all those casts to void.
      (FACE_SUITABLE_FOR_ASCII_CHAR_P): Omit 2nd (unused) arg.
      All uses changed.
      * src/frame.c (Ficonify_frame, Fset_frame_position):
      * src/xdisp.c (Fmove_point_visually, show_mouse_face):
      * src/xdisp.c (note_mode_line_or_margin_highlight)
      (note_mouse_highlight):
      Assume HAVE_WINDOW_SYSTEM for simplicity, since the code should
      now work either way without generating warnings.
      * src/frame.c (display_available) [HAVE_WINDOW_SYSTEM]: New function.
      (window_system_available) [HAVE_WINDOW_SYSTEM]: Move to frame.h.
      (decode_window_system_frame): Use check_window_system instead of
      rolling the code ourself.  Return needed only if HAVE_WINDOW_SYSTEM.
      (decode_window_system_frame, check_window_system):
      Merge the HAVE_WINDOW_SYSTEM and !HAVE_WINDOW_SYSTEM versions into one.
      * src/frame.c (Ficonify_frame, Fset_frame_position):
      * src/xdisp.c (show_mouse_face, define_frame_cursor1)
      (note_mouse_highlight):
      Narrow the scope of the HAVE_WINDOW_SYSTEM #ifdef;
      this is a better way to pacify GCC.
      * src/xdisp.c (x_set_left_fringe, x_set_right_fringe)
      (x_set_right_divider_width, x_set_bottom_divider_width):
      * src/xfns.c (x_set_internal_border_width):
      Don’t use what are now function calls as lvalues.
      * src/frame.h (WINDOW_SYSTEM_RETURN): New macro.
      (decode_window_system_frame, check_window_system):
      Use it, to avoid the need for duplicate declarations.
      (window_system_available): Now an inline function.
      (display_available): New decl.
      (frame_dimension): New inline function.
      (FRAME_FRINGE_COLS, FRAME_LEFT_FRINGE_WIDTH)
      (FRAME_RIGHT_FRINGE_WIDTH, FRAME_TOTAL_FRINGE_WIDTH)
      (FRAME_INTERNAL_BORDER_WIDTH, FRAME_RIGHT_DIVIDER_WIDTH)
      (FRAME_BOTTOM_DIVIDER_WIDTH):
      Use it, to avoid the need for duplicate definitions.
      Now inline functions instead of macros.
      * src/gnutls.c (gnutls_log_function2i): Remove.
      * src/gnutls.h (GNUTLS_LOG2i): Use ‘message’ directly.
      This avoids complaints about gnutls_log_function2i being defined
      and not used on older platforms that do not need to call GNUTLS_LOG2i.
      * src/image.c (DefaultDepthOfScreen) [0]: Remove unused macro.
      * src/lisp.h (AUTO_STRING_WITH_LEN): Revert change from ‘type id =
      expr’ to ‘type id; id = expr’, as this would suppress valid
      jump-misses-init diagnostics.  Let’s find a better way to address
      the problem.
      * src/vm-limit.c (__MALLOC_HOOK_VOLATILE):
      Define only if needed.
      * src/xdisp.c (handle_single_display_spec):
      Simplify fringe_bitmap computation.
      (define_frame_cursor1): Do nothing unless in a window system.
      All callers changed and simplified.
      * src/xfaces.c (realize_default_face):
      Use a simpler way to pacify GCC when a return value is not used
      on some platforms.
      1c019905
  7. 10 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Rework C source files to avoid ^( · 7352c6c6
      Paul Eggert authored
      Work around Bug#22884 by rewording comments and strings to avoid ‘(’
      at the start of a line unless it starts a function.  This change
      is a short-term hack; in the longer run we plan to fix cc-mode’s
      performance for C files that have ‘(’ at the start of a line in a
      comment or string.
      7352c6c6
  8. 30 Jan, 2016 1 commit
    • Paul Eggert's avatar
      Include <malloc.h> when advisable · a4817d83
      Paul Eggert authored
      This should help insulate us better from future glibc changes.
      It is good hygiene to include .h files for APIs that Emacs uses.
      Fix type clashes between Emacs and GNU <malloc.h> (Bug#22086).
      * configure.ac: Check for malloc.h.
      * src/alloc.c: Include <malloc.h> depending on HAVE_MALLOC_H,
      not on DOUG_LEA_MALLOC.
      * src/emacs.c, src/gmalloc.c (malloc_enable_thread):
      Remove decl (now in lisp.h).
      * src/gmalloc.c: Include stddef.h earlier, for ptrdiff_t.
      [emacs]: Include lisp.h.
      [HAVE_MALLOC_H]: Include <malloc.h>.
      (__MALLOC_HOOK_VOLATILE): New macro, if not already defined.
      (__after_morecore_hook, __malloc_initialize_hook, __morecore)
      (__default_morecore):
      [!HAVE_MALLOC_H]: New decls near non-inclusion of <malloc.h>.
      (calloc): Make it clear that the macro should not be used.
      Remove unused decl.
      (malloc_info): New macro, to avoid clash with glibc <malloc.h>.
      (__morecore, __default_morecore, __after_morecore_hook)
      (__malloc_extra_blocks, __malloc_initialize_hook, __free_hook)
      (__malloc_hook, __realloc_hook, __memalign_hook, memory_warnings):
      Remove later decls.
      (gmalloc_hook, gfree_hook, grealloc_hook):
      Rename from __malloc_hook, __free_hook, __realloc_hook to
      avoid type collision with glibc <malloc.h>.  All uses changed.
      (gmalloc_hook):
      (__malloc_extra_blocks) [DOUG_LEA_MALLOC||HYBRID_MALLOC||SYSTEM_MALLOC]:
      Now static.
      (gmalloc_hook, __malloc_extra_blocks): Define even if [!HYBRID_MALLOC].
      (__malloc_initialize_hook, __after_morecore_hook):
      Declare with types compatible with glibc.
      (__memalign_hook, hybrid_calloc) [HYBRID_MALLOC]:
      Remove.  All uses removed.
      * src/lisp.h (__malloc_extra_blocks, malloc_enable_thread): New decls.
      * src/ralloc.c, src/vm-limit.c:
      Simplify includes and include <malloc.h> if available.
      a4817d83
  9. 01 Jan, 2016 1 commit
  10. 16 Sep, 2015 1 commit
    • Paul Eggert's avatar
      Add -Wswitch to --enable-gcc-warnings · 8865587c
      Paul Eggert authored
      Make --enable-gcc-warnings a bit pickier, by also using -Wswitch.
      * configure.ac (WERROR_CFLAGS): Don’t add -Wno-switch.
      * lib-src/etags.c (main, consider_token, C_entries):
      * src/coding.c (encode_invocation_designation):
      * src/data.c (Ftype_of):
      * src/eval.c (Fdefvaralias, default_toplevel_binding)
      (Fbacktrace__locals, mark_specpdl):
      * src/lisp.h (record_xmalloc):
      * src/syntax.c (scan_lists, scan_sexps_forward):
      * src/window.c (window_relative_x_coord):
      * src/xdisp.c (push_it, pop_it):
      * src/xterm.c (xg_scroll_callback, x_check_fullscreen):
      Error out or do nothing (as appropriate) if a switch statement
      with an enum value does not cover all of the enum.
      * src/dispextern.h (struct iterator_stack_entry.u.comp):
      Remove unused member discovered by using -Wswitch.
      * src/lisp.h (record_xmalloc): Add a ‘+ 0’ to pacify -Wswitch.
      * src/vm-limit.c (check_memory_limits):
      Simplify warning-diagnostic computation by using a table.
      8865587c
  11. 01 Jan, 2015 2 commits
  12. 01 Sep, 2014 1 commit
    • Paul Eggert's avatar
      Clean up extern decls a bit. · 1564080f
      Paul Eggert authored
      * configure.ac (WERROR_CFLAGS): Don't disable -Wnested-externs.
      While we're at it, don't disable -Wlogical-op either.
      * src/bytecode.c: Include blockinput.h and keyboard.h rather
      than rolling their APIs by hand.
      * src/emacs.c: Include regex.h and rely on its and lisp.h's API
      rather than rolling them by hand.
      * src/lastfile.c: Include lisp.h, to check this file's API.
      * src/lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
      New decls.
      * src/regex.h (re_max_failures): New decl.
      * src/unexcw.c, src/unexmacosx.c, src/unexw32.c:
      Rely on lisp.h's API rather than rolling it by hand.
      * src/vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
      Declare at top level, to pacify GCC -Wnested-externs.
      1564080f
  13. 11 Jul, 2014 1 commit
    • Eli Zaretskii's avatar
      Implement memory-info for MS-DOS. · 5f7c30e7
      Eli Zaretskii authored
       src/dosfns.c (dos_memory_info): New function.
       src/dosfns.h (dos_memory_info): Add prototype.
       src/alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info.
       src/vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead
       of doing some of its job.
      5f7c30e7
  14. 16 Apr, 2014 1 commit
    • Paul Eggert's avatar
      Remove DATA_SEG_BITS. · 5403b2d3
      Paul Eggert authored
      The DATA_SEG_BITS hack was needed for older 32 bit platforms.
      As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
      cc, but that platform is so old that SGI itself stopped supporting
      it in December 2013.  If you still need Emacs on IRIX, please
      either compile with GCC and port the undumping code, or run
      './configure --with-wide-int'.
      * configure.ac (DATA_SEG_BITS): Remove.  All uses removed.
      * src/alloc.c (gdb_make_enums_visible): Update to match lisp.h.
      * src/lisp.h (GCTYPEBITS): Move definition up, and switch to the
      DEFINE_GDB_SYMBOL_START way to define it.
      (NONPOINTER_BITS): New macro.
      (EMACS_INT): Use it.
      [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
      the problem and/or configuring --with-wide-int.
      (USE_LSB_TAG): Simplify, based on above changes.
      (gdb_DATA_SEG_BITS): Remove.  All uses removed.
      * src/vm-limit.c (exceeds_lisp_ptr): Remove.  All uses removed.
      5403b2d3
  15. 01 Jan, 2014 1 commit
  16. 25 Feb, 2013 1 commit
    • Paul Eggert's avatar
      Simplify data_start configuration. · 1ddc2bd6
      Paul Eggert authored
      This is a followon simplification to the fix for Bug#13650.
      * admin/CPP-DEFINES (DATA_START, ORDINARY_LINK): Remove.
      * configure.ac (CRT_DIR, LIB_STANDARD, START_FILES, DATA_START)
      (LD_FIRSTFLAG, ORDINARY_LINK, LIB_GCC): Remove.
      (AC_CHECK_HEADERS_ONCE): Remove sys/resource.h, as it's
      not always needed.
      (HAVE_DATA_START): New macro.
      * etc/PROBLEMS (LIBS_SYSTEM, LIBS_MACHINE, LIBS_STANDARD): Remove.
      Remove legacy-systems section, as this stuff is no longer
      applicable with current linking strategies.
      * src/Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
      (START_FILES): Remove.  All uses removed.
      (otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
      (ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
      (buildobj.h): Use it.
      ($(ALLOBJS)): Depend on globals.h.
      (temacs$(EXEEXT)): Use $(ALLOBJS).
      * src/autodeps.mk (ALLOBJS): Move to Makefile.in.
      * src/deps.mk (vm-limit.o):
      * src/makefile.w32-in ($(BLD)/vm-limit.$(O)):
      Do not depend on mem-limits.h.
      * src/emacs.c (__do_global_ctors, __do_global_ctors_aux)
      (__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
      [__GNUC__ && !ORDINARY_LINK]: Remove.
      * src/mem-limits.h, src/pre-crt0.c: Remove.
      * src/unexaix.c, src/unexcoff.c: Don't include mem-limits.h.
      * src/unexcoff.c (etext): New decl.
      (make_hdr): Use it instead of start_of_data.
      * src/vm-limit.c: Move most of mem-limits.h's contents here.
      (data_start): New decl.  It's OK if this is approximate,
      so simplify-away some unnecessary exactness.
      (POINTER): Remove; all uses removed.
      (data_space_start): Now char *, to avoid casts.
      (exceeds_lisp_ptr): New function, replacing the old
      EXCEEDS_LISP_PTR macro.  All uses changed.
      (check_memory_limits): Simplify and remove casts.
      (start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
      (memory_warnings): Use data_start instead of start_of_data.
      
      Fixes: debbugs:13783
      1ddc2bd6
  17. 22 Feb, 2013 1 commit
    • Paul Eggert's avatar
      Assume C89 or better. · fcee5028
      Paul Eggert authored
      * ralloc.c (SIZE, POINTER, NIL):
      * vm-limit.c (POINTER):
      Remove, replacing all uses with C89 equivalents.  These old
      symbols were present only for porting to pre-C89 platforms.
      fcee5028
  18. 01 Jan, 2013 1 commit
  19. 08 Dec, 2012 1 commit
    • Paul Eggert's avatar
      Simplify get_lim_data. · 7be78020
      Paul Eggert authored
      * admin/CPP-DEFINES (ULIMIT_BREAK_VALUE): Remove.
      * configure.ac (ULIMIT_BREAK_VALUE): Remove.
      * src/vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
      Remove USG and vlimit methods; no longer used these days.
      Add #error catchall just in case.
      7be78020
  20. 17 Oct, 2012 1 commit
    • Eli Zaretskii's avatar
      Fix warnings when compiling on MS-Windows with -std=gnu99. · a68089e4
      Eli Zaretskii authored
       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.
      a68089e4
  21. 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
  22. 15 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Port better to POSIX hosts lacking _setjmp. · 0328b6de
      Paul Eggert authored
      * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
      (_setjmp, _longjmp): Remove.
      * src/lisp.h: Include <setjmp.h> here, since we use its symbols here.
      All instances of '#include <setjmp.h>' removed, if the
      only reason for the instance was because "lisp.h" was included.
      (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
      Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
      and _longjmp with the new symbols.  Emacs already uses _setjmp if
      available, so this change affects only POSIXish hosts that have
      sigsetjmp but not _setjmp, such as some versions of Solaris and
      Unixware.  (Also, POSIX-2008 marks _setjmp as obsolescent.)
      * src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
      (png_load_body) [HAVE_PNG]:
      (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
      (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
      Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
      since PNG requires jmp_buf.  This is the only exception to the
      general rule that we now use sys_setjmp and sys_longjmp.
      This exception is OK since this code does not change the signal
      mask or longjmp out of a signal handler.
      
      Fixes: debbugs:12446
      0328b6de
  23. 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
  24. 21 May, 2012 1 commit
    • Paul Eggert's avatar
      Assume C89 or later. · 261cb4bb
      Paul Eggert authored
      * configure.in (AC_C_PROTOTYPES, AC_C_VOLATILE, AC_C_CONST)
      (POINTER_TYPE, PROTOTYPES): Remove.
      * admin/CPP-DEFINES: Remove NULL, const.
      * lib-src/etags.c (static, const): Remove macros.
      (PTR): Remove; all uses replaced with void *.  Omit needless casts.
      * src/alloc.c, src/buffer.c, lisp.h: Replace POINTER_TYPE with void.
      * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
      (xrealloc):
      * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
      * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
      * textprop.c, tparam.c (NULL): Remove.
      * ralloc.c, vm-limit.c (POINTER): Assume void * works.
      * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
      * regex.h (_RE_ARGS): Remove.  All uses rewritten to use prototypes.
      * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
      * xterm.c (input_signal_count): Assume volatile works.
      261cb4bb
  25. 11 Jan, 2012 1 commit
  26. 05 Jan, 2012 1 commit
  27. 09 Sep, 2011 1 commit
  28. 14 Jun, 2011 1 commit
  29. 25 Jan, 2011 1 commit
  30. 15 Jan, 2011 1 commit
  31. 02 Jan, 2011 1 commit
  32. 10 Oct, 2010 1 commit
  33. 29 Jul, 2010 2 commits
  34. 25 Jul, 2010 3 commits
    • Ken Brown's avatar
    • Ken Brown's avatar
      Cygwin build cleanup (Bug#6715). · 24933075
      Ken Brown authored
      * mem-limits.h (BSD4_2) [cygwin]: Don't define here; instead...
      * vm-limit.c: ...add 'defined (CYGWIN)' here.
      24933075
    • Juanma Barranquero's avatar
      Make building under stricter warning flags somewhat cleaner. · 361358ea
      Juanma Barranquero authored
      Flags used: -Wold-style-declaration -Wunused-function -Wstrict-prototypes
      
      * lib-src/emacsclient.c (getcwd, w32_getenv):
      * lib-src/ntlib.h (getlogin, getuid, getegid, getgid): Fix prototypes.
      
      * nt/runemacs.c (set_user_model_id): Fix prototype.
      
      * src/callproc.c (relocate_fd): Set inside #ifndef WINDOWSNT.
      * src/dired.c (opendir, readdir): Fix prototypes.
      * src/editfns.c (w32_get_internal_run_time): Fix prototypes.
      * src/keyboard.c (input_available_signal): Declare inside #ifdef SIGIO.
      * src/ndir.h (opendir, readdir, seekdir, closedir): Fix prototypes.
        (telldir): Remove declaration.
      * src/ralloc.c (real_morecore, __morecore): Fix prototypes.
      * src/sound.c (alsa_sound_perror): Declare inside #ifdef HAVE_ALSA.
      * src/syssignal.h (strsignal): Fix prototype.
      * src/term.c (tparam): Fix prototype.
        (term_get_fkeys_address, term_get_fkeys_kboard, term_get_fkeys_1)
        (term_get_fkeys): Set inside "#ifndef DOS_NT".
      * src/vm-limit.c (check_memory_limits): Fix prototypes of real_morecore
        and __morecore.
      * src/w32gui.h (XParseGeometry): Fix prototype.
      * src/w32heap.h (get_data_start, get_data_end, init_heap): Fix prototypes.
      * src/w32term.c (my_set_focus): Declare inside #if 0.
      * src/w32term.h (x_window_to_frame, x_display_info_for_name, w32_term_init)
        (w32_fill_rect, w32_clear_window, init_crit, delete_crit, signal_quit)
        (drain_message_queue, get_next_msg, post_msg, parse_button)
        (ClipboardSequence_Proc): Fix prototypes.
        (wait_for_sync): Remove declaration.
      361358ea
  35. 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
  36. 11 Jul, 2010 1 commit
    • Andreas Schwab's avatar
      Constify functions taking char * · a8fe7202
      Andreas Schwab authored
      * alloc.c (pending_malloc_warning, malloc_warning): Add const.
      * callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
      (egetenv): Likewise.
      * doprnt.c (doprnt): Likewise.
      * editfns.c (set_time_zone_rule, format2): Likewise.
      * emacs.c (decode_env_path): Likewise.
      * eval.c (signal_error, error): Likewise.
      * insdel.c (replace_range_2): Likewise.
      * keyboard.c (cmd_error_internal): Likewise.
      * lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
      * print.c (write_string, write_string_1, print_error_message):
      Likewise.
      * vm-limit.c (warn_function, memory_warnings): Likewise.
      * xdisp.c (message1, message1_nolog, message_with_string)
      (vmessage, message, message_nolog): Likewise.
      * emacs.c: Remove duplicate declaration.
      * keyboard.h: Likewise.
      * lisp.h: Update prototypes.
      a8fe7202