mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
change libcalc dynamic library to link with libcustcalc
Under macOS, to reduce dependency chains, we remove functions and data that are unreachable by the entry point or exported symbols. In particular, the macOS linker is used with both "-dead_strip" and "-dead_strip_dylibs". The libcalc shared library is now linked with libcustcalc.
This commit is contained in:
16
custom.c
16
custom.c
@@ -68,6 +68,14 @@ custom(char *name, int count, VALUE **vals)
|
||||
|
||||
CONST struct custom *p; /* current function */
|
||||
|
||||
/*
|
||||
* error if libcustcalc was compiled with CUSTOM undefined
|
||||
*/
|
||||
if (custom_compiled() == 0) {
|
||||
math_error("libcustcalc was compiled CUSTOM undefined");
|
||||
not_reached();
|
||||
}
|
||||
|
||||
/*
|
||||
* search the custom interface table for a function
|
||||
*/
|
||||
@@ -100,6 +108,14 @@ custom(char *name, int count, VALUE **vals)
|
||||
|
||||
#else /* CUSTOM */
|
||||
|
||||
/*
|
||||
* error if libcustcalc was compiled with CUSTOM defined
|
||||
*/
|
||||
if (custom_compiled() == 1) {
|
||||
math_error("libcustcalc was compiled with CUSTOM defined");
|
||||
not_reached();
|
||||
}
|
||||
|
||||
fprintf(stderr,
|
||||
"%sCalc was built with custom functions disabled\n",
|
||||
(conf->tab_ok ? "\t" : ""));
|
||||
|
Reference in New Issue
Block a user