i386 removal, part 46/x: Remove sys/cpu/i386. Move the four i386 headers which libstand previously took from this directory to libstand's dir. This is just a precaution and actually not necessary at all because our x86_64 headers have #ifdef __i386__ checks for everything which libstand needs (binary comparison with a libstand that was compiled with only x86_64 headers confirms it). Review of the .depend files in /usr/obj confirms that this headers are now taken. Also reduce some no longer needed compatibility setup in libstand's Makefile.
Use GCC's builtin offset_of as the first option Other than C++ code, the GCC offsetof builtin was never getting used. The version that did get expanded could not be used for array declarations on GCC 4.5 and later because it wasn't considered a constant expression by those later GCC compilers. The first symptom was seen when building world with GCC 4.6, but the the offsetof expansion was finally identified as the cause of the problem while discussion PostgreSQL 9.1 build failures on DragonFly. Since DragonFly was the only platform exibiting the behavior, the problem was narrowed down to the offsetof macro or the compiler itself. Fixing the macro allowed the unpatched pgsql to compile. Thanks-to: Tom Lane
size_t/ssize_t - change to [unsigned] long * change size_t from unsigned int to unsigned long, and change ssize_t from int to long for both 32 and 64 bit builds. NOTE: This may not last for 32 bit builds, depending on what it breaks in pkgsrc land, but the change makes it easier to detect 32/64 bit issues with size_t, sizeof, and pointer arithmatic on 32 bit machines.
stdint.h: rearrange declarations into separate files The current machine/stdint.h situation is a mess. It declares only the __versions of stdint integers, but also defines limit and constant macros. Furthermore it also declares non-integer types. Break out integer limit and constant macros into their own machine/ headers and include all of these headers from <stdint.h>, but not from machine/stdint.h. The declaration of integer_t types still happens in main stdint.h. This is slightly based on NetBSD's way of doing it.
Major kernel build infrastructure changes, part 1/2 (sys). These changes are primarily designed to create a 2-layer machine and cpu build hierarchy in order to support virtual kernel builds in the near term and future porting efforts in the long term. * Split arch/ into a set of platform architectures under machine/ and a set of cpu architectures under cpu/. All platform and cpu header files will be accessible via <machine/*.h>. Platform header files may override cpu header files (the platform header file then typically #include's the cpu header file). * Any cpu header files that are not overridden will be copied directly into /usr/include/machine/, allowing the platform to omit those header files (not have to create degenerate forwarding header files). * All source files access platform and cpu architecture files via the <machine/*.h> path. The <cpu/*.h> path should only be used by platform header files when including the lower level cpu header files. * Require both the 'machine' and the 'machine_arch' directives in the kernel config file. * When building modules in the presence of a kernel config, use the IF files, use*.h files, and opt*.h files provided by the kernel config and do not generate them in each module's object directory. This streamlines the module build considerably.
Clean up more #include files. Create an internal __boolean_t so two or three sys/ header files don't have to juggle the type. Use _KERNEL_STRUCTURES in variuos pieces of user code that delve into kvm. Reported-by: Rumko <rumcic@gmail.com>, walt <wa1ter@myrealbox.com>
Core integer types header file reorganization stage 1/2: Create and/or modify intttypes.h and stdint.h plus the opaque underlying support in sys/ and machine/ according to the OpenGroup specifications. These changes are loosely based on FreeBSD-5 but use far saner type names and include dependancies.