Subject: CVS commit: basesrc
To: None <source-changes@netbsd.org>
From: Luke Mewburn <lukem@netbsd.org>
List: source-changes
Date: 11/15/2000 04:32:31
Module Name: basesrc
Committed By: lukem
Date: Wed Nov 15 02:32:31 UTC 2000
Modified Files:
basesrc/libexec/ftpd: cmds.c conf.c extern.h ftpcmd.y ftpd.c version.h
Log Message:
changes to improve portability:
* replace union sockunion {} with struct sockinet {}, and modify the code
accordingly. this is possibly more portable, as it doesn't rely upon
the structure alignment within the union for our own stuff. uses local
su_len unless HAVE_SOCKADDR_SA_LEN is defined (set ifdef BSD4_4)
(XXX: haven't tested the ipv6 stuff)
* always use getaddrinfo() and getnameinfo() instead of maintaining two code
paths. (lukemftpd will provide replacements for these on older systems)
* use lockf() instead of open(.., O_EXLOCK) to lock the pid file
* minor KNF
* clean up long long support: create helper #defines and use as appropriate:
#define NO_LONG_LONG ! NO_LONG_LONG
------- ------------ --------------
LLF "%ld" "%lld"
LLFP(x) "%" x "ld" "%" x "lld"
LLT long long long
ULLF "%lu" "%llu"
ULLFP(x) "%" x "lu" "%" x "llu"
ULLT unsigned long unsigned long long
STRTOLL(x,y,z) strtol(x,y,z) strtoll(x,y,z)
To generate a diff of this commit:
cvs rdiff -r1.6 -r1.7 basesrc/libexec/ftpd/cmds.c
cvs rdiff -r1.34 -r1.35 basesrc/libexec/ftpd/conf.c
cvs rdiff -r1.33 -r1.34 basesrc/libexec/ftpd/extern.h
cvs rdiff -r1.54 -r1.55 basesrc/libexec/ftpd/ftpcmd.y
cvs rdiff -r1.108 -r1.109 basesrc/libexec/ftpd/ftpd.c
cvs rdiff -r1.20 -r1.21 basesrc/libexec/ftpd/version.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.