freebsd-dev/lib/libutil
Dag-Erling Smørgrav 31cfde7132 Like many other functions that handle sockaddrs, realhostname_sa() takes a
struct sockaddr * that it casts internally to the appropriate type based on
sa_family.  However, struct sockaddr has very lax alignment requirements,
which causes the compiler to complain when you cast a struct sockaddr * to,
say, a struct sockaddr_in6 *.

I find it reasonable to assume that the pointer we received is in fact
correctly aligned.  Therefore, we can work around the compiler warnings by
casting to void * before casting to the desired type.  For readability's
sake, this is done with macros.

The same technique should prove useful in other parts of the tree that
deal with socket addresses.

MFC after:	3 weeks
2008-11-05 12:13:10 +00:00
..
_secure_path.3 Sort sections. 2005-01-20 09:17:07 +00:00
_secure_path.c Grammar in a comment. 2004-12-18 12:31:12 +00:00
auth.3 Sort sections. 2005-01-20 09:17:07 +00:00
auth.c
auth.conf.5 Reflect the reality; only crypt(3) uses /etc/auth.conf 2005-01-21 12:07:46 +00:00
expand_number.3 Constify the first argument to expand_number() so that it can 2007-11-18 02:20:02 +00:00
expand_number.c Add #include <inttypes.h> for the strtoimax(). 2008-07-07 12:20:34 +00:00
flopen.3 Reimplement flopen(3) using fcntl(2) locks instead of flock(2) locks. 2008-10-20 18:02:16 +00:00
flopen.c Diff reduction against Varnish, including one important fix: use a shared 2008-10-20 18:11:30 +00:00
fparseln.3 Scheduled mdoc(7) sweep. 2005-01-11 20:50:51 +00:00
fparseln.c
gr_util.c Add four utility functions related to struct grp processing modeled in-part 2008-04-23 00:49:13 +00:00
hexdump.3 Merge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing 2008-07-01 22:30:57 +00:00
hexdump.c Merge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing 2008-07-01 22:30:57 +00:00
humanize_number.3 Adjust history. 2007-09-28 15:31:44 +00:00
humanize_number.c Merge changes from NetBSD on humanize_number.c, 1.8 -> 1.13 2008-03-08 21:55:59 +00:00
kld.3 Adjust history. 2007-09-28 15:31:44 +00:00
kld.c - Add include for libutil.h and string.h for prototype. 2006-05-25 04:01:04 +00:00
libutil.h Merge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing 2008-07-01 22:30:57 +00:00
login_auth.3
login_auth.c
login_cap.3 Document the quirks of ~/.login_conf and LOGIN_MECLASS. 2007-06-14 09:33:37 +00:00
login_cap.c Avoid assigning a const char * to a char *. 2008-11-04 13:49:53 +00:00
login_cap.h Since in_lt() and in_lts() are not static, assume that they are intended to 2008-10-20 17:17:58 +00:00
login_class.3 Since setclasscpumask() is not static, assume that it is intended to be 2008-10-20 17:03:05 +00:00
login_class.c Avoid assigning a const char * to a char *. 2008-11-04 13:49:53 +00:00
login_crypt.c
login_ok.3 Fix a typo: "the give login class" to "the given login class." 2006-11-05 19:00:08 +00:00
login_ok.c Fix typo in comment. 2006-01-16 00:28:11 +00:00
login_times.3 Since in_lt() and in_lts() are not static, assume that they are intended to 2008-10-20 17:17:58 +00:00
login_times.c Additional style and whitespace fixes. 2008-10-20 17:09:50 +00:00
login_tty.3
login_tty.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
login.3
login.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
login.conf.5 Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
logout.3
logout.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
logwtmp.3
logwtmp.c Use strlcpy() when we mean it. 2008-10-17 21:21:14 +00:00
Makefile Comment out WARNS. There are too many alignment issues in libutil. 2008-11-05 11:06:10 +00:00
pidfile.3 pidfile(3) uses flopen(3) - don't make any assumptions about how the 2008-10-20 18:00:11 +00:00
pidfile.c There is no point in releasing a lock on a file which we've unlinked and 2008-10-20 17:41:08 +00:00
property.3 Sort sections. 2005-01-20 09:17:07 +00:00
property.c Restore the previous state after a FILL operation in properties_read() 2005-11-28 16:30:16 +00:00
pty.3 Update the manpage for openpty(3) to account for the recent fixes. 2008-01-14 23:49:56 +00:00
pty.c Add missing header. 2008-11-04 13:50:50 +00:00
pw_util.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
realhostname_sa.3 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
realhostname.3 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
realhostname.c Like many other functions that handle sockaddrs, realhostname_sa() takes a 2008-11-05 12:13:10 +00:00
stub.c
trimdomain.3
trimdomain.c When removing the local domain, only do so when the result will be a 2005-10-05 04:42:20 +00:00
uucplock.3 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
uucplock.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00