From 1783d89719a9bf346f20f70b388eb4b06e4d5988 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sat, 11 Jan 2014 14:51:30 +0000 Subject: [PATCH] sd-dns: cleanup public header Don't include internal headers Update license text Use _SD_BEGIN/END_DECLARATIONS --- src/libsystemd-bus/dns-util.h | 2 ++ src/systemd/sd-dns.h | 34 ++++++++++++++++++---------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/libsystemd-bus/dns-util.h b/src/libsystemd-bus/dns-util.h index 31d19bd95..0ca91e0ad 100644 --- a/src/libsystemd-bus/dns-util.h +++ b/src/libsystemd-bus/dns-util.h @@ -1,5 +1,7 @@ #pragma once +#include "util.h" + DEFINE_TRIVIAL_CLEANUP_FUNC(asyncns_t*, asyncns_free); DEFINE_TRIVIAL_CLEANUP_FUNC(unsigned char *, asyncns_freeanswer); DEFINE_TRIVIAL_CLEANUP_FUNC(struct addrinfo*, asyncns_freeaddrinfo); diff --git a/src/systemd/sd-dns.h b/src/systemd/sd-dns.h index 72bc1213e..38972db5e 100644 --- a/src/systemd/sd-dns.h +++ b/src/systemd/sd-dns.h @@ -1,31 +1,34 @@ -#ifndef fooasyncnshfoo -#define fooasyncnshfoo +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +#ifndef foosddnshfoo +#define foosddnshfoo /*** - This file is part of libasyncns. + This file is part of systemd. Copyright 2005-2008 Lennart Poettering - libasyncns is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 2.1 of the - License, or (at your option) any later version. + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. - libasyncns is distributed in the hope that it will be useful, but + systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with libasyncns. If not, see - . + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see . ***/ #include #include #include -#include "macro.h" -#include "util.h" +#include "_sd-common.h" + +_SD_BEGIN_DECLARATIONS; + /** \mainpage * * \section moo Method of operation @@ -41,9 +44,6 @@ * your program is not irritated by spurious SIGCHLD signals. */ -/** \example asyncns-test.c - * An example program */ - /** An opaque libasyncns session structure */ typedef struct asyncns asyncns_t; @@ -153,4 +153,6 @@ void asyncns_setuserdata(asyncns_t *asyncns, asyncns_query_t *q, void *userdata) * prior to this call it returns NULL. */ void* asyncns_getuserdata(asyncns_t *asyncns, asyncns_query_t *q); +_SD_END_DECLARATIONS; + #endif -- 2.30.2