From: Ralf Corsépius Date: Mon, 8 Oct 2007 08:05:06 +0000 (+0200) Subject: 'Adjust extern C {} blocks.' X-Git-Tag: rpm-4.6.0-rc1~1702 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6ffa9891fcd1e5e2b66d3dc543165fb475716c0;p=platform%2Fupstream%2Frpm.git 'Adjust extern C {} blocks.' --- diff --git a/build/rpmbuild.h b/build/rpmbuild.h index 7f61b8c..fb8aaf2 100644 --- a/build/rpmbuild.h +++ b/build/rpmbuild.h @@ -14,6 +14,10 @@ /* but this will be needed */ #include "rpmspec.h" +#ifdef __cplusplus +extern "C" { +#endif + /** \ingroup rpmbuild * Bit(s) to control buildSpec() operation. */ @@ -73,10 +77,6 @@ typedef enum rpmParseState_e { #define STRIP_TRAILINGSPACE (1 << 0) #define STRIP_COMMENTS (1 << 1) -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmbuild * Destroy uid/gid caches. */ diff --git a/build/rpmfc.h b/build/rpmfc.h index 0f4afd4..d9115e4 100644 --- a/build/rpmfc.h +++ b/build/rpmfc.h @@ -3,6 +3,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + extern int _rpmfc_debug; /** @@ -62,10 +66,6 @@ struct rpmfcTokens_s { */ typedef struct rpmfcTokens_s * rpmfcToken; -#ifdef __cplusplus -extern "C" { -#endif - /** * Return helper output. * @param av helper argv (with possible macros) diff --git a/build/rpmspec.h b/build/rpmspec.h index 567cc0f..b6603c0 100644 --- a/build/rpmspec.h +++ b/build/rpmspec.h @@ -6,6 +6,10 @@ * The rpmSpec and Package data structures used during build. */ +#ifdef __cplusplus +extern "C" { +#endif + /** \ingroup rpmbuild */ typedef struct Package_s * Package; @@ -169,10 +173,6 @@ struct Package_s { Package next; }; -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmbuild * Create and initialize rpmSpec structure. * @return spec spec file control structure diff --git a/lib/idtx.h b/lib/idtx.h index 99d720c..dbe3b37 100644 --- a/lib/idtx.h +++ b/lib/idtx.h @@ -3,6 +3,10 @@ #include "rpmlib.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * * A rollback transaction id element. * */ @@ -71,4 +75,8 @@ IDTX IDTXload(rpmts ts, rpmTag tag); */ IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag); +#ifdef __cplusplus +} +#endif + #endif /* H_RPMIDTX */ diff --git a/lib/rpmal.h b/lib/rpmal.h index cbd6ebd..503837c 100644 --- a/lib/rpmal.h +++ b/lib/rpmal.h @@ -6,6 +6,10 @@ * Structures used for managing added/available package lists. */ +#ifdef __cplusplus +extern "C" { +#endif + extern int _rpmal_debug; /** @@ -23,10 +27,6 @@ typedef void * rpmalKey; * */ typedef intptr_t rpmalNum; -#ifdef __cplusplus -extern "C" { -#endif - /** * Initialize available packckages, items, and directory list. * @param delta no. of entries to add on each realloc diff --git a/lib/rpmcli.h b/lib/rpmcli.h index 9229127..85d690e 100644 --- a/lib/rpmcli.h +++ b/lib/rpmcli.h @@ -11,15 +11,15 @@ #include "argv.h" #include "idtx.h" +#ifdef __cplusplus +extern "C" { +#endif + /** \ingroup rpmcli * Should version 3 packages be produced? */ extern int _noDirTokens; -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmcli * Popt option table for options shared by all modes and executables. */ diff --git a/lib/rpmds.h b/lib/rpmds.h index e4b251b..bad5e40 100644 --- a/lib/rpmds.h +++ b/lib/rpmds.h @@ -8,6 +8,10 @@ #include "rpmps.h" +#ifdef __cplusplus +extern "C" { +#endif + /** */ extern int _rpmds_debug; @@ -41,10 +45,6 @@ struct rpmds_s { }; #endif /* _RPMDS_INTERNAL */ -#ifdef __cplusplus -extern "C" { -#endif - /** * Unreference a dependency set instance. * @param ds dependency set diff --git a/lib/rpmfi.h b/lib/rpmfi.h index baed1dc..5cc01a7 100644 --- a/lib/rpmfi.h +++ b/lib/rpmfi.h @@ -6,6 +6,10 @@ * Structure(s) used for file info tag sets. */ +#ifdef __cplusplus +extern "C" { +#endif + extern int _rpmfi_debug; #if defined(_RPMFI_INTERNAL) @@ -134,10 +138,6 @@ int nrefs; /*!< Reference count. */ #endif /* _RPMFI_INTERNAL */ -#ifdef __cplusplus -extern "C" { -#endif - /** * Unreference a file info set instance. * @param fi file info set diff --git a/lib/rpmgi.h b/lib/rpmgi.h index 7064d17..fd9cc5d 100644 --- a/lib/rpmgi.h +++ b/lib/rpmgi.h @@ -10,6 +10,10 @@ #include "rpmts.h" #include "argv.h" +#ifdef __cplusplus +extern "C" { +#endif + /** */ extern int _rpmgi_debug; @@ -60,10 +64,6 @@ struct rpmgi_s { }; #endif -#ifdef __cplusplus -extern "C" { -#endif - /** * Unreference a generalized iterator instance. * @param gi generalized iterator diff --git a/lib/rpmlib.h b/lib/rpmlib.h index 7cd9bee..5b6b0aa 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -14,6 +14,10 @@ #include "header.h" #include +#ifdef __cplusplus +extern "C" { +#endif + /** * Package read return codes. */ @@ -37,10 +41,6 @@ extern const char * rpmEVR; extern int rpmFLAGS; -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmtrans * The RPM Transaction Set. * Transaction sets are inherently unordered! RPM may reorder transaction diff --git a/lib/rpmps.h b/lib/rpmps.h index 1a8a453..a749cbd 100644 --- a/lib/rpmps.h +++ b/lib/rpmps.h @@ -6,6 +6,10 @@ * Structures and prototypes used for an "rpmps" problem set. */ +#ifdef __cplusplus +extern "C" { +#endif + extern int _rpmps_debug; /** @@ -57,10 +61,6 @@ struct rpmps_s { int nrefs; /*!< Reference count. */ }; -#ifdef __cplusplus -extern "C" { -#endif - /** * Return formatted string representation of a problem. * @param prob rpm problem diff --git a/lib/rpmte.h b/lib/rpmte.h index 2edf04f..476841e 100644 --- a/lib/rpmte.h +++ b/lib/rpmte.h @@ -8,6 +8,10 @@ #include "rpmal.h" +#ifdef __cplusplus +extern "C" { +#endif + /** */ extern int _rpmte_debug; @@ -113,10 +117,6 @@ struct rpmtsi_s { #endif /* _RPMTE_INTERNAL */ -#ifdef __cplusplus -extern "C" { -#endif - /** * Destroy a transaction element. * @param te transaction element diff --git a/lib/rpmts.h b/lib/rpmts.h index 857b537..f4f3740 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -9,6 +9,10 @@ #include "rpmps.h" #include "rpmsw.h" +#ifdef __cplusplus +extern "C" { +#endif + extern int _rpmts_debug; extern int _rpmts_stats; extern int _fps_debug; @@ -294,10 +298,6 @@ struct rpmts_s { }; #endif /* _RPMTS_INTERNAL */ -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmts * Check that all dependencies can be resolved. * @param ts transaction set diff --git a/lib/stringbuf.h b/lib/stringbuf.h index a5fa7e6..e4336ec 100644 --- a/lib/stringbuf.h +++ b/lib/stringbuf.h @@ -5,16 +5,16 @@ * */ -/** - */ -typedef struct StringBufRec *StringBuf; - #ifdef __cplusplus extern "C" { #endif /** */ +typedef struct StringBufRec *StringBuf; + +/** + */ StringBuf newStringBuf(void); /** diff --git a/rpmio/argv.h b/rpmio/argv.h index e944754..2a7a85f 100644 --- a/rpmio/argv.h +++ b/rpmio/argv.h @@ -5,6 +5,10 @@ * \file rpmio/argv.h */ +#ifdef __cplusplus +extern "C" { +#endif + typedef const char * ARGstr_t; typedef ARGstr_t * ARGV_t; @@ -15,10 +19,6 @@ struct ARGI_s { }; typedef struct ARGI_s * ARGI_t; -#ifdef __cplusplus -extern "C" { -#endif - /** * Print argv array elements. * @param msg output message prefix (or NULL) diff --git a/rpmio/rpmerr.h b/rpmio/rpmerr.h index 211f1ad..71e63b4 100644 --- a/rpmio/rpmerr.h +++ b/rpmio/rpmerr.h @@ -8,6 +8,10 @@ #include "rpmlog.h" +#ifdef __cplusplus +extern "C" { +#endif + #define _em(_e) \ (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_ERR)) #define _wm(_e) \ @@ -120,5 +124,8 @@ typedef enum rpmerrCode_e { #define rpmErrorSetCallback(_cb) rpmlogSetCallback(_cb) typedef rpmlogCallback rpmErrorCallBackType; +#ifdef __cplusplus +} +#endif #endif /* H_RPMERR */ diff --git a/rpmio/rpmio.h b/rpmio/rpmio.h index e6b8aa1..1bb4b9b 100644 --- a/rpmio/rpmio.h +++ b/rpmio/rpmio.h @@ -14,6 +14,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** */ typedef struct pgpDig_s * pgpDig; @@ -46,10 +50,6 @@ typedef struct _FD_s * FD_t; */ typedef struct FDIO_s * FDIO_t; -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmio * \name RPMIO Vectors. */ diff --git a/rpmio/rpmlog.h b/rpmio/rpmlog.h index 624a7e7..6727b8a 100644 --- a/rpmio/rpmlog.h +++ b/rpmio/rpmlog.h @@ -9,6 +9,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /** * RPM Log levels. * priorities/facilities are encoded into a single 32-bit quantity, where the @@ -157,10 +161,6 @@ typedef struct rpmlogRec_s { const char * message; } * rpmlogRec; -#ifdef __cplusplus -extern "C" { -#endif - /** * Return number of rpmError() ressages. * @return number of messages diff --git a/rpmio/rpmmacro.h b/rpmio/rpmmacro.h index 2e27c05..2b58ecd 100644 --- a/rpmio/rpmmacro.h +++ b/rpmio/rpmmacro.h @@ -5,6 +5,10 @@ * \file rpmio/rpmmacro.h */ +#ifdef __cplusplus +extern "C" { +#endif + /*! The structure used to store a macro. */ typedef struct rpmMacroEntry_s { struct rpmMacroEntry_s *prev;/*!< Macro entry stack. */ @@ -46,10 +50,6 @@ extern const char * macrofiles; #define RMIL_OLDSPEC -1 #define RMIL_GLOBAL 0 -#ifdef __cplusplus -extern "C" { -#endif - /** * Print macros to file stream. * @param mc macro context (NULL uses global context). diff --git a/rpmio/rpmmessages.h b/rpmio/rpmmessages.h index 6f52e2d..0b26d1a 100644 --- a/rpmio/rpmmessages.h +++ b/rpmio/rpmmessages.h @@ -8,6 +8,10 @@ #include "rpmlog.h" +#ifdef __cplusplus +extern "C" { +#endif + #define RPMMESS_DEBUG RPMLOG_DEBUG #define RPMMESS_VERBOSE RPMLOG_INFO #define RPMMESS_NORMAL RPMLOG_NOTICE @@ -60,10 +64,6 @@ typedef enum rpmCallbackType_e { */ typedef void * rpmCallbackData; -#ifdef __cplusplus -extern "C" { -#endif - /** */ typedef void * (*rpmCallbackFunction) diff --git a/rpmio/rpmpgp.h b/rpmio/rpmpgp.h index 758aee8..18ce5e4 100644 --- a/rpmio/rpmpgp.h +++ b/rpmio/rpmpgp.h @@ -12,6 +12,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + #if !defined(_BEECRYPT_API_H) typedef unsigned char byte; #endif /* _BEECRYPT_API_H */ @@ -954,10 +958,6 @@ typedef enum rpmDigestFlags_e { } rpmDigestFlags; -#ifdef __cplusplus -extern "C" { -#endif - /** * Return (native-endian) integer from big-endian representation. * @param s pointer to big-endian integer diff --git a/rpmio/rpmsq.h b/rpmio/rpmsq.h index 52a47f0..0d0f4fa 100644 --- a/rpmio/rpmsq.h +++ b/rpmio/rpmsq.h @@ -8,6 +8,10 @@ #include "rpmsw.h" +#ifdef __cplusplus +extern "C" { +#endif + /** */ typedef struct rpmsig_s * rpmsig; @@ -48,10 +52,6 @@ extern rpmsq rpmsqQueue; extern sigset_t rpmsqCaught; -#ifdef __cplusplus -extern "C" { -#endif - /** * Insert node into from queue. * @param elem node to link diff --git a/rpmio/rpmsw.h b/rpmio/rpmsw.h index 0ece223..d9f62d1 100644 --- a/rpmio/rpmsw.h +++ b/rpmio/rpmsw.h @@ -5,6 +5,10 @@ * \file rpmio/rpmsw.h */ +#ifdef __cplusplus +extern "C" { +#endif + /** \ingroup rpmio */ typedef unsigned long int rpmtime_t; @@ -37,10 +41,6 @@ struct rpmop_s { rpmtime_t usecs; /*!< Number of ticks. */ }; -#ifdef __cplusplus -extern "C" { -#endif - /** Return benchmark time stamp. * @param *sw time stamp * @return 0 on success diff --git a/rpmio/rpmurl.h b/rpmio/rpmurl.h index 1c768c5..8bd599b 100644 --- a/rpmio/rpmurl.h +++ b/rpmio/rpmurl.h @@ -7,6 +7,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /** * Supported URL types. */ @@ -44,10 +48,6 @@ struct urlinfo_s { int magic; }; -#ifdef __cplusplus -extern "C" { -#endif - extern int _url_debug; /*!< URL debugging? */ /**