summaryrefslogtreecommitdiff
path: root/lib-src/ntlib.h
Commit message (Collapse)AuthorAge
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Update copyright year to 2019Paul Eggert2019-01-01
| | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* Update copyright year to 2018Paul Eggert2018-01-01
| | | | Run admin/update-copyright.
* Prefer HTTPS to HTTP for gnu.orgPaul Eggert2017-09-29
| | | | | This catches some URLs I missed in my previous scan, or perhaps were added after the scan.
* Use Gnulib 'tempname' on MS-WindowsEli Zaretskii2017-08-12
| | | | | | | | | | | | | | | | | | | * lib-src/ntlib.h (mkdir, open): Remove redefinitions. They are now in nt/inc/ms-w32.h. * lib-src/ntlib.c (sys_mkdir, sys_open): New functions. (mkostemp): Remove. * src/w32.c (mkostemp): Remove. (sys_mkdir): Accept a second (unused) argument. * src/fileio.c (Fmake_directory_internal): Remove the WINDOWSNT specific call to mkdir. (Bug#28023) * nt/inc/ms-w32.h (mkdir): Remove from "#ifdef emacs" and redefine to accept 2 arguments. (open): Remove from "#ifdef emacs". * nt/mingw-cfg.site (ac_cv_func_mkostemp): Remove. * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_mkostemp) (OMIT_GNULIB_MODULE_tempname): Remove.
* Merge from origin/emacs-25Paul Eggert2017-01-01
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-31
| | | | | | | | Run admin/update-copyright.
* | Fix compiler warnings in the MinGW buildEli Zaretskii2016-05-21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac [mingw32]: Don't add -Wpointer-sign, and add -Wno-pointer-sign, to keep the noise level down. * nt/mingw-cfg.site (gl_cv_warn_c__Wredundant_decls): Disable -Wredundant-decls, as that produces a lot of noise due to redeclaration of time-related functions by gnulib. * nt/runemacs.c (set_user_model_id): Fix argument type of 'SetCurrentProcessExplicitAppUserModelID'. * src/image.c (x_create_bitmap_from_file) [HAVE_NTGUI]: Don't declare 'dpyinfo', as it is unused. (xpm_load): Fix warnings about pointer signedness. * src/w32proc.c (IsValidLocale, init_winsock): Remove redundant prototypes. (sys_spawnve): Avoid warnings about discarding 'const' qualifier. (sys_select): Provide prototype. (g_b_init_compare_string_w): Move declaration to file scope. * src/w32heap.c (dumped_data_commit): Now static. (FREEABLE_P): Avoid warnings about pointer comparison with integer. (mmap_realloc): Cast to 'char *' for arithmetics on void pointers. * src/w32console.c (ctrl_c_handler, sys_tputs, sys_tgetstr) (evalcost, cmputc, cmcheckmagic, cmcostinit, cmgoto, Wcm_clear): Provide prototypes. * src/w32.c (globals_of_w32, conv_sockaddr_to_lisp): Remove redundant prototypes. (w32_get_internal_run_time, map_w32_filename): Provide prototype. (init_environment, sys_ctime): Avoid warnings about discarding 'const' qualifier. Include utimens.h. (sys_ctime, sys_chdir, sys_creat, sys_fopen, sys_mkdir) (sys_open, sys_rename, sys_rmdir, is_slow_fs, term_winsock) (sys_close, sys_dup2, sys_read, sys_write, sys_localtime): Provide prototypes. (sys_rename_replace): Use %d to avoid compiler warnings. (_wsa_errlist): Make the message text 'const char *', to avoid compilation warnings. (dynlib_reset_last_error): Move prototype to file scope. (w32_get_resource): First argument is now 'const char *'. * src/w32uniscribe.c (syms_of_w32uniscribe): Provide prototype. (otf_features): Second argument is no 'const char *'. * src/w32term.c (free_frame_menubar, x_wm_set_size_hint) (x_set_window_size): Remove redundant prototypes. (XChangeGC, XGetGCValues, w32_draw_underwave) (w32_draw_rectangle, w32_shift_glyphs_for_insert, x_mouse_leave) (x_calc_absolute_position, x_destroy_window): Now static. (menubar_selection_callback): Move prototype to file scope. * src/w32font.c (g_b_init_get_glyph_outline_w): Remove redundant declaration. (w32_to_x_charset): Fix warnings about discarding 'const' qualifier. (w32font_full_name): Fix warnings about implicit conversion of 'float' to 'double'. * src/w32reg.c (w32_get_rdb_resource): Fix warnings about discarding 'const' qualifier. * src/w32menu.c (syms_of_w32menu, globals_of_w32menu) (set_frame_menubar): Remove redundant prototypes. (menubar_selection_callback, w32_menu_display_help): Provide prototypes. (simple_dialog_show): Avoid warnings about discarding 'const' qualifier. * src/w32fns.c (syms_of_w32fns, globals_of_w32fns) (free_frame_menubar, w32_strerror, x_set_menu_bar_lines) (x_set_tool_bar_lines, x_set_internal_border_width): Remove redundant prototypes. (current_popup_menu): Remove redundant declaration. (colormap_t): Member 'name' is now 'const char *'. (add_system_logical_colors_to_map): Fix signed/unsigned warnings. (x_decode_color, x_set_border_pixel) (x_clear_under_internal_border, x_set_name, hook_w32_key) (reset_w32_kbdhook_state, deliver_wm_chars, w32_backtrace): Now static. (w32_load_cursor, w32_key_to_modifier, map_keypad_keys) (w32_msg_worker, w32_last_error): Provide prototypes. (funhook, lookup_vk_code): Avoid warnings about missing parentheses. (x_default_font_parameter, Fw32_notification_notify): Avoid warnings about discarding 'const' qualifier. (Fx_create_frame): Avoid warnings about empty body of 'else'. (x_screen_planes): Ifdef away unused function. (Fx_show_tip): Remove unused variables. (Fw32_battery_status): Avoid warnings about implicit promotion from float to double. (Fw32_notification_notify): Initialize 'timeout'. * src/profiler.c (profiler_cpu_running) [HAVE_ITIMERSPEC]: Only define the TIMER_SETTIME_RUNNING value if it will be used. * src/w32notify.c (send_notifications): Ifdef away an empty if clause. Remove unused variable. (watch_end, watch_completion): Provide prototypes. * src/sound.c (sound_warning) [WINDOWSNT]: Don't define: unused. * src/callproc.c (child_setup, getenv_internal_1) [WINDOWSNT]: Fix warning with pointer signedness. * src/gnutls.c (gnutls_x509_crt_get_signature) (gnutls_alert_send_appropriate) [WINDOWSNT]: Don't define, and don't load them from the GnuTLS library, as they are no longer used. * src/process.c (DATAGRAM_CHAN_P) [!DATAGRAM_SOCKETS]: Don't define, as it's unused. * src/unexw32.c (open_input_file, open_output_file) (close_file_data): Remove redundant prototypes. (_start): provide prototype. (mainCRTStartup): Move prototype to file level. (find_section): Use type-cast to shut up compiler warnings. (offset_to_section, relocate_offset): Now static. (find_section): First argument is now a 'const char *'. (offset_to_section): Ifdef away, as it's unused. * src/w32heap.h (find_section): Adjust prototype. * src/dynlib.c (dynlib_reset_last_error): Provide prototype. * src/dired.c (directory_files_internal_w32_unwind): Avoid warnings about missing prototypes. (is_slow_fs) [WINDOWSNT]: Provide prototype at file level. (directory_files_internal) [WINDOWSNT]: Fix warnings about pointer signedness. * src/fileio.c (Ffile_writable_p, Ffile_regular_p) [WINDOWSNT]: Fix warnings about pointer signedness. * src/filelock.c (WTMP_FILE) [WINDOWSNT]: Don't define, it's unused. * src/sysdep.c (_getpid): Remove redundant prototype. (sys_subshell) [DOS_NT]: Don't define 'status', it's unused. [!MSDOS]: Don't define 'st', it's unused. (init_sys_modes) [DOS_NT]: Don't define 'terminal', it's unused. (str_collate) [WINDOWSNT]: Avoid warnings about pointer signedness. * src/keyboard.c (tty_read_avail_input) [WINDOWSNT]: Don't define n_to_read, as it is not used. (MAX_ENCODED_BYTES) [WINDOWSNT]: Don't define, as it's unused. * src/w32font.h (syms_of_w32font): Remove redundant prototype. * src/xfaces.c (x_display_info) [HAVE_NTGUI]: Remove unused macro. * src/term.c (init_tty) [DOS_NT]: Ifdef away variables that are not used by DOS_NT builds, to avoid compiler warnings. * src/menu.c (current_popup_menu) [HAVE_NTGUI]: Remove redundant declaration. * src/dispnew.c (init_display) [WINDOWSNT]: Use type-cast to shut up compiler warnings. * src/w32term.h (x_set_window_size, x_get_focus_frame) (x_make_frame_visible, x_make_frame_invisible, x_iconify_frame) (x_set_frame_alpha, x_activate_menubar, x_bitmap_icon) (x_free_frame_resources, x_real_positions) (display_x_get_resource): Remove redundant prototypes. * lib-src/ntlib.c (sys_ctime, sys_fopen, sys_chdir, mkostemp) (sys_rename, gettimeofday): Provide prototypes. * lib-src/ntlib.h (getuid, geteuid, mkostemp): Remove redundant declarations. * lib-src/emacsclient.c (w32_getenv): Argument is now 'const char *'. (xstrdup, w32_get_resource, w32_window_app, w32_execvp, ttyname) (close_winsock, initialize_sockets, w32_set_user_model_id) (w32_find_emacs_process, w32_give_focus) [WINDOWSNT]: Add prototypes. (w32_get_resource) [WINDOWSNT]: Fix a warning about signedness difference. (w32_set_user_model_id): Update prototype of SetCurrentProcessExplicitAppUserModelID to avoid compiler warnings. (start_daemon_and_retry_set_socket) [WINDOWSNT]: Use type-cast to shut up compiler warnings. * lib-src/etags.c (MAXPATHLEN) [WINDOWSNT]: Remove unused macro.
* Rework C source files to avoid ^(Paul Eggert2016-03-10
| | | | | | | | 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.
* Update copyright year to 2016Paul Eggert2016-01-01
| | | | Run admin/update-copyright.
* Update copyright year to 2015Paul Eggert2015-01-01
| | | | Run admin/update-copyright.
* Minor fixes for MS-Windows MinGW64 build.Eli Zaretskii2014-05-26
| | | | | | src/w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined. lib-src/ntlib.h (lseek): Don't redirect to _lseek.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-01
|
* Fix bugs in update-game-score, on MS-Windows and elsewhere.Eli Zaretskii2013-08-05
| | | | | | | | | | | | | lib-src/update-game-score.c (read_score): Try reading a character before probing the stream for EOF. Initialize score->score to zero, before reading and accumulating the score. (read_scores): Fix logic that determines which value to return. Close the input stream when finished reading the scores (avoids failures in overwriting the file with a new one on MS-Windows, since a file that is open cannot be deleted). lib-src/ntlib.h (rename): Don't undefine. lib-src/ntlib.c (sys_rename): New function, needed for update-game-score.
* MS-Windows followup to last commit.Eli Zaretskii2013-08-04
| | | | | | | | | lib-src/ntlib.h: Include fcntl.h. (mkostemp): Declare prototype. (mktemp): Don't redefine. lib-src/ntlib.c (mkostemp): New function. Fixes: debbugs:15015
* Finished with lib-src compilation, except emacsclientw and emacsclient.res.Eli Zaretskii2013-03-30
| | | | Next -- compilation in nt/, and then problems in src/.
* Update copyright notices for 2013.Paul Eggert2013-01-01
|
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-05
|
* Fix the MS-Windows build broken by 2011-01-17T19:01:01Z!eggert@cs.ucla.edu ↵Eli Zaretskii2011-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-24
|
* Nuke arch-tags.Glenn Morris2011-01-15
|
* Merge from emacs-23Stefan Monnier2011-01-14
|\
| * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-02
| |
| * Add stubs for Windows, required after CVE-2010-0825 change.Juanma Barranquero2010-04-03
| | | | | | | | | | * ntlib.c (getgid, getegid, setegid): New stubs. * ntlib.h (getgid, getegid, setegid): Declare them.
* | Make building under stricter warning flags somewhat cleaner.Juanma Barranquero2010-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove BSTRING related code, all platforms define it.Dan Nicolaescu2010-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/s/usg5-4.h (BSTRING): Remove definition. * src/s/template.h (BSTRING): * src/s/msdos.h (BSTRING): * src/s/ms-w32.h (BSTRING): * src/s/hpux10-20.h (BSTRING): * src/s/gnu-linux.h (BSTRING): * src/s/darwin.h (BSTRING): * src/s/cygwin.h (BSTRING): * src/s/bsd-common.h (BSTRING): * src/s/aix4-2.h (BSTRING): Likewise. * src/sysdep.c: Remove code depending on BSTRING not being defined. * configure.in: Remove code dealing with BSTRING. * lib-src/ntlib.h: Remove code dealing with BSTRING. * nt/config.nt: Remove code depending on BSTRING.
* | Add stubs for Windows, required after CVE-2010-0825 change.Juanma Barranquero2010-04-03
|/ | | | | * ntlib.c (getgid, getegid, setegid): New stubs. * ntlib.h (getgid, getegid, setegid): Declare them.
* Add 2010 to copyright years.Glenn Morris2010-01-13
|
* inc/sys/stat.h (struct stat): Change the types of st_uid and st_gid to unsigned.Eli Zaretskii2009-03-21
| | | | | | | | | | | | | | | | | | | | | | 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.
* Add 2009 to copyright years.Glenn Morris2009-01-08
|
* (fcloseall, fgetchar, flushall, fputchar, putw): Remove,Dan Nicolaescu2008-07-16
| | | | unused.
* Switch to recommended form of GPLv3 permissions notice.Glenn Morris2008-05-09
|
* Add 2008 to copyright years.Glenn Morris2008-01-07
|
* Switch license to GPLv3 or later.Glenn Morris2007-07-25
|
* Add 2007 to copyright years.Glenn Morris2007-01-21
|
* Update years in copyright notice; nfc.Thien-Thi Nguyen2006-02-06
|
* Update years in copyright notice; nfc.Thien-Thi Nguyen2005-08-07
|
* Update FSF's address.Lute Kamstra2005-07-04
|
* (fileno): Don't define if already defined.Eli Zaretskii2005-06-04
|
* Add arch taglinesMiles Bader2003-09-01
|
* (WIN32): Remove unnecessary definition.Andrew Innes2000-08-22
| | | | | (sleep): Make argument unsigned long. (_WINSOCK_H): Undefine so normal winsock definitions can be used.
* Undefine _WINSOCKAPI_.Andrew Innes1998-06-01
|
* Add includes.Geoff Voelker1997-08-09
| | | | Undo definitions of crt routines from config.h.
* Fix FSF address in comment.Karl Heuer1996-07-20
|
* Correct return type of getwd.Karl Heuer1996-07-15
|
* Initial revisionGeoff Voelker1996-05-03