*/
static void initDirPathArray(void)
{
- char *buf, *pathp;
- int status;
+ char *pathp;
#ifdef AFS_NT40_ENV
+ char *buf;
+ int status;
+
/* get the afs server software installation dir from the registry */
if (afssw_GetServerInstallDir(&buf)) {
/* failed; server not installed; use temp directory */
#else /* UKERNEL */
#include <stdio.h>
#include <sys/types.h>
+#include <stdlib.h>
#ifdef AFS_NT40_ENV
#include <winsock2.h>
-#include <stdlib.h>
#include <direct.h>
#else
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
+#include <ctype.h>
+#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#else
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#endif
#include <errno.h>
#include "afsutil.h"
tc = *ahost; /* look at the first char */
if (tc >= '0' && tc <= '9') {
numeric = 1;
- while (tc = *ptr++) {
+ while ((tc = *ptr++)) {
if (tc == '.') {
if (dots >= 3) {
numeric = 0;
tval = 0;
dots = 0;
bzero(addr, sizeof(addr));
- while (tc = *ahost++) {
+ while ((tc = *ahost++)) {
if (tc == '.') {
if (dots >= 3) return (struct hostent *) 0; /* too many dots */
addr[dots++] = tval;
} else {
addr = ntohl(addr);
sprintf(tbuffer, "%d.%d.%d.%d",
- ((addr>>24) & 0xff), ((addr>>16) & 0xff),
- ((addr>>8) & 0xff), ( addr & 0xff));
+ (int)((addr>>24) & 0xff), (int)((addr>>16) & 0xff),
+ (int)((addr>>8) & 0xff), (int)( addr & 0xff));
}
return tbuffer;