From: Paul Smith Date: Sun, 18 Dec 2016 17:43:18 +0000 (-0500) Subject: [SV 49114] Remove support for the NO_FLOAT compile flag. X-Git-Tag: 4.2.90~110 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72af7ce8aff003ab81f46d71faab3e51bcb78322;p=thirdparty%2Fmake.git [SV 49114] Remove support for the NO_FLOAT compile flag. * makeint.h (max_load_average): Always a double. * main.c (max_load_average, default_load_average): Always doubles. (switches): -l option is a "floating" format. (decode_switches, define_makeflags): Support "floating" format. * remake.c (f_mtime): Show time skew as double. * rule.c (print_rule_data_base): Show percentages as double. * Makefile.ami, README.DOS.template, SMakefile.template: Remove references to NO_FLOAT. * SCOPTIONS, glob/SCOPTIONS: Remove NO_FLOAT settings. --- diff --git a/Makefile.ami b/Makefile.ami index 39a9788e..bc4ebf45 100644 --- a/Makefile.ami +++ b/Makefile.ami @@ -32,7 +32,6 @@ LDFLAGS = # Define these for your system as follows: # -DNO_ARCHIVES To disable 'ar' archive support. -# -DNO_FLOAT To avoid using floating-point numbers. # -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2. # Some compilers apparently accept this # without complaint but produce losing code, diff --git a/README.DOS.template b/README.DOS.template index bc31adb9..f9a6d92f 100644 --- a/README.DOS.template +++ b/README.DOS.template @@ -73,13 +73,7 @@ To build from sources: should be available from the usual DJGPP sites) and rerun configure.bat. - 4. If you will need to run Make on machines without an FPU, you - might consider building a version of Make which doesn't issue - floating-point instructions (they don't help much on MSDOS - anyway). To this end, edit the Makefile created by - configure.bat and add -DNO_FLOAT to the value of CPPFLAGS. - - 5. Invoke Make. + 4. Invoke Make. If you are building from outside of the source directory, you need to tell Make where the sources are, like this: @@ -90,7 +84,7 @@ To build from sources: use a full, not relative, name of the source directory here, or else Make might fail. - 6. After Make finishes, if you have a Unix-style shell installed, + 5. After Make finishes, if you have a Unix-style shell installed, you can use the 'install' target to install the package. You will also need GNU Fileutils and GNU Sed for this (they should be available from the DJGPP sites). @@ -120,10 +114,10 @@ To build from sources: (If your Info directory is other than C:\DJGPP\INFO, change this command accordingly.) - 7. The 'clean' targets also require Unix-style shell, and GNU Sed + 6. The 'clean' targets also require Unix-style shell, and GNU Sed and 'rm' programs (the latter from Fileutils). - 8. To run the test suite, type "make check". This requires a Unix + 7. To run the test suite, type "make check". This requires a Unix shell (I used the DJGPP port of Bash 2.03), Perl, Sed, Fileutils and Sh-utils. diff --git a/SCOPTIONS b/SCOPTIONS index f89daae1..3d69fb42 100644 --- a/SCOPTIONS +++ b/SCOPTIONS @@ -6,7 +6,6 @@ OPTIMIZERALIAS DEFINE INCLUDEDIR="include:" DEFINE LIBDIR="lib:" DEFINE NO_ALLOCA -DEFINE NO_FLOAT DEFINE NO_ARCHIVES IGNORE=161 IGNORE=100 diff --git a/SMakefile.template b/SMakefile.template index 1b60d857..ce2fb63c 100644 --- a/SMakefile.template +++ b/SMakefile.template @@ -38,7 +38,6 @@ LDFLAGS = # Define these for your system as follows: # -DNO_ARCHIVES To disable 'ar' archive support. -# -DNO_FLOAT To avoid using floating-point numbers. # -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2. # Some compilers apparently accept this # without complaint but produce losing code, diff --git a/glob/SCOPTIONS b/glob/SCOPTIONS index f89daae1..3d69fb42 100644 --- a/glob/SCOPTIONS +++ b/glob/SCOPTIONS @@ -6,7 +6,6 @@ OPTIMIZERALIAS DEFINE INCLUDEDIR="include:" DEFINE LIBDIR="lib:" DEFINE NO_ALLOCA -DEFINE NO_FLOAT DEFINE NO_ARCHIVES IGNORE=161 IGNORE=100 diff --git a/hash.c b/hash.c index ed4c8766..e1688870 100644 --- a/hash.c +++ b/hash.c @@ -276,7 +276,6 @@ hash_rehash (struct hash_table *ht) void hash_print_stats (struct hash_table *ht, FILE *out_FILE) { - /* GKM FIXME: honor NO_FLOAT */ fprintf (out_FILE, _("Load=%lu/%lu=%.0f%%, "), ht->ht_fill, ht->ht_size, 100.0 * (double) ht->ht_fill / (double) ht->ht_size); fprintf (out_FILE, _("Rehash=%u, "), ht->ht_rehashes); diff --git a/main.c b/main.c index e7ad8caa..346cc0d2 100644 --- a/main.c +++ b/main.c @@ -277,13 +277,8 @@ char *sync_mutex = NULL; Negative values mean unlimited, while zero means limit to zero load (which could be useful to start infinite jobs remotely but one at a time locally). */ -#ifndef NO_FLOAT double max_load_average = -1.0; double default_load_average = -1.0; -#else -int max_load_average = -1; -int default_load_average = -1; -#endif /* List of directories given with -C switches. */ @@ -453,13 +448,8 @@ static const struct command_switch switches[] = "include-dir" }, { 'j', positive_int, &arg_job_slots, 1, 1, 0, &inf_jobs, &default_job_slots, "jobs" }, -#ifndef NO_FLOAT { 'l', floating, &max_load_average, 1, 1, 0, &default_load_average, &default_load_average, "load-average" }, -#else - { 'l', positive_int, &max_load_average, 1, 1, 0, &default_load_average, - &default_load_average, "load-average" }, -#endif { 'o', filename, &old_files, 0, 0, 0, 0, 0, "old-file" }, { 'O', string, &output_sync_option, 1, 1, 0, "target", 0, "output-sync" }, { 'W', filename, &new_files, 0, 0, 0, 0, 0, "what-if" }, @@ -2942,7 +2932,6 @@ decode_switches (int argc, const char **argv, int env) = *(unsigned int *) cs->noarg_value; break; -#ifndef NO_FLOAT case floating: if (coptarg == 0 && optind < argc && (ISDIGIT (argv[optind][0]) || argv[optind][0] == '.')) @@ -2954,7 +2943,6 @@ decode_switches (int argc, const char **argv, int env) : *(double *) cs->noarg_value); break; -#endif } /* We've found the switch. Stop looking. */ @@ -3156,7 +3144,6 @@ define_makeflags (int all, int makefile) } break; -#ifndef NO_FLOAT case floating: if (all) { @@ -3176,7 +3163,6 @@ define_makeflags (int all, int makefile) } } break; -#endif case string: if (all) diff --git a/makeint.h b/makeint.h index 5eb5cb8c..d7266cff 100644 --- a/makeint.h +++ b/makeint.h @@ -662,11 +662,7 @@ extern int batch_mode_shell; extern char cmd_prefix; extern unsigned int job_slots; -#ifndef NO_FLOAT extern double max_load_average; -#else -extern int max_load_average; -#endif #ifdef WINDOWS32 extern char *program; diff --git a/remake.c b/remake.c index 3a908cbc..c01eb910 100644 --- a/remake.c +++ b/remake.c @@ -1408,11 +1408,6 @@ f_mtime (struct file *file, int search) adjusted_now = now + (resolution - 1); if (adjusted_now < adjusted_mtime) { -#ifdef NO_FLOAT - OS (error, NILF, - _("Warning: File '%s' has modification time in the future"), - file->name); -#else double from_now = (FILE_TIMESTAMP_S (mtime) - FILE_TIMESTAMP_S (now) + ((FILE_TIMESTAMP_NS (mtime) - FILE_TIMESTAMP_NS (now)) @@ -1426,7 +1421,6 @@ f_mtime (struct file *file, int search) OSS (error, NILF, _("Warning: File '%s' has modification time %s s in the future"), file->name, from_now_string); -#endif clock_skew_detected = 1; } } diff --git a/rule.c b/rule.c index de8b3046..a173fdd9 100644 --- a/rule.c +++ b/rule.c @@ -511,16 +511,8 @@ print_rule_data_base (void) puts (_("\n# No implicit rules.")); else { - printf (_("\n# %u implicit rules, %u"), rules, terminal); -#ifndef NO_FLOAT - printf (" (%.1f%%)", (double) terminal / (double) rules * 100.0); -#else - { - int f = (terminal * 1000 + 5) / rules; - printf (" (%d.%d%%)", f/10, f%10); - } -#endif - puts (_(" terminal.")); + printf (_("\n# %u implicit rules, %u (%.1f%%) terminal."), + rules, terminal, (double) terminal / (double) rules * 100.0); } if (num_pattern_rules != rules)