1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00
freebsd/include
Marcel Moolenaar 12eb46c8bb Change the definition of NULL on ia64 (for LP64 compilations) from
an int constant to a long constant. This change improves consistency
in the following two ways:
1. The first 8 arguments are always passed in registers on ia64, which
   by virtue of the generated code implicitly widens ints to longs and
   allows the use of an 32-bit integral type for 64-bit arguments.
   Subsequent arguments are passed onto the memory stack, which does
   not exhibit the same behaviour and consequently do not allow this.
   In practice this means that variadic functions taking pointers
   and given NULL (without cast) work as long as the NULL is passed
   in one of the first 8 arguments. A SIGSEGV is more likely the
   result if such would be done for stack-based arguments. This is
   due to the fact that the upper 4 bytes remain undefined.
2. All 64-bit platforms that FreeBSD supports, with the obvious
   exception of ia64, allow 32-bit integral types (specifically NULL)
   when 64-bit pointers are expected in variadic functions by way of
   how the compiler generates code. As such, code that works correctly
   (whether rightfully so or not) on any platform other than ia64, may
   fail on ia64.

To more easily allow tweaking of the definition of NULL, this commit
removes the 12 definitions in the various headers and puts it in a
new header that can be included whenever NULL is to be made visible.

This commit fixes GNOME, emacs, xemacs and a whole bunch of ports
that I don't particularly care about at this time...
2003-12-07 21:10:06 +00:00
..
arpa MFCrypto: update RFC assigned telnet options (r1.9) 2003-01-18 06:13:57 +00:00
protocols
rpc Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
rpcsvc Argh. Forward declare some structs rather than increase include file 2003-10-26 16:35:11 +00:00
_ctype.h Solve the <runetype.h> pollution problem by disabling inline 2002-09-09 05:38:05 +00:00
a.out.h
ar.h
assert.h
bitstring.h Finish the repocopy of bitstring.h to sys so it can be used 2003-06-13 19:40:13 +00:00
complex.h
cpio.h
ctype.h Solve the <runetype.h> pollution problem by disabling inline 2002-09-09 05:38:05 +00:00
db.h
dirent.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
dlfcn.h Implement dlinfo() function. 2003-02-13 17:47:44 +00:00
elf-hints.h
elf.h
err.h
fmtmsg.h
fnmatch.h Use the relatively new visibility primitives for conditionals. 2002-09-17 22:25:40 +00:00
fstab.h - Add setfstab() and getfstab(). 2003-04-07 12:55:00 +00:00
fts.h Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct 2002-09-21 01:28:41 +00:00
getopt.h Add getopt_long(3). 2002-09-29 04:14:37 +00:00
glob.h
grp.h = Implement thread-safe versions of the getpwent(3) and getgrent(3) 2003-04-17 14:15:26 +00:00
hesiod.h
histedit.h Make C++ safe 2003-07-14 16:31:20 +00:00
ieeefp.h o Move the contents of <machine/floatingpoint.h> over to 2003-01-19 06:01:33 +00:00
ifaddrs.h Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function, 2003-11-14 18:53:22 +00:00
inttypes.h Add the remaining C99 wide character string to integer conversion functions. 2002-09-22 08:06:45 +00:00
iso646.h style(9): tab after #define. 2002-09-18 22:23:59 +00:00
kenv.h
langinfo.h o Don't include <nl_types.h>, instead provide a typedef for nl_item. 2002-09-18 05:54:25 +00:00
libgen.h
limits.h Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
link.h Initiate deorbit burn for the i386-only a.out related support. Moves are 2002-09-17 01:49:00 +00:00
locale.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
Makefile Install UDF header files to unbreak /sbin building when /sys is not present. 2003-11-22 06:08:59 +00:00
malloc.h
memory.h
monetary.h Fix an error which prevented ssize_t from becoming defined. Add 2002-09-20 08:22:48 +00:00
mpool.h
ndbm.h
netconfig.h
netdb.h style. 2003-10-24 06:53:12 +00:00
nl_types.h Add forgotten <sys/_types.h> include. Fix some style bugs while I'm 2002-09-24 17:28:12 +00:00
nlist.h
nss.h = Implement name service switch modules (NSS modules). NSS modules 2003-04-17 14:14:22 +00:00
nsswitch.h = Implement name service switch modules (NSS modules). NSS modules 2003-04-17 14:14:22 +00:00
objformat.h
paths.h Add /rescue bits. This basically encompasses all of bin and sbin along 2003-06-29 18:35:37 +00:00
pthread_np.h pthread_attr_get_np() now takes 'pthread_t' (not 'pthread_t *') 2003-01-07 21:43:30 +00:00
pthread.h Add the pthread_atfork() prototype. 2003-11-04 20:10:15 +00:00
pwd.h Revert the definitions of _PW_KEY* to their previous values. There is 2003-04-18 14:11:17 +00:00
ranlib.h
readpassphrase.h
regex.h Cope with a GCC bug by using an alternative, but equivalent function 2002-10-03 18:12:03 +00:00
regexp.h
resolv.h Add support for timeout: and attempts: resolver options. 2003-12-07 12:32:24 +00:00
rune.h Move _PATH_LOCALE to place where it really belongs to (rune.h -> paths.h) 2003-06-25 22:28:33 +00:00
runetype.h o Fix namespace scope issues in <ctype.h> by using the relatively new 2002-09-06 04:22:54 +00:00
search.h - Remove the lsearch() and lfind() functions and their manpage from 2002-10-16 14:29:23 +00:00
setjmp.h Fix namespace issues by using visibility conditionals from 2002-10-05 05:48:50 +00:00
sgtty.h
signal.h - Define sigwait, sigtimedwait, and sigwaitinfo in terms of 2003-03-31 23:30:41 +00:00
stab.h
stdbool.h
stddef.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
stdio.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
stdlib.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
string.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
stringlist.h Sync with NetBSD -- sl_add() now returns an int. 2003-01-19 01:16:01 +00:00
strings.h
sysexits.h
tar.h
time.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
timeconv.h
timers.h
ttyent.h
ulimit.h No need to support UL_GETSIZE and UL_SETSIZE anymore; they are about to be 2003-01-08 01:18:13 +00:00
unistd.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
utime.h
utmp.h
uuid.h Wrap function prototype declarations in __BEGIN_DECLS to do the right thing 2002-11-05 10:55:16 +00:00
varargs.h Add a new machine independent varargs.h and use it as a central place 2003-09-01 03:28:25 +00:00
vis.h Add a new flag to vis(3): VIS_GLOB which encodes the glob(3) magic 2003-10-30 10:40:49 +00:00
wchar.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
wctype.h
wordexp.h Describe WRDE_NOCMD in the same way that we describe the rest of the flags. 2003-01-03 12:03:38 +00:00