kauth: Do not redefine vfprintf

kaserver.c redefines vfprintf in terms of the historical _doprnt
function, presumably to work around quirks of old platforms. This
should not be necessary anymore, since we call vfprintf() normally in
various other places throughout the tree without trouble.

Using _doprnt causes problems on various platforms (as can be seen by
the long #ifdef before it), including now AIX when using the
clang-based xlc 17.1:

        .../src/kauth/kaserver.c:99:5: error: call to undeclared function '_doprnt'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            vfprintf(stderr, fmt, pvar);
            ^
        .../src/kauth/kaserver.c:60:35: note: expanded from macro 'vfprintf'
        #define vfprintf(stream,fmt,args) _doprnt(fmt,args,stream)
                                          ^

Instead of adding more conditions to the #ifdef, just get rid of this
weird workaround altogether.

Change-Id: Ie4e965229ed8e8636c6e6405cc33a4937e2ccabc
Reviewed-on: https://gerrit.openafs.org/15431
Reviewed-by: Ben Huntsman <ben@huntsmans.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
This commit is contained in:
Andrew Deason 2023-05-08 16:04:22 -05:00 committed by Michael Meffie
parent 7225c4b848
commit 3526f318cf

View File

@ -55,11 +55,6 @@ struct afsconf_dir *KA_conf; /* for getting cell info */
int MinHours = 0;
int npwSums = KA_NPWSUMS; /* needs to be variable sometime */
#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
#undef vfprintf
#define vfprintf(stream,fmt,args) _doprnt(fmt,args,stream)
#endif
static int debugOutput;
/* check whether caller is authorized to manage RX statistics */