mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
fix calc when CUSTOM is undefined, remove PASSDOWN values
Removed the ${CAL_PASSDOWN}, ${HELP_PASSDOWN}, ${HELP_PASSDOWN}, ${CSCRIPT_PASSDOWN} Makefile variables as the new Makefile include files keep Makefile variables in sync. Fixed the ability of calc to compile when CUSTOM is undefined (i.e., -UCUSTOM). The libcustcalc is always built, regardless of the $(ALLOW_CUSTOM} Makefile variable. However when CUSTOM is undefined, the bulk of custom functions are not defined.
This commit is contained in:
@@ -25,21 +25,32 @@
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* ISO C requires a translation unit to contain at least one declaration,
|
||||
* so we declare a global variable whose value is based on if CUSTOM is defined.
|
||||
*/
|
||||
#if defined(CUSTOM)
|
||||
int c_devnull_allowed = 1; /* CUSTOM defined */
|
||||
#else /* CUSTOM */
|
||||
int c_devnull_allowed = 0; /* CUSTOM defined */
|
||||
#endif /* CUSTOM */
|
||||
|
||||
|
||||
#if defined(CUSTOM)
|
||||
|
||||
#include "have_unistd.h"
|
||||
#include "../have_unistd.h"
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "have_const.h"
|
||||
#include "value.h"
|
||||
#include "custom.h"
|
||||
#include "../have_const.h"
|
||||
#include "../value.h"
|
||||
#include "../custom.h"
|
||||
|
||||
#include "have_unused.h"
|
||||
#include "../have_unused.h"
|
||||
|
||||
|
||||
#include "banned.h" /* include after system header <> includes */
|
||||
#include "../banned.h" /* include after system header <> includes */
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user