2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 14:25:41 +00:00

AIX and Digital Unix compatibility fixes.

This commit is contained in:
Ted Lemon
2000-02-01 03:19:56 +00:00
parent fb6297b12b
commit cfdfb9f126
16 changed files with 57 additions and 71 deletions

View File

@@ -32,6 +32,7 @@ isc_result_t omapi_connect (omapi_object_t *c,
isc_result_t status;
omapi_connection_object_t *obj;
int flag;
socklen_t sl;
obj = (omapi_connection_object_t *)dmalloc (sizeof *obj, MDL);
if (!obj)
@@ -131,10 +132,10 @@ isc_result_t omapi_connect (omapi_object_t *c,
/* I don't know why this would fail, so I'm tempted not to test
the return value. */
hix = sizeof (obj -> local_addr);
sl = sizeof (obj -> local_addr);
if (getsockname (obj -> socket,
((struct sockaddr *)
&obj -> local_addr), &hix) < 0) {
&obj -> local_addr), &sl) < 0) {
}
if (fcntl (obj -> socket, F_SETFL, O_NONBLOCK) < 0) {

View File

@@ -29,7 +29,7 @@
#ifndef lint
static char copyright[] =
"$Id: errwarn.c,v 1.2 2000/01/26 14:56:05 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
"$Id: errwarn.c,v 1.3 2000/02/01 03:19:52 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
@@ -48,15 +48,13 @@ static char fbuf [1024];
/* Log an error message, then exit... */
void log_fatal (ANSI_DECL(const char *) fmt, VA_DOTDOTDOT)
KandR (char *fmt;)
va_dcl
void log_fatal (const char * fmt, ... )
{
va_list list;
do_percentm (fbuf, fmt);
VA_start (list, fmt);
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
@@ -82,15 +80,13 @@ void log_fatal (ANSI_DECL(const char *) fmt, VA_DOTDOTDOT)
/* Log an error message... */
int log_error (ANSI_DECL (const char *) fmt, VA_DOTDOTDOT)
KandR (char *fmt;)
va_dcl
int log_error (const char * fmt, ...)
{
va_list list;
do_percentm (fbuf, fmt);
VA_start (list, fmt);
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
@@ -108,15 +104,13 @@ int log_error (ANSI_DECL (const char *) fmt, VA_DOTDOTDOT)
/* Log a note... */
int log_info (ANSI_DECL (const char *) fmt, VA_DOTDOTDOT)
KandR (char *fmt;)
va_dcl
int log_info (const char *fmt, ...)
{
va_list list;
do_percentm (fbuf, fmt);
VA_start (list, fmt);
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
@@ -134,15 +128,13 @@ int log_info (ANSI_DECL (const char *) fmt, VA_DOTDOTDOT)
/* Log a debug message... */
int log_debug (ANSI_DECL (const char *) fmt, VA_DOTDOTDOT)
KandR (char *fmt;)
va_dcl
int log_debug (const char *fmt, ...)
{
va_list list;
do_percentm (fbuf, fmt);
VA_start (list, fmt);
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);

View File

@@ -125,7 +125,7 @@ int omapi_listener_readfd (omapi_object_t *h)
isc_result_t omapi_accept (omapi_object_t *h)
{
isc_result_t status;
int len;
socklen_t len;
omapi_connection_object_t *obj;
omapi_listener_object_t *listener;