summaryrefslogtreecommitdiff
path: root/src/dynlib.h
Commit message (Collapse)AuthorAge
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* Port better to C23 bool+true+false keywordsPaul Eggert2022-09-28
| | | | | | | | | | | | | | | | | | | | C23 is adding the C++ keywords bool, true, and false; prefer them to <stdbool.h> if they are available. * admin/merge-gnulib (GNULIB_MODULES): Add stdbool, which emulates C23 on pre-C23 platforms. (AVOIDED_MODULES): Remove stdbool; Gnulib has renamed this module to stdbool-c99 and nobody uses it so it does not need to be avoided. * m4/c-bool.m4: New file, from Gnulib stdbool module. * lib-src/seccomp-filter.c, src/conf_post.h, src/dynlib.h: * src/emacs-module.c, src/nsterm.m, src/systhread.h: * test/src/emacs-module-resources/mod-test.c: Use the C23 style and use bool without including <stdbool.h>. The Gnulib stdbool module causes config.h to include stdbool.h on pre-C23 platforms. * src/emacs-module.h.in: Don’t include <stdbool.h> if C23 or later, or if it has already been included.
* Do not include <attribute.h> from <config.h>Paul Eggert2022-03-08
| | | | | | | | | | | | This is because mod-test.c shouldn’t use source code from lib, but it does need to include <config.h>. * lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c: * lib-src/make-docfile.c, lib-src/movemail.c: * lib-src/seccomp-filter.c, src/dynlib.h, src/lisp.h: * src/syssignal.h, src/sysstdio.h, src/systhread.h, src/tparam.h: Include <attribute.h>. * src/conf_post.h: Do not include <attribute.h>. All uses of attribute.h macros replaced with their _GL_ equivalents.
* Merge from origin/emacs-28Eli Zaretskii2022-01-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
| |
* | Have 'dlopen' use RTLD_GLOBAL in 'dynlib_open'Andrea Corallo2021-12-15
|/ | | | | | | | | | * src/pdumper.c (dump_do_dump_relocation): Use 'dynlib_open_for_eln' in place of 'dynlib_open'. * src/dynlib.h (dynlib_open_for_eln): Declare it. * src/dynlib.c (dynlib_open_for_eln): New function. (dynlib_open): Add RTLD_GLOBAL. * src/comp.c (Fnative_elisp_load): Use 'dynlib_open_for_eln' in place of 'dynlib_open'.
* 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)".
* Avoid suppressing -Wcast-function-type warning.Philipp Stephani2019-05-05
| | | | | | | | | | | GCC special-cases the type ‘void (*)(void)’ to not emit warnings when cast, see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-function-type. Make use of this to remove a warning suppression. * src/dynlib.h: Use void (*)(void) as generic function pointer type. * src/emacs-module.c: Remove warning suppression.
* Port to Oracle Developer Studio 12.6Paul Eggert2019-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This compiler is a bit pickier about checking conformance to the C standard, ranging from syntax trivia (no extra ";" at the top level) to portability trivia (warnings re conversion between function and data pointers) to more-important stuff like lack of support for some __attribute__ usages. * src/dynlib.c (dynlib_addr): First argument is a function pointer, not a data pointer. All callers changed. * src/emacs-module.c (module_function_address): Return module_funcptr, not void *. All uses changed. * src/lisp.h (module_funcptr) [HAVE_MODULES]: New type. * src/lread.c (union ieee754_double): Don’t assume the usual semantics for converting signed to unsigned int when initializing a bitfield, as the Oracle compiler complains and the C standard is unclear. * src/pdumper.c (ALLOW_IMPLICIT_CONVERSION): Make it clearer that -Wsign-conversion is disabled everywhere in this file. (dump_trace, dump_tailq_prepend, dump_tailq_append): Don’t assume __attribute__. (dump_object_self_representing_p): Don’t disable conversion warnings; it’s not needed here. (DEFINE_FROMLISP_FUNC): Avoid possible signal in integer conversion from unsigned to signed. (DEFINE_FROMLISP_FUNC, finish_dump_pvec): Avoid warning about unreachable statements on platforms not supporting the __attribute__. (intmax_t_from_lisp, intmax_t_to_lisp, dump_off_from_lisp) (dump_off_to_lisp, dump_emacs_reloc_immediate_lv) (dump_emacs_reloc_immediate_ptrdiff_t) (dump_emacs_reloc_immediate_intmax_t) (dump_emacs_reloc_immediate_int, dump_emacs_reloc_immediate_bool): Omit stray semicolon that violates C standard. (dump_metadata_for_pdumper): Add cast to pacify compiler complaining about conversion from function pointer to data pointer. (Fdump_emacs_portable): Do not use CALLN to call a function with zero arguments, as C99 prohibits empty initializers. * src/xdisp.c (syms_of_xdisp): Do not nest calls to pure_list, to work around a bug in Oracle Developer Studio 12.6.
* 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 FTP and HTTP in documentationPaul Eggert2017-09-13
| | | | | | | | | | | | | 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.
* Use ATTRIBUTE_MAY_ALIAS where alias violations are likelyPhilipp Stephani2017-06-04
| | | | | | | In particular, alias violations are likely for the return values of dlsym(3), which get cast around arbitrarily. * src/emacs-module.c (Fmodule_load): Use ATTRIBUTE_MAY_ALIAS.
* Simplify interface of dynlib_attr.Philipp Stephani2017-06-04
| | | | | | | Instead of returning bool, set the argument pointers to NULL if the information is not available. * src/dynlib.c (dynlib_addr): Don't return bool.
* Update copyright year to 2017Paul Eggert2016-12-31
| | | | Run admin/update-copyright.
* 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.
* Port better to FreeBSD’s dlfunc vs dlsymPaul Eggert2015-11-23
| | | | | | | | | | | This avoids warnings when converting between void * and function pointers, which strict C11 does not allow. * configure.ac (dlfunc): Check for existence. * src/dynlib.c (dlfunc) [!HAVE_DLFUNC]: New macro. (dynlib_func): New function. * src/dynlib.h (dynlib_function_ptr, dynlib_func): New decls. * src/emacs-module.c (Fmodule_load): Use dynlib_func, not dynlib_sym, for function pointers.
* Include-file tweaks for modulesPaul Eggert2015-11-20
| | | | | | | | | * src/dynlib.c, src/emacs-module.c: Include <config.h> first. * src/dynlib.h: Do not include config.h. It’s every .c file’s responsibility to include config.h first. * src/emacs-module.c: Include emacs-module.h immediately after config.h, to test that emacs-module.h doesn’t depend on include files other than config.h.
* Style fixes for indenting etc. in module codePaul Eggert2015-11-19
| | | | | | | This is mostly indenting and spacing changes. Also, remove some unnecessary static decls instead of bothering to reindent them. * src/module.h (EMACS_EXTERN_C_BEGIN): Remove, and do this inline, as most other Emacs files do for this sort of thing.
* Add copyright notices to module codePaul Eggert2015-11-19
| | | | Put them in the usual format for GNU Emacs copyright notices.
* Add portable layer for dynamic loadingAurélien Aptel2015-11-18
* src/dynlib.h: New file. * src/dynlib.c: New file. Co-authored-by: Philipp Stephani <phst@google.com>