diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h index b05efd3f0f..fcb7af7ab4 100644 --- a/build/rpmbuild_internal.h +++ b/build/rpmbuild_internal.h @@ -282,10 +282,6 @@ typedef enum rpmParseState_e { #define ALLOW_EMPTY (1 << 16) -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmbuild * Create and initialize rpmSpec structure. * @return spec spec file control structure @@ -672,8 +668,4 @@ void doPatchMacro(rpmMacroBuf mb, rpmMacroEntry me, ARGV_t margs, size_t *parsed RPM_GNUC_INTERNAL const struct sectname_s *getSection(const char *name, int part); -#ifdef __cplusplus -} -#endif - #endif /* _RPMBUILD_INTERNAL_H */ diff --git a/build/rpmbuild_misc.h b/build/rpmbuild_misc.h index 3e27120db8..2c90710e0c 100644 --- a/build/rpmbuild_misc.h +++ b/build/rpmbuild_misc.h @@ -5,10 +5,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmbuild * Truncate comment lines. * @param s skip white space, truncate line at '#' @@ -66,8 +62,4 @@ void appendStringBufAux(StringBuf sb, const char * s, int nl); RPM_GNUC_INTERNAL int parseUnsignedNum(const char * line, uint32_t * res); -#ifdef __cplusplus -} -#endif - #endif /* _RPMBUILD_MISC_H */ diff --git a/lib/backend/dbi.h b/lib/backend/dbi.h index 489c00942b..d5de3b873a 100644 --- a/lib/backend/dbi.h +++ b/lib/backend/dbi.h @@ -121,10 +121,6 @@ union _dbswap { typedef rpmRC (*idxfunc)(dbiIndex dbi, dbiCursor dbc, const char *keyp, size_t keylen, dbiIndexItem rec); -#ifdef __cplusplus -extern "C" { -#endif - RPM_GNUC_INTERNAL rpmRC tag2index(dbiIndex dbi, rpmTagVal rpmtag, unsigned int hdrNum, Header h, idxfunc idxupdate); @@ -284,8 +280,4 @@ extern struct rpmdbOps_s sqlite_dbops; RPM_GNUC_INTERNAL extern struct rpmdbOps_s dummydb_dbops; -#ifdef __cplusplus -} -#endif - #endif /* _DBI_H */ diff --git a/lib/backend/dbiset.h b/lib/backend/dbiset.h index da196c8656..a863888042 100644 --- a/lib/backend/dbiset.h +++ b/lib/backend/dbiset.h @@ -16,10 +16,6 @@ typedef struct dbiIndexSet_s { size_t alloced; /*!< alloced size */ } * dbiIndexSet; -#ifdef __cplusplus -extern "C" { -#endif - /* Create an empty index set, optionally with sizehint reservation for recs */ RPM_GNUC_INTERNAL dbiIndexSet dbiIndexSetNew(unsigned int sizehint); @@ -124,7 +120,4 @@ unsigned int dbiIndexRecordFileNumber(dbiIndexSet set, unsigned int recno); RPM_GNUC_INTERNAL dbiIndexSet dbiIndexSetFree(dbiIndexSet set); -#ifdef __cplusplus -} -#endif #endif diff --git a/lib/cpio.h b/lib/cpio.h index b31ef2d2f8..56de26634b 100644 --- a/lib/cpio.h +++ b/lib/cpio.h @@ -14,10 +14,6 @@ typedef struct rpmcpio_s * rpmcpio_t; -#ifdef __cplusplus -extern "C" { -#endif - /** * Create CPIO file object * @param fd file @@ -72,8 +68,4 @@ void rpmcpioSetExpectedFileSize(rpmcpio_t cpio, off_t fsize); ssize_t rpmcpioRead(rpmcpio_t cpio, void * buf, size_t size); -#ifdef __cplusplus -} -#endif - #endif /* H_CPIO */ diff --git a/lib/fprint.h b/lib/fprint.h index 25d6b9a129..87fc619d5a 100644 --- a/lib/fprint.h +++ b/lib/fprint.h @@ -22,10 +22,6 @@ struct rpmffi_s { int fileno; }; -#ifdef __cplusplus -extern "C" { -#endif - /** * Create finger print cache. * @param sizeHint number of elements expected @@ -117,8 +113,4 @@ fingerPrint * fpLookupList(fingerPrintCache cache, rpmstrPool pool, rpmsid * dirNames, rpmsid * baseNames, const uint32_t * dirIndexes, int fileCount); -#ifdef __cplusplus -} -#endif - #endif diff --git a/lib/fsm.h b/lib/fsm.h index 616e93aa20..fb25a92458 100644 --- a/lib/fsm.h +++ b/lib/fsm.h @@ -9,10 +9,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - typedef struct rpmpsm_s * rpmpsm; /** @@ -36,8 +32,5 @@ int rpmfiArchiveReadToFilePsm(rpmfi fi, FD_t fd, int nodigest, rpmpsm psm); RPM_GNUC_INTERNAL void rpmpsmNotify(rpmpsm psm, rpmCallbackType what, rpm_loff_t amount); -#ifdef __cplusplus -} -#endif #endif /* H_FSM */ diff --git a/lib/header_internal.h b/lib/header_internal.h index 63e4fd80cd..ded353bda8 100644 --- a/lib/header_internal.h +++ b/lib/header_internal.h @@ -24,10 +24,6 @@ struct hdrblob_s { uint32_t rdl; }; -#ifdef __cplusplus -extern "C" { -#endif - RPM_GNUC_INTERNAL hdrblob hdrblobCreate(void); @@ -65,8 +61,5 @@ ssize_t Freadall(FD_t fd, void * buf, ssize_t size); RPM_GNUC_INTERNAL int headerIsSourceHeuristic(Header h); -#ifdef __cplusplus -} -#endif #endif /* H_HEADER_INTERNAL */ diff --git a/lib/manifest.h b/lib/manifest.h index 111d0980a5..41e720549d 100644 --- a/lib/manifest.h +++ b/lib/manifest.h @@ -6,10 +6,6 @@ * Routines to expand a manifest containing glob expressions into an argv list. */ -#ifdef __cplusplus -extern "C" { -#endif - /** * Return ls(1)-like formatted mode string. * @param mode file mode @@ -27,8 +23,4 @@ char * rpmPermsString(int mode) */ rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, char *** argvPtr); -#ifdef __cplusplus -} -#endif - #endif /* H_MANIFEST */ diff --git a/lib/misc.h b/lib/misc.h index e2f234bcf8..73f4b2ff7b 100644 --- a/lib/misc.h +++ b/lib/misc.h @@ -13,10 +13,6 @@ typedef const struct headerFmt_s * headerFmt; -#ifdef __cplusplus -extern "C" { -#endif - /* known arch? */ RPM_GNUC_INTERNAL int rpmIsKnownArch(const char *name); @@ -62,8 +58,4 @@ RPM_GNUC_INTERNAL void rpmRelocationBuild(Header h, rpmRelocation *rawrelocs, int *rnrelocs, rpmRelocation **rrelocs, uint8_t **rbadrelocs); -#ifdef __cplusplus -} -#endif - #endif /* H_MISC */ diff --git a/lib/rpmal.h b/lib/rpmal.h index 80827695c5..b095fc2d2f 100644 --- a/lib/rpmal.h +++ b/lib/rpmal.h @@ -9,10 +9,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - typedef struct rpmal_s * rpmal; /** @@ -85,8 +81,4 @@ rpmte rpmalSatisfiesDepend(const rpmal al, const rpmte te, const rpmds ds); RPM_GNUC_INTERNAL unsigned int rpmalLookupTE(const rpmal al, const rpmte te); -#ifdef __cplusplus -} -#endif - #endif /* H_RPMAL */ diff --git a/lib/rpmchroot.h b/lib/rpmchroot.h index ba7dea504b..1c3f5b6ebd 100644 --- a/lib/rpmchroot.h +++ b/lib/rpmchroot.h @@ -3,10 +3,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmchroot * Set or clear process-wide chroot directory. * Calling this while chrooted is an error. @@ -37,9 +33,4 @@ int rpmChrootOut(void); /* RPM_GNUC_INTERNAL */ int rpmChrootDone(void); -#ifdef __cplusplus -} -#endif - - #endif /* _RPMCHROOT_H */ diff --git a/lib/rpmdb_internal.h b/lib/rpmdb_internal.h index 523f74f519..8cd1cb6c11 100644 --- a/lib/rpmdb_internal.h +++ b/lib/rpmdb_internal.h @@ -8,10 +8,6 @@ #include #include "backend/dbi.h" -#ifdef __cplusplus -extern "C" { -#endif - #define HASHTYPE packageHash #define HTKEYTYPE unsigned int #define HTDATATYPE struct rpmte_s * @@ -214,8 +210,4 @@ unsigned int rpmdbGetIteratorOffsetFor(rpmdbMatchIterator mi, unsigned int ix); RPM_GNUC_INTERNAL Header rpmdbGetHeaderAt(rpmdb db, unsigned int offset); -#ifdef __cplusplus -} -#endif - #endif diff --git a/lib/rpmds_internal.h b/lib/rpmds_internal.h index fbba05e2f7..ad5348c7ad 100644 --- a/lib/rpmds_internal.h +++ b/lib/rpmds_internal.h @@ -3,10 +3,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmds * Swiss army knife dependency matching function. * @param pool string pool (or NULL for private pool) @@ -86,8 +82,5 @@ int rpmdsCompareIndex(rpmds A, int aix, rpmds B, int bix); */ RPM_GNUC_INTERNAL rpmds rpmdsFilterTi(rpmds ds, int ti); -#ifdef __cplusplus -} -#endif #endif /* _RPMDS_INTERNAL_H */ diff --git a/lib/rpmfi_internal.h b/lib/rpmfi_internal.h index 7751398f2d..81902c35a2 100644 --- a/lib/rpmfi_internal.h +++ b/lib/rpmfi_internal.h @@ -9,10 +9,6 @@ #define RPMFIMAGIC 0x09697923 -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmfi * Callback on file iterator directory changes * @param fi file info @@ -124,9 +120,6 @@ rpmfiles rpmfiFiles(rpmfi fi); */ RPM_GNUC_INTERNAL rpmfi rpmfilesFindPrefix(rpmfiles fi, const char *pfx); -#ifdef __cplusplus -} -#endif #endif /* _RPMFI_INTERNAL_H */ diff --git a/lib/rpmfs.h b/lib/rpmfs.h index d502c1dd99..795f59e024 100644 --- a/lib/rpmfs.h +++ b/lib/rpmfs.h @@ -18,10 +18,6 @@ struct sharedFileInfo_s { char rstate; }; -#ifdef __cplusplus -extern "C" { -#endif - RPM_GNUC_INTERNAL rpmfs rpmfsNew(rpm_count_t fc, int initState); @@ -57,8 +53,4 @@ void rpmfsSetAction(rpmfs fs, unsigned int ix, rpmFileAction action); RPM_GNUC_INTERNAL void rpmfsResetActions(rpmfs fs); -#ifdef __cplusplus -} -#endif - #endif /* _RPMFS_H */ diff --git a/lib/rpmgi.h b/lib/rpmgi.h index ed6b1a7d85..c232b0ec04 100644 --- a/lib/rpmgi.h +++ b/lib/rpmgi.h @@ -8,10 +8,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmgi */ enum rpmgiFlags_e { @@ -58,8 +54,4 @@ Header rpmgiNext(rpmgi gi); RPM_GNUC_INTERNAL int rpmgiNumErrors(rpmgi gi); -#ifdef __cplusplus -} -#endif - #endif /* H_RPMGI */ diff --git a/lib/rpmlead.h b/lib/rpmlead.h index 80db44e810..9d381c57b6 100644 --- a/lib/rpmlead.h +++ b/lib/rpmlead.h @@ -5,10 +5,6 @@ * \file rpmlead.h * Routines to read and write an rpm lead structure for a a package. */ -#ifdef __cplusplus -extern "C" { -#endif - #define RPMLEAD_BINARY 0 #define RPMLEAD_SOURCE 1 @@ -35,8 +31,4 @@ rpmRC rpmLeadWrite(FD_t fd, Header h); */ rpmRC rpmLeadRead(FD_t fd, char **emsg); -#ifdef __cplusplus -} -#endif - #endif /* _H_RPMLEAD */ diff --git a/lib/rpmlock.h b/lib/rpmlock.h index 308794feaa..7bd09a8d8f 100644 --- a/lib/rpmlock.h +++ b/lib/rpmlock.h @@ -11,10 +11,6 @@ enum { RPMLOCK_WAIT = 1 << 2, }; -#ifdef __cplusplus -extern "C" { -#endif - RPM_GNUC_INTERNAL rpmlock rpmlockNew(const char *lock_path, const char *descr); @@ -30,8 +26,4 @@ void rpmlockRelease(rpmlock lock); RPM_GNUC_INTERNAL rpmlock rpmlockFree(rpmlock lock); -#ifdef __cplusplus -} -#endif - #endif diff --git a/lib/rpmplugins.h b/lib/rpmplugins.h index 97408f0813..97a9eb7ccc 100644 --- a/lib/rpmplugins.h +++ b/lib/rpmplugins.h @@ -5,10 +5,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmplugins * Create a new plugins structure * @param ts transaction set @@ -168,7 +164,4 @@ rpmRC rpmpluginsCallFsmFilePrepare(rpmPlugins plugins, rpmfi fi, int fd, const char *path, const char *dest, mode_t mode, rpmFsmOp op); -#ifdef __cplusplus -} -#endif #endif /* _PLUGINS_H */ diff --git a/lib/rpmscript.h b/lib/rpmscript.h index 01962a4de2..f864a6c7a7 100644 --- a/lib/rpmscript.h +++ b/lib/rpmscript.h @@ -47,10 +47,6 @@ typedef struct rpmScript_s * rpmScript; typedef const char *(*nextfilefunc)(void *); -#ifdef __cplusplus -extern "C" { -#endif - RPM_GNUC_INTERNAL rpmTagVal triggerDsTag(rpmscriptTriggerModes tm); @@ -96,7 +92,4 @@ int rpmScriptChrootIn(rpmScript script); RPM_GNUC_INTERNAL int rpmScriptChrootOut(rpmScript script); -#ifdef __cplusplus -} -#endif #endif /* _RPMSCRIPT_H */ diff --git a/lib/rpmte_internal.h b/lib/rpmte_internal.h index 99b548fccd..40809e2148 100644 --- a/lib/rpmte_internal.h +++ b/lib/rpmte_internal.h @@ -34,10 +34,6 @@ enum addOp_e { RPMTE_RESTORE = 3, }; -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmte * Create a transaction element. * @param ts transaction set @@ -122,9 +118,5 @@ rpmRC rpmpsmRun(rpmts ts, rpmte te, pkgGoal goal); RPM_GNUC_INTERNAL int rpmteAddOp(rpmte te); -#ifdef __cplusplus -} -#endif - #endif /* _RPMTE_INTERNAL_H */ diff --git a/lib/rpmtriggers.h b/lib/rpmtriggers.h index 63b1556dfd..5c2502e1b2 100644 --- a/lib/rpmtriggers.h +++ b/lib/rpmtriggers.h @@ -16,11 +16,6 @@ typedef struct rpmtriggers_s { int alloced; } *rpmtriggers; -#ifdef __cplusplus -extern "C" { -#endif - - RPM_GNUC_INTERNAL rpmtriggers rpmtriggersCreate(unsigned int hint); @@ -78,8 +73,5 @@ rpmRC runFileTriggers(rpmts ts, rpmte te, int arg2, rpmsenseFlags sense, RPM_GNUC_INTERNAL rpmRC runImmedFileTriggers(rpmts ts, rpmte te, int arg1, rpmsenseFlags sense, rpmscriptTriggerModes tm, int priorityClass); -#ifdef __cplusplus -} -#endif #endif /* _RPMTRIGGERS_H */ diff --git a/lib/rpmts_internal.h b/lib/rpmts_internal.h index 28cccaa9b6..a8b49d0a82 100644 --- a/lib/rpmts_internal.h +++ b/lib/rpmts_internal.h @@ -96,10 +96,6 @@ struct rpmts_s { time_t overrideTime; /*!< Time value used when overriding system clock. */ }; -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmts * Return transaction global string pool handle, creating the pool if needed. * @param ts transaction set @@ -141,7 +137,4 @@ int rpmtsNotifyChange(rpmts ts, int event, rpmte te, rpmte other); RPM_GNUC_INTERNAL rpm_time_t rpmtsGetTime(rpmts ts, time_t step); -#ifdef __cplusplus -} -#endif #endif /* _RPMTS_INTERNAL_H */ diff --git a/lib/rpmug.h b/lib/rpmug.h index bca3ce3e89..9f7001a1f4 100644 --- a/lib/rpmug.h +++ b/lib/rpmug.h @@ -4,10 +4,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - RPM_GNUC_INTERNAL int rpmugUid(const char * name, uid_t * uid); @@ -23,9 +19,4 @@ const char * rpmugGname(gid_t gid); RPM_GNUC_INTERNAL void rpmugFree(void); -#ifdef __cplusplus -} -#endif - - #endif /* _RPMUG_H */ diff --git a/lib/rpmvs.h b/lib/rpmvs.h index 4085db9524..e45b20e92a 100644 --- a/lib/rpmvs.h +++ b/lib/rpmvs.h @@ -45,10 +45,6 @@ struct rpmsinfo_s { */ typedef int (*rpmsinfoCb)(struct rpmsinfo_s *sinfo, void *cbdata); -#ifdef __cplusplus -extern "C" { -#endif - const char *rpmsinfoDescr(struct rpmsinfo_s *sinfo); char *rpmsinfoMsg(struct rpmsinfo_s *sinfo); @@ -75,8 +71,4 @@ int rpmvsVerify(struct rpmvs_s *sis, int type, rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, hdrblob *sigblobp, hdrblob *blobp, char **emsg); -#ifdef __cplusplus -} -#endif - #endif /* _RPMVS_H */ diff --git a/lib/signature.h b/lib/signature.h index 33eec6d4d1..2b0cabc9fa 100644 --- a/lib/signature.h +++ b/lib/signature.h @@ -7,10 +7,6 @@ */ #include -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup signature * Read (and verify header+payload size) signature header. * If an old-style signature is found, we emulate a new style one. @@ -43,8 +39,4 @@ rpmRC rpmGenerateSignature(char *SHA256, char *SHA1, uint8_t *MD5, rpm_loff_t size, rpm_loff_t payloadSize, FD_t fd, int rpmver); -#ifdef __cplusplus -} -#endif - #endif /* H_SIGNATURE */ diff --git a/rpmio/rpmhook.h b/rpmio/rpmhook.h index 842c126461..b82187941a 100644 --- a/rpmio/rpmhook.h +++ b/rpmio/rpmhook.h @@ -16,10 +16,6 @@ typedef struct rpmhookArgs_s { typedef int (*rpmhookFunc) (rpmhookArgs args, void *data); -#ifdef __cplusplus -extern "C" { -#endif - rpmhookArgs rpmhookArgsNew(int argc); rpmhookArgs rpmhookArgsFree(rpmhookArgs args); @@ -30,8 +26,4 @@ void rpmhookUnregisterAll(const char *name); void rpmhookCall(const char *name, const char *argt, ...); void rpmhookCallArgs(const char *name, rpmhookArgs args); -#ifdef __cplusplus -} -#endif - #endif diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h index 2cc9dfeadf..21d083db72 100644 --- a/rpmio/rpmio_internal.h +++ b/rpmio/rpmio_internal.h @@ -8,10 +8,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - void fdSetBundle(FD_t fd, rpmDigestBundle bundle); rpmDigestBundle fdGetBundle(FD_t fd, int create); @@ -70,8 +66,4 @@ RPM_GNUC_INTERNAL extern const FDIO_t zstdio; #endif -#ifdef __cplusplus -} -#endif - #endif /* H_RPMIO_INTERNAL */ diff --git a/rpmio/rpmlua.h b/rpmio/rpmlua.h index 4fee655abd..5b1e18f4ab 100644 --- a/rpmio/rpmlua.h +++ b/rpmio/rpmlua.h @@ -15,6 +15,10 @@ extern "C" { #include #include +#ifdef __cplusplus +} +#endif + typedef char * (*rpmluarl)(const char *); rpmlua rpmluaNew(void); @@ -34,8 +38,4 @@ void rpmluaPushPrintBuffer(rpmlua lua); char *rpmluaCallStringFunction(rpmlua lua, const char *function, struct rpmhookArgs_s *args); -#ifdef __cplusplus -} -#endif - #endif /* RPMLUA_H */ diff --git a/rpmio/rpmmacro_internal.h b/rpmio/rpmmacro_internal.h index 719f833c71..9fc1ee6f34 100644 --- a/rpmio/rpmmacro_internal.h +++ b/rpmio/rpmmacro_internal.h @@ -10,10 +10,6 @@ * Internal Macro API */ -#ifdef __cplusplus -extern "C" { -#endif - /** \ingroup rpmmacro * Find the end of a macro call * @param str pointer to the character after the initial '%' @@ -34,8 +30,4 @@ void splitQuoted(ARGV_t *av, const char * str, const char * seps); RPM_GNUC_INTERNAL char *unsplitQuoted(ARGV_const_t av, const char *sep); -#ifdef __cplusplus -} -#endif - #endif /* _H_ MACRO_INTERNAL */ diff --git a/sign/rpmsignfiles.h b/sign/rpmsignfiles.h index 48d07a0f3b..44ab0391f2 100644 --- a/sign/rpmsignfiles.h +++ b/sign/rpmsignfiles.h @@ -11,6 +11,10 @@ extern "C" { /* This doesn't have c++ guards on its own */ #include +#ifdef __cplusplus +} +#endif + /** * Sign file digests in header into signature header * @param sigh package signature header @@ -22,8 +26,4 @@ extern "C" { RPM_GNUC_INTERNAL rpmRC rpmSignFiles(Header sigh, Header h, const char *key, char *keypass); -#ifdef __cplusplus -} -#endif - #endif /* H_RPMSIGNFILES */ diff --git a/sign/rpmsignverity.h b/sign/rpmsignverity.h index 16e6c98572..96f5588d47 100644 --- a/sign/rpmsignverity.h +++ b/sign/rpmsignverity.h @@ -4,10 +4,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - /* * Block size used to generate the Merkle tree for fsverity. For now * we only support 4K blocks, if we ever decide to support different @@ -29,8 +25,4 @@ RPM_GNUC_INTERNAL rpmRC rpmSignVerity(FD_t fd, Header sigh, Header h, char *key, char *keypass, char *cert, uint16_t algo); -#ifdef __cplusplus -} -#endif - #endif /* H_RPMSIGNVERITY */