From: deraadt Date: Wed, 14 Jan 2015 23:36:15 +0000 (+0000) Subject: change _yp_domain[] to HOST_NAME_MAX+1, and re-arrange those who include X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e7e445a11bbda6214de68b173597e581810683bc;p=openbsd change _yp_domain[] to HOST_NAME_MAX+1, and re-arrange those who include it to get limits.h early enough --- diff --git a/lib/libc/asr/getaddrinfo_async.c b/lib/libc/asr/getaddrinfo_async.c index 18a959acf24..162759f80de 100644 --- a/lib/libc/asr/getaddrinfo_async.c +++ b/lib/libc/asr/getaddrinfo_async.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getaddrinfo_async.c,v 1.31 2014/11/18 20:51:00 krw Exp $ */ +/* $OpenBSD: getaddrinfo_async.c,v 1.32 2015/01/14 23:36:15 deraadt Exp $ */ /* * Copyright (c) 2012 Eric Faurot * @@ -21,12 +21,6 @@ #include #include #include -#ifdef YP -#include -#include -#include -#include "ypinternal.h" -#endif #include #include @@ -37,6 +31,14 @@ #include #include #include +#include + +#ifdef YP +#include +#include +#include +#include "ypinternal.h" +#endif #include "asr_private.h" diff --git a/lib/libc/asr/gethostnamadr_async.c b/lib/libc/asr/gethostnamadr_async.c index 7d78e2bf2d0..c2870f91db5 100644 --- a/lib/libc/asr/gethostnamadr_async.c +++ b/lib/libc/asr/gethostnamadr_async.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gethostnamadr_async.c,v 1.32 2014/11/02 13:59:16 eric Exp $ */ +/* $OpenBSD: gethostnamadr_async.c,v 1.33 2015/01/14 23:36:15 deraadt Exp $ */ /* * Copyright (c) 2012 Eric Faurot * @@ -20,12 +20,6 @@ #include #include #include -#ifdef YP -#include -#include -#include -#include "ypinternal.h" -#endif #include #include @@ -36,6 +30,14 @@ #include #include #include +#include + +#ifdef YP +#include +#include +#include +#include "ypinternal.h" +#endif #include "asr_private.h" diff --git a/lib/libc/yp/yp_bind.c b/lib/libc/yp/yp_bind.c index da9bf3f72e4..c292686839d 100644 --- a/lib/libc/yp/yp_bind.c +++ b/lib/libc/yp/yp_bind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yp_bind.c,v 1.20 2014/05/25 17:47:04 tedu Exp $ */ +/* $OpenBSD: yp_bind.c,v 1.21 2015/01/14 23:36:16 deraadt Exp $ */ /* * Copyright (c) 1992, 1993, 1996 Theo de Raadt * All rights reserved. @@ -42,7 +42,7 @@ #include "ypinternal.h" struct dom_binding *_ypbindlist; -char _yp_domain[MAXHOSTNAMELEN]; +char _yp_domain[HOST_NAME_MAX+1]; int _yplib_timeout = 10; int diff --git a/lib/libc/yp/ypinternal.h b/lib/libc/yp/ypinternal.h index e581cf2708e..8767a830533 100644 --- a/lib/libc/yp/ypinternal.h +++ b/lib/libc/yp/ypinternal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ypinternal.h,v 1.7 2003/06/25 21:51:56 marc Exp $ */ +/* $OpenBSD: ypinternal.h,v 1.8 2015/01/14 23:36:16 deraadt Exp $ */ /* * Copyright (c) 1992, 1993, 1996 Theo de Raadt @@ -48,7 +48,7 @@ int (*ypresp_allfn)(u_long, char *, int, char *, int, void *); void *ypresp_data; extern struct dom_binding *_ypbindlist; -extern char _yp_domain[MAXHOSTNAMELEN]; +extern char _yp_domain[HOST_NAME_MAX+1]; extern int _yplib_timeout; void _yp_unbind(struct dom_binding *);