mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
[master] make lwres/stdlib.h and lwres/string.h instead of compat.h
This commit is contained in:
parent
c5734964e6
commit
a6ad80dd08
@ -49,15 +49,14 @@
|
||||
static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* $Id: strtoul.c,v 1.4 2007/06/19 23:47:22 tbox Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <lwres/compat.h>
|
||||
#include <lwres/stdlib.h>
|
||||
#include <lwres/string.h>
|
||||
|
||||
#define DE_CONST(konst, var) \
|
||||
do { \
|
||||
|
@ -136,10 +136,11 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <lwres/compat.h>
|
||||
#include <lwres/lwres.h>
|
||||
#include <lwres/net.h>
|
||||
#include <lwres/netdb.h>
|
||||
#include <lwres/stdlib.h>
|
||||
#include <lwres/string.h>
|
||||
|
||||
#define SA(addr) ((struct sockaddr *)(addr))
|
||||
#define SIN(addr) ((struct sockaddr_in *)(addr))
|
||||
|
@ -15,10 +15,10 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LWRES_COMPAT_H
|
||||
#define LWRES_COMPAT_H 1
|
||||
#ifndef LWRES_STDLIB_H
|
||||
#define LWRES_STDLIB_H 1
|
||||
|
||||
/*! \file lwres/compat.h */
|
||||
/*! \file lwres/stdlib.h */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@ -29,14 +29,9 @@
|
||||
#define strtoul lwres_strtoul
|
||||
#endif
|
||||
|
||||
#ifdef LWRES_PLATFORM_NEEDSTRLCPY
|
||||
#define strlcpy lwres_strlcpy
|
||||
#endif
|
||||
|
||||
LWRES_LANG_BEGINDECLS
|
||||
|
||||
unsigned long lwres_strtoul(const char *, char **, int);
|
||||
size_t lwres_strlcpy(char *dst, const char *src, size_t size);
|
||||
|
||||
LWRES_LANG_ENDDECLS
|
||||
|
37
lib/lwres/include/lwres/string.h
Normal file
37
lib/lwres/include/lwres/string.h
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LWRES_STRING_H
|
||||
#define LWRES_STRING_H 1
|
||||
|
||||
/*! \file lwres/string.h */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <lwres/lang.h>
|
||||
#include <lwres/platform.h>
|
||||
|
||||
#ifdef LWRES_PLATFORM_NEEDSTRLCPY
|
||||
#define strlcpy lwres_strlcpy
|
||||
#endif
|
||||
|
||||
LWRES_LANG_BEGINDECLS
|
||||
|
||||
size_t lwres_strlcpy(char *dst, const char *src, size_t size);
|
||||
|
||||
LWRES_LANG_ENDDECLS
|
||||
|
||||
#endif
|
@ -61,11 +61,12 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <lwres/compat.h>
|
||||
#include <lwres/lwbuffer.h>
|
||||
#include <lwres/lwres.h>
|
||||
#include <lwres/net.h>
|
||||
#include <lwres/result.h>
|
||||
#include <lwres/stdlib.h>
|
||||
#include <lwres/string.h>
|
||||
|
||||
#include "assert_p.h"
|
||||
#include "context_p.h"
|
||||
|
@ -15,8 +15,6 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <ctype.h>
|
||||
@ -25,7 +23,8 @@
|
||||
|
||||
#define LWRES__PRINT_SOURCE /* Used to get the lwres_print_* prototypes. */
|
||||
|
||||
#include <lwres/compat.h>
|
||||
#include <lwres/stdlib.h>
|
||||
#include <lwres/string.h>
|
||||
|
||||
#include "assert_p.h"
|
||||
#include "print_p.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user