INN commit: branches/2.5 (11 files)
INN Commit
rra at isc.org
Wed Jan 7 21:03:00 UTC 2015
Date: Wednesday, January 7, 2015 @ 13:03:00
Author: iulius
Revision: 9780
Cleanup in include stuff
- Add missing BEGIN_DECLS/END_DECLS, and also use them instead of their
expansion.
- Add missing inclusion of <inn/defines.h>.
Modified:
branches/2.5/include/conffile.h
branches/2.5/include/inn/dbz.h
branches/2.5/include/inn/dispatch.h
branches/2.5/include/inn/inndcomm.h
branches/2.5/include/inn/libinn.h
branches/2.5/include/inn/newsuser.h
branches/2.5/include/inn/ov.h
branches/2.5/include/inn/overview.h
branches/2.5/include/inn/timer.h
branches/2.5/storage/buffindexed/buffindexed.h
branches/2.5/storage/ovdb/ovdb.h
-----------------------------------+
include/conffile.h | 12 +++++-------
include/inn/dbz.h | 6 +++---
include/inn/dispatch.h | 2 ++
include/inn/inndcomm.h | 17 +++++++----------
include/inn/libinn.h | 6 +++---
include/inn/newsuser.h | 27 ++++++++++++++-------------
include/inn/ov.h | 14 +++++++-------
include/inn/overview.h | 1 +
include/inn/timer.h | 2 +-
storage/buffindexed/buffindexed.h | 13 +++++++------
storage/ovdb/ovdb.h | 13 +++++++------
11 files changed, 57 insertions(+), 56 deletions(-)
Modified: include/conffile.h
===================================================================
--- include/conffile.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ include/conffile.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -1,12 +1,12 @@
-/* $Revision$
+/* $Id$
**
** Data structures, functions and cetera used for config file parsing.
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <inn/defines.h>
+BEGIN_DECLS
+
typedef struct {
FILE *f;
char *buf;
@@ -30,6 +30,4 @@
extern CONFTOKEN *CONFgettoken(CONFTOKEN *, CONFFILE *);
-#ifdef __cplusplus
-}
-#endif
+END_DECLS
Modified: include/inn/dbz.h
===================================================================
--- include/inn/dbz.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ include/inn/dbz.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -1,5 +1,5 @@
-#ifndef __DBZ_H__
-#define __DBZ_H__
+#ifndef INN_DBZ_H
+#define INN_DBZ_H 1
/* Need the definition of HASH. */
#include "inn/libinn.h"
@@ -73,4 +73,4 @@
END_DECLS
-#endif /* __DBZ_H__ */
+#endif /* INN_DBZ_H */
Modified: include/inn/dispatch.h
===================================================================
--- include/inn/dispatch.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ include/inn/dispatch.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -10,6 +10,8 @@
#ifndef INN_DISPATCH_H
#define INN_DISPATCH_H 1
+#include <inn/defines.h>
+
/* Forward declarations. */
struct cvector;
Modified: include/inn/inndcomm.h
===================================================================
--- include/inn/inndcomm.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ include/inn/inndcomm.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -1,4 +1,4 @@
-/* $Revision$
+/* $Id$
**
** Here be values used for communicating with the server once it is
** running.
@@ -7,10 +7,10 @@
#ifndef INN_INNDCOMM_H
#define INN_INNDCOMM_H 1
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+#include <inn/defines.h>
+BEGIN_DECLS
+
/* The header for the ICC protocol is a one-byte protocol version followed
by a 2 byte messages length*/
#define HEADER_SIZE (sizeof (ICC_PROTOCOLTYPE) + sizeof (ICC_MSGLENTYPE))
@@ -22,8 +22,6 @@
/* Values for the protocol version field of the message. 8 bits wide. */
#define ICC_PROTOCOL_1 'a'
-
-
#define SC_SEP '\001'
#define SC_MAXFIELDS 6
@@ -89,7 +87,6 @@
# define RECVorREAD(fd, p, s) read((fd), (p), (s))
#endif
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* !INN_INNDCOMM_H */
+END_DECLS
+
+#endif /* INN_INNDCOMM_H */
Modified: include/inn/libinn.h
===================================================================
--- include/inn/libinn.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ include/inn/libinn.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -3,8 +3,8 @@
** Here be declarations of functions in the InterNetNews library.
*/
-#ifndef LIBINN_H
-#define LIBINN_H 1
+#ifndef INN_LIBINN_H
+#define INN_LIBINN_H 1
#include <inn/defines.h>
@@ -238,4 +238,4 @@
/* <ctype.h>'s isspace includes \n, which is not what we want. */
#define ISWHITE(c) ((c) == ' ' || (c) == '\t')
-#endif /* LIBINN_H */
+#endif /* INN_LIBINN_H */
Modified: include/inn/newsuser.h
===================================================================
--- include/inn/newsuser.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ include/inn/newsuser.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -1,18 +1,18 @@
-/* $Id$
- *
- * Declarations of functions to ensure running as "news" user/group.
- *
- * By Ivan Shmakov, 2007.
- * This code is in the public domain.
- *
- */
+/* $Id$
+**
+** Declarations of functions to ensure running as "news" user/group.
+**
+** By Ivan Shmakov, 2007.
+** This code is in the public domain.
+*/
-#ifndef RUNASUSER_H
-#define RUNASUSER_H 1
+#ifndef INN_NEWSUSER_H
+#define INN_NEWSUSER_H 1
-#include "config.h"
-#include "clibrary.h"
+#include <inn/defines.h>
+BEGIN_DECLS
+
int get_news_uid_gid(uid_t *uid, gid_t *gid, bool may_die);
/* The following functions die() on failure. */
@@ -20,5 +20,6 @@
void ensure_news_grp(bool may_setgid);
void ensure_news_user_grp(bool may_setuid, bool may_setgid);
-#endif
+END_DECLS
+#endif /* INN_NEWSUSER_H */
Modified: include/inn/ov.h
===================================================================
--- include/inn/ov.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ include/inn/ov.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -1,12 +1,14 @@
+/* $Id$
+*/
+
#ifndef INN_OV_H
#define INN_OV_H 1
+#include <inn/defines.h>
#include "storage.h"
#include "inn/history.h"
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+BEGIN_DECLS
#define OV_READ 1
#define OV_WRITE 2
@@ -75,8 +77,6 @@
};
#endif
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+END_DECLS
-#endif /* !INN_OV_H */
+#endif /* INN_OV_H */
Modified: include/inn/overview.h
===================================================================
--- include/inn/overview.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ include/inn/overview.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -11,6 +11,7 @@
#ifndef INN_OVERVIEW_H
#define INN_OVERVIEW_H 1
+#include <inn/defines.h>
#include <stdio.h> /* FILE */
#include "inn/storage.h"
Modified: include/inn/timer.h
===================================================================
--- include/inn/timer.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ include/inn/timer.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -9,7 +9,7 @@
*/
#ifndef INN_TIMER_H
-#define INN_TIMER_H
+#define INN_TIMER_H 1
#include <inn/defines.h>
Modified: storage/buffindexed/buffindexed.h
===================================================================
--- storage/buffindexed/buffindexed.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ storage/buffindexed/buffindexed.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -1,10 +1,13 @@
+/* $Id$
+*/
+
#ifndef _BUFFINDEXED_H_
#define _BUFFINDEXED_H_
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+#include "config.h"
+BEGIN_DECLS
+
bool buffindexed_open(int mode);
bool buffindexed_groupstats(const char *group, int *lo, int *hi, int *count,
int *flag);
@@ -23,8 +26,6 @@
bool buffindexed_ctl(OVCTLTYPE type, void *val);
void buffindexed_close(void);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+END_DECLS
#endif /* _BUFFINDEXED_H_ */
Modified: storage/ovdb/ovdb.h
===================================================================
--- storage/ovdb/ovdb.h 2015-01-07 20:50:58 UTC (rev 9779)
+++ storage/ovdb/ovdb.h 2015-01-07 21:03:00 UTC (rev 9780)
@@ -1,10 +1,13 @@
+/* $Id$
+*/
+
#ifndef _OVDB_H_
#define _OVDB_H_
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+#include "config.h"
+BEGIN_DECLS
+
bool ovdb_open(int mode);
bool ovdb_groupstats(const char *group, int *lo, int *hi, int *count,
int *flag);
@@ -22,8 +25,6 @@
bool ovdb_ctl(OVCTLTYPE type, void *val);
void ovdb_close(void);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+END_DECLS
#endif /* _OVDB_H_ */
More information about the inn-committers
mailing list