The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.
This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
object files corresponding to source files that had the compile-with
option set in conf/files. This means that any fbt probes for functions
in that object file would not have correct argument types.
The fix is to run ctfconvert on any target file that does not have the
no-obj option set in files.
PR: bin/160275
Reported by: Paul Ambrose (ambrosehua AT gmail DOT com)
MFC after: 1 week
- Use strlen(dp->d_name) instead of the unportable dp->d_namlen. Rename
i to len to make it slightly more descriptive and prevent negative
indexing of the array.
- Replace index() by strchr().
This supposedly fixes compilation on GNU systems.
Submitted by: Robert Millan <rmh debian org> (original patch)
MFC after: 3 weeks
extra MACHINE_ARCH symlink for certain platforms (such as pc98). The
support for creating these symlinks was added to sys/conf/kern.post.mk in
changeset 152964. The intention of that commit was to remove this code
from config(8), but config(8) was never updated.
Approved by: imp
'makeoptions OPTION=' for consistency with the make commandline.
Previously 'makeoptions WERROR=' would result in a syntax error; now
it produces the same effect as 'makeoptions WERROR'. Both forms now
result in 'WERROR=' in the generated Makefile.
bug in the config file was long, and merged to stable, we have to bump
the version here so that stable/8 kernels can have their required
version number bumped to make sure the right config is used.
MFC after: 3 days
fatal condition. While it works out really well for diagnosing the
case where you want it, but don't have it, it works really badly for
the case where you don't have it and don't want it. Remove the printf
and exit pair. Replate it with simple return to silently ignore this
condition.
This is needed to fix the COMPAT_IA32 being required in options.* in
stable, but we need to run this change through -current first...
MFC after: 3 days
- Passing -m to config will now print the MACHINE and MACHINE_ARCH
given in the passed kernel configuration file and then exit.
- If an option is defined in options.MACHINE with the same name as the
architecture of the kernel being configured, that option will be
considered set. This allows conditional compilation based on CPU
architecture.
Config version is now 600010.
Reviewed by: imp
o make cmd scoped to the whole do_rules function, since it really is
scoped to the whole fucnion. Making it static was the wrong way to
fix referencing it outside of the block in which it was declared
(and conforms to the style of the rest of the file).
o remove a couple of meaningless blank lines
o properly wrap one line.
section holding the config file to sh_addralign bytes using NULs.
This bogusly triggers an assert. Break out of the loop when we hit an
NUL within that many bytes of the end.
MFC after: 3 days
will allow people with old config options to either have it just work
(if config is new enough), or get a version error (if their config is
about 7.0 or newer) rather than getting a cryptic error about
duplicated options in the options file, or getting an error about an
unknown option, at which point they'd update their config file only to
learn they need a new config, only to learn they didn't really need to
update their config file... All this because our version checking was
in the wrong place for the past decade...
# hopefully this is the last change, and we'll be able to config with an
# 8.0 GENERIC file on stable/8 after I merge this change and add the
# compat options.
MFC after: 3 days
versions of config. Remove support for the syntax OLD = NEW form the
options file, and instead have a new file $S/conf/options-compat.
This file will be parsed as OLD NEW on each line. Bump version of
config. Since nothing in -current ever used this, there's no hazards
for current users, so I'm not bumping the version in the
Makefiles.$MACHINE. No need, really, for this version bump in
-current, but this was introduced into -stable before I realized the
version check was ineffective there, so the verison bump doesn't hurt
here and keeps the two branches in sync, versionwise, after the MFC.
MFC after: 3 days
we've parsed the config file. Makefile generation is too late if
we've introduce changes to the syntax of the metafiles to warn about
version skew, since we have to try to parse them and we get an parse
error that's rather baffling to the user rather than a 'your config is
too old, upgrade' which we should get.
We have to defer doing it until after we've read the user's config
file because we define machinename there. The version required to
compile the kernel is encoded in Makefile.machinename. There's no
real reason for this to be the case, but changing it now would
introduce some logistical issues that I'd rather avoid for the moment.
I intend to revisit this if we're still using config in FreeBSD 10.
This also means that we cannot introduce any config metafile changes
that result in a syntax error or other error for the user until 9.0 is
released. Otherwise, we break the upgrade path, or at least reduce
the usefulness of the error messages we generate.
# This implies that the config file option mapping will need to be redone.
MFC after: 3 days
with all other corresponding CTF places by changing the corresponding
code which is generated by config(8). Or in short, move the '@' from
the variable definition to the use of the variable. [1]
While I'm here break up a long line. [2]
Discussed with: imp [1,2], bde [2]
feature. The kernel makefiles have specifically not been bumped
because nothing uses this new feature and doing so forces everybody to
recompile for no good reason. This chnage will be MFC'd where the
kernel version numbers for amd64 and ia64 will be bumped, since those
are the only two that have use the option remapping feature. Once
merged, this will give a better error message to folks that are using
buildkernel without buildworld or kernel-toolchain to update their
kernels.
MFC after: 3 days
OLD_OPT = NEW_OPT
in options* files will now map OLD_OPT to NEW_OPT with a friendly
message. This is indented for situations where we need to preserve an
interface in the config file in an upwards compatible fashion on a
stable branch.
Reviewed by: nwhitehorn@
MFC after: 3 days
I was considering committing all these patches one by one, but as
discussed with brooks@, there is no need to do this. If we ever
need/want to merge these changes back, it is still possible to do this
per application.
the following syntax in the kernel config.
makeoptions MODULES_OVERRIDE=foo
makeoptions MODULES_OVERRIDE+=bar
makeoptions MODULES_OVERRIDE+=baz
Bump config minor version to 600007.
shell (which was the problem with the original implementation) and avoid
letting make see an empty definition (which was the problem with the current
implementation).
doesn't exist, we make a directory and then say "oops, that file isn't
there" leaving the directory behind. Add a stat for the config file
so that we detect this before making the directory. This is
semi-lame, but less lame than having this bug.
-d destdir option. For an automounted src tree using the logical cwd
in the Makefile keeps amd(8)'s mount timeout refreshed. Code to check
$PWD's validity cribbed from pwd(1).
Discussed on hackers@.
manual's Appendix D ("Old Features Supported but not Encouraged") in
the Seventh Edition Unix Programmer's Manual (January, 1979) by
retiring the " = {" method of of action specification in favor of a
plain "{". It is no longer necessary for this bootstrap program to
be compatible with 6th Edition systems. Some yaccs in the wild do not
support this old syntax any more, and compatibility with those systems
is more important these days (as there are easily 7 orders of magnitude
more of them than real v6 systems today).
Reviewed by: jhb@ and dds@ (the latter gave the reference).
this bug and submitted these patches to dunstan@. He sent them to me
to test, and I discovered they were needed for the atmel kernel config
files. Since we were playing with them in the terminal room after the
developer's summit today, I thought I'd go ahead and commit them to
allow those folks that now have atmel hardware (thanks Andre) a chance
to try it out w/o my help. Since dunstan@ is asleep right now, risk
stepping on his toes a little by going ahead and committing this
change.
Submitted by: dunstan@, bde@
Tested by: bde@
is caused by my latest changes to config(8). You're supposed to install new
config(8) in order to prevent yourself from seeing a warning about old
version of that tool.
You should configure the kernel with a new config(8) then.
Oked by: rwatson, cognet (mentor)
Remember about tricky cases, where options contain unfriendly characters,
from the ANSI-C string point of view ('"' in this case). The x09 build
breakage was caused by SC_CUT_SEPCHARS options.
I did test this patch number of times; each time unprofessionally and
inappropriately.
OKed by: cognet (mentor)