Commit Graph

281544 Commits

Author SHA1 Message Date
mlelstv e6735382cd Check dkdriver before calling a driver function. 2020-10-06 15:05:54 +00:00
christos f5da3b7f1a GC unused MAXTSIZ32 2020-10-06 13:42:03 +00:00
christos 7c02b47ba1 make MAXTSIZ optional 2020-10-06 13:38:49 +00:00
christos 3910cb68f6 Make MAXTSIZ optional. 2020-10-06 13:38:00 +00:00
rin 95f08238e2 Revert the previous again; miniroot overflows this time...
- switch to x_disklabel (drop non-native label support)
- switch to x_fsck_ffs and x_newfs (drop byte-swapped and Apple UFS support)
- switch to more
2020-10-06 13:32:41 +00:00
rillig 05869a9f33 make(1): rework memory allocation for the name of variables
There's more to know about variable names than fits in a one-liner.
While here, enforce that the name is not modified by splitting it into
the established (var + var_freeIt) pattern.

Since the name is not modified and not freed in the middle of evaluating
an expression, there is no need to make a backup copy of it.  That code
had been necessary more than 12 years ago, but not anymore since the
code got a lot cleaner since then.
2020-10-06 08:13:27 +00:00
rillig 7687783e5b make(1): remove duplicate code for creating variables 2020-10-06 07:52:47 +00:00
skrll f2860d4959 move #include "opt_compat_netbsd32.h" to where it's required 2020-10-06 06:26:46 +00:00
rillig 1b9c32a3c0 make(1): remove pathname limit for Dir_FindHereOrAbove
While trying to compile the code with GCC's -Wformat-truncation, the
snprintf calls felt quite complicated.  The function Dir_FindHereOrAbove
is not in a bottleneck execution path, therefore it doesn't hurt to
dynamically allocate the memory instead of using size-limited stack
memory.
2020-10-05 22:45:47 +00:00
rillig ce82f0970c make(1): enable format string truncation warnings for parse.c
No node is ever going to have a million or more cohorts.  And even if
there were, this name is only used for printing informational messages.
2020-10-05 22:15:45 +00:00
rillig 883ec9be11 make(1): prepare job.c, main.c, parse.c, suff.c for WARNS=6
In job.c, GCC 5 complains about the macro FILENO that it has type
unsigned int, which is then passed as the argument of dup2, which
expects a simple int.  Maybe this workaround from 1995 is not necessary
anymore, or maybe it is but can be restricted to the few affected
platforms.

This leaves meta.c and the filemon files to be converted.  I didn't do
them since they are not well covered by the unit tests.
2020-10-05 21:37:07 +00:00
christos c5aeb8a719 PR/55695: Andreas Gustafsson: factor(6) -h option doesn't always work
Handle -h for factors greater than the primes table.
2020-10-05 21:11:47 +00:00
rillig a7157845f7 make(1): make dir.c, for.c and hash.c ready for WARNS=6
Some types have changed from int to unsigned int, size_t or time_t.

The variable i in hash.c has been kept as int since it counts down to
-1, which generates efficient machine code, at least on x86_64.
2020-10-05 20:21:30 +00:00
rillig 364e68a767 make(1): make cond.c ready for WARNS=6, part 2 2020-10-05 19:59:07 +00:00
rillig b537e837b3 make(1): make cond.c ready for WARNS=6 2020-10-05 19:56:08 +00:00
rillig 04ade6cbee make(1): fix compilation with GCC 10 and -Wimplicit-fallthrough=4 2020-10-05 19:39:30 +00:00
rillig c85833020f make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)
The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25.  In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath.  Dir_ClearPath takes full ownership of the given list and
empties it.  This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table.  This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes.  This by itself
was not a problem since the hash table would be freed afterwards.  But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again.  Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.
2020-10-05 19:30:37 +00:00
rillig f336e55bc4 make(1): revert previous commit
It had accidentally reverted all the work from the past few days.
2020-10-05 19:27:47 +00:00
rillig b6c0384ff9 make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)
The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25.  In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath.  Dir_ClearPath takes full ownership of the given list and
empties it.  This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table.  This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes.  This by itself
was not a problem since the hash table would be freed afterwards.  But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again.  Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.
2020-10-05 19:24:29 +00:00
rillig 1c039f5ce4 make(1): fix test for .ifndef when compiled with -DUSE_UCHAR_BOOLEAN
In that compilation variant, TRUE is defined to 255, to see whether all
boolean expressions evaluate to either 1 or 0.  The field If.doNot in
cond.c doesn't do this since it uses the actual value of TRUE.
Therefore, change the evaluation slightly to also handle this case.
2020-10-05 18:29:20 +00:00
rillig d1e081ff69 make(1): clean up compat.c
Only cosmetic changes, no change of functionality.
2020-10-05 18:04:57 +00:00
rillig 37b6a2b531 make(1): extract init_machine and init_machine_arch from main 2020-10-05 17:33:21 +00:00
roy ec2482217d Minor correction to prior 2020-10-05 17:29:22 +00:00
rillig 45096fccb8 make(1): extract parsing of sources from ParseDoDependency 2020-10-05 16:54:41 +00:00
rillig 6027965696 make(1): extract the target parsing from ParseDoDependency 2020-10-05 16:45:03 +00:00
rillig 31b39317c4 make(1): split ParseDoDependency into several smaller functions 2020-10-05 16:33:20 +00:00
roy a6f0f00cfa ifconfig: Warn once more if media supported but no types
This reverts media.c -r1.7
2020-10-05 16:17:05 +00:00
roy 9fd3530377 ppp: Remove media
There is none after all.
Applications should be using ifi_link_state and not checking media.
2020-10-05 16:11:25 +00:00
roy 54ebee488b Note import of dhcpcd-9.3.0 2020-10-05 16:04:11 +00:00
roy be38669a3c Sync with dhcpcd-9.3.0 2020-10-05 16:02:15 +00:00
roy 32fe301ab8 Update to dhcpcd-9.3.0 with the following changes:
* dhcpcd: Backticks have been removed from quoting filenames
 * dhcpcd: Only manipulate stdin, stdout and stderr if they are valid
 * duid: Adjust option so the type can be specified
 * logerr: Don't leak logfile fd to scripts
 * privsep: Run the launcher process in the sandbox
 * BSD: Use `ifi_link_state` as the single source of truth about carrier
 * BSD: Ignore vether(4) devices by default
2020-10-05 16:01:13 +00:00
rillig f61ca2efc4 make(1): split ParseDoSrc into smaller functions 2020-10-05 15:43:32 +00:00
rillig da5a66a335 make(1): replace GNode macros with inline functions
Curiously, this affects the size of the generated code: it gets smaller
than before.
2020-10-05 15:14:24 +00:00
rillig 41b60e14d8 make(1): allow easy creation of preprocessed source and assembler
To be used during development, to see how changes in the source code
affect the generated machine code.
2020-10-05 15:11:37 +00:00
nia c50d584d1e NGPC 2020-10-05 14:54:50 +00:00
nia baeda31567 bump date 2020-10-05 14:54:24 +00:00
christos 527b700deb revert previous octal conversion code (broken and not worth it). 2020-10-05 14:34:03 +00:00
christos a17b1cd2d7 revert previous and don't parse octal 2020-10-05 14:31:30 +00:00
rin 098da78686 Update gdb/dwarf2expr.c hack for earmv7hf{,eb}; the situation does not
change even for GCC 9.3 with ``memcmp'' fix.
2020-10-05 13:32:31 +00:00
rin d1007566db Update aes_ccm_tag() hack for m68k.
Even with ``memcmp fix'', GCC 9.4 miscompiles this function for -O[12].
But the situation was slightly changed from that with GCC 8.3:

* -O0 and -O1 work but -O2 fails for 68060 and 68040 (real hardware)
* -O0 and -O2 work but -O1 fails for 68020 and 68010 (TME)
2020-10-05 13:20:30 +00:00
martin 325b99962d Add a heuristic to detect and properly mark EFI system partitions
when re-using pre-existing partitions.
2020-10-05 12:28:45 +00:00
tnn 7f481043e4 factor: usage(): mark __dead 2020-10-05 12:22:49 +00:00
simonb 05d9ab5269 Whitespace nit. 2020-10-05 11:29:36 +00:00
rin 06cb72d7e9 Remove -fno-omit-frame-pointer hack for sun2 kernel. 2020-10-05 10:44:09 +00:00
rin db7d386e10 Kernel without -fno-omit-frame-pointer works fine now, both for GCC8 and 9.
Not sure which commit ``fixed'' the problem although...
2020-10-05 10:42:53 +00:00
knakahara 949f1cae7e Make sequence number of esp header MP-safe for IPsec Tx side. reviewed by ozaki-r@n.o
In IPsec Tx side, one Security Association can be used by multiple CPUs.
On the other hand, in IPsec Rx side, one Security Association is used
by only one CPU.

XXX pullup-{8,9}
2020-10-05 09:51:25 +00:00
nia 7014504d2e fix indentation 2020-10-05 09:16:53 +00:00
nia 81cc2aabb6 Adjust the default fontconfig fonts.conf to avoid selecting bitmap
fonts included as part of X11 that are also included as scalable fonts
as part of macOS.

Many websites will attempt to select these fonts, which results in
very strange, poor quality rendering.

This should keep legacy X11 applications that want the old "Helvetica"
and "Times" fonts working, but prevent them from being selected by
applications that want scalable fonts.

It should not prevent "Helvetica" or "Times" from being selected
if the user installs a scalable version.
2020-10-05 09:16:26 +00:00
roy a89c197148 soreadable() should consider so_rerror 2020-10-05 08:38:17 +00:00
kim a477b03dfb Add iburst to peer and server. 2020-10-05 06:45:40 +00:00