summaryrefslogtreecommitdiff
path: root/load.c
AgeCommit message (Collapse)AuthorFilesLines
2014-09-30Update Copyright statements for 2014.Paul Smith1-1/+1
2013-11-24* load.c (load_file): Reset the name length minus the symbol.Paul Smith1-0/+1
2013-11-23* load.c: [SV 40515] Define RTLD_GLOBAL if not set.Daniel Richard G1-0/+5
Copyright-paperwork-exempt: yes
2013-11-23[SV 40361] Don't use vsnprintf(), which is an ISO C99 function.Paul Smith1-10/+19
* output.c (error, fatal, message): Take an extra argument specifying how many bytes are used by the formatted arguments. (get_buffer): New function that allocates the requested buffer size. Remove msc_vsnprintf(), vfmtconcat(), and fmtconcat() as unneeded. * makeint.h: Declare various helper macros for generating output. * *.c: Change all error(), fatal(), message() calls to use the macros, or pass the extra length argument directly.
2013-09-22Use explicit cast between void* and pointer-to-function.Paul Smith1-2/+2
2013-05-27Porting to VMS, from Hartmut Becker.Paul Smith1-4/+3
2013-05-17Update source file format: remove TABs, use GNU coding styles.Paul Smith1-49/+50
2013-05-17Update copyright for changes in 2013.Paul Smith1-1/+1
2013-05-17Remove the dlopen() pointer from struct filedef.Paul Smith1-13/+51
This pointer is almost never needed, and it increases the size of the filedef struct for all files (of which there are a huge number for large builds). Instead keep a bit field marking whether the file is a loaded object and if so call a new function to unload it. In load.c we keep a simple linked list of loaded objects (of which there will be very few typically) and their dlopen() pointers.
2013-05-14Add requirement for plugin_is_GPL_compatible symbol in loaded objects.Paul Smith1-0/+6
2013-05-03Fix interfacing with and remaking dynamic objects on MS-Windows.Eli Zaretskii1-9/+12
load.c (load_object, load_file): Accept an additional argument DLP and return in it a pointer that can be used to unload the dynamic object. read.c (eval): Call load_file with an additional argument, and record the pointer returned there in the 'struct file' object of dynamic objects in that object's 'struct file'. commands.c (execute_file_commands): Unload dynamic objects before remaking them, to avoid failure to remake if the OS doesn't allow overwriting objects that are in use. filedef.h (struct file): New member dlopen_ptr. gnumake.h (GMK_EXPORT): Define to dllexport/dllimport decorations for Windows and to nothing on other platforms. (gmk_eval, gmk_expand, gmk_add_function): Add GMK_EXPORT qualifier to prototypes. makeint.h (MAIN): Define before including gnumake.h, to give correct dllexport decorations to exported functions. (load_file): Adjust prototype. loadapi.c: Don't include gnumake.h, since makeint.h already includes it, and takes care of defining MAIN before doing so. build_w32.bat (LinkGCC): Produce an import library for functions exported by Make for loadable dynamic objects. w32/compat/posixfcn.c (dlclose): New function. w32/include/dlfcn.h (dlclose): Add prototype. scripts/features/load: Fix signatures of testload_gmk_setup and explicit_setup, to bring them in line with the documentation.
2013-04-29Support dynamic object loading on MS-Windows.Eli Zaretskii1-1/+19
w32/include/dlfcn.h: New file. w32/compat/posixfcn.c: Include dlfcn.h. (dlopen, dlerror, dlsym) [MAKE_LOAD]: New functions, in support of dynamic loading. config.h.W32.template (MAKE_LOAD): Define. load.c (load_object) [HAVE_DOS_PATHS]: Support backslashes and drive letters in file names of dynamic objects.
2013-04-27Rework the implementation of load.c to increase portability.Paul Smith1-59/+64
It should be sufficient, now, to write a new version of the load_object() function. That function won't be called unless we really want to load, so all checking and parsing is taken care of before that.
2013-02-25Expand the loadable object support.Paul Smith1-1/+1
Provide a simple API for loaded objects to interact with GNU make. I still won't guarantee that this API won't change but it's much closer to something that's supported and provides easy-to-use interfaces with a public header file.
2013-01-20Rename struct floc to typedef gmk_floc as an externally scoped symbol.Paul Smith1-3/+3
2013-01-20Rename the make.h file to makeint.h for internal use only.Paul Smith1-1/+1
2013-01-20Allow dynamically loaded objects to be rebuilt by make.Paul Smith1-15/+28
2012-10-29Implement new "load" directive.Paul Smith1-0/+157
Provides support for dynamically loadable objects in GNU make, as a "technology preview".