summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/macros.h
AgeCommit message (Collapse)Author
2020-02-18Remove code tagged APT_PKG_590, add some missing includesJulian Andres Klode
Remove all code scheduled to be removed after 5.90, and fix files to include files they previously got from hashes.h including more headers.
2020-02-18Bump ABI to 6.0Julian Andres Klode
2020-01-14Raise buffer size for Hashes::AddFD() from 4 KiB to 64 KiBJulian Andres Klode
Move APT_BUFFER_SIZE to macros.h and re-use it in hashes, this also might speed up stuff, the motivation for using 64 KiB buffers in fileutl.cc was precisely that after all.
2020-01-07Only define likely/unlikely if APT_COMPILING_APT setJulian Andres Klode
This ensures that we do not leak simple words like that.
2020-01-07Remove various unused macros like MAX/MIN/ABS/APT_CONSTJulian Andres Klode
We don't use them, APT_CONST is APT_PURE now, and MAX/MIN/etc are available as proper templates in the C++ standard library.
2020-01-07Rename _count() macro to APT_ARRAY_SIZE()Julian Andres Klode
2020-01-07Avoid #define _error, use anonymous C++ struct insteadJulian Andres Klode
Replace the macro with an anonymous struct that provides an inline operator->() returning the _error pointer. This change is ABI compatible, and the inline macro is not exported. We should consider if we want to avoid the function call and directly export the thread_local variable instead, when we do break ABI. Closes: #948338
2019-06-17RFC1123StrToTime: Accept const std::string& as first argumentJulian Andres Klode
We are converting to std::string anyway by passing to istringstream, and this removes the need for .c_str() in callers.
2019-06-12Run unifdef -DAPT_{8,9,10,15}_CLEANER_HEADERSJulian Andres Klode
2019-05-06Change soname to libapt-pkg.so.5.90Julian Andres Klode
This is a bit experimental, and we'll go through a few stages before reaching libapt-pkg.so.6.0.
2019-02-26Bump SONAMEs in preparation for ABI breaksJulian Andres Klode
2017-12-13deprecate the single-line deprecation ignoring macroDavid Kalnischkies
gcc has problems understanding this construct and additionally thinks it would produce multiple lines and stuff, so to keep using it isn't really worth it for the few instances we have: We can just write the long form there which works better. Reported-By: gcc Gbp-Dch: Ignore
2017-08-24Redefine APT_CONST to mean APT_PUREJulian Andres Klode
Functions marked with the const attribute may not inspect any global memory. This includes targets of pointers or references passed as arguments. A pure function however is free to inspect memory, but may not have any side effects. The function StringSplit() was marked as const, but took two references to strings. When the second one was passed as a literal as in StringSplit(name, "::") the compiler cleverly figured out that we only inspect the address of "::" (since StringSplit is const) and thus optimized away the "::" content. While patching out individual broken uses of APT_CONST would be possible, this is already the second case, and there might be more, so let's redefine APT_CONST to use the pure attribute, so we don't end up with the same situation again in some time.
2017-06-26clean archives without changing directoryDavid Kalnischkies
Adopting this change in other frontends will require source changes as well similar to our own changes in apt-private/.
2016-11-09add support for Build-Depends/Conflicts-ArchJohannes Schauer
These new enum values might cause "interesting" behaviour in tools not expecting them – like an old apt would think a Build-Conflicts-Arch is some sort of Build-Depends – but that can't reasonably be avoided and effects only packages using B-D/C-A so if there is any breakage the tools can easily be adapted. The APT_PKG_RELEASE number is increased so that libapt users can detect the availability of these new enum fields via: #if APT_PKG_ABI > 500 || (APT_PKG_ABI == 500 && APT_PKG_RELEASE >= 1) Closes: #837395
2015-11-28Revert "Revert "appease adequate with some weak symbols for -private""Julian Andres Klode
This reverts commit 7ac9386cb6e272625490fcf3e8183b45e28bbc43.
2015-11-28Revert "appease adequate with some weak symbols for -private"Julian Andres Klode
This reverts commit 28f24d3dad1844af316337d565ba2ebc11c8ce97. This fails on Ubuntu as they build with -Bsymbolic-functions.
2015-11-27add messages to our deprecation warnings in libaptDavid Kalnischkies
Git-Dch: Ignore
2015-11-27appease adequate with some weak symbols for -privateDavid Kalnischkies
Closes: #806422
2015-08-10change to libapt-pkg abi 5.0 with versioned symbolsDavid Kalnischkies
We changed an aweful lot of stuff, so 5.0 is properly better than 4.X as a semantic version and as we are at it lets add some trivial symbol versioning as well: We just mark all exported symbols with the same version for now. This isn't really the proper thing to do as if we add symbols in later versions (with the same abi) they will get the same symbols version, but our .symbols file will protect us from the problems arising from this as it will ensure that a package acutally depends on a version of the abi high enough to include the symbol.
2015-08-10implement reverse_iterators for cachesetsDavid Kalnischkies
By further abstracting the iterator templates we can wrap the reverse iterators of the wrapped containers and share code in a way that iterator creating is now more template intensive, but shorter in code. Git-Dch: Ignore
2015-05-11fix macro definition for very old GCC < 3David Kalnischkies
Git-Dch: Ignore
2014-11-08use a abi version check similar to the gcc checkDavid Kalnischkies
Git-Dch: Ignore
2014-11-08replace ignore-deprecated #pragma dance with _PragmaDavid Kalnischkies
For compatibility we use/provide and fill quiet some deprecated methods and fields, which subsequently earns us a warning for using them. These warnings therefore have to be disabled for these codeparts and that is what this change does now in a slightly more elegant way. Git-Dch: Ignore
2014-11-05Bump ABI to 4.15Michael Vogt
2014-10-03Bump library version to libapt-pkg4.14Michael Vogt
2014-05-07apt-pkg/contrib/macros.h: bump library version to 4.13Michael Vogt
2014-03-21enable fvisibility=hidden for our private libraryDavid Kalnischkies
While it is a huge undertaking to enable it for our public libraries as basically everything we exported so far could be seen as public interface our private library is new and under our full control, so we can do whatever we like with it. The benefits are not that big in return of course, but it reduces the size a bit, so thats great nontheless. Git-Dch: ignore
2014-03-13cleanup headers and especially #includes everywhereDavid Kalnischkies
Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
2014-03-13move defines for version to macros.hDavid Kalnischkies
also adds namespaced attributes for good usage Git-Dch: Ignore
2014-02-22Fix typos in documentation (codespell)Michael Vogt
2010-03-30replace every call to toupper with one to our own tolower_asciiDavid Kalnischkies
This sounds like a premature optimization and since Mr. Knuth we all know that they are the root of all evil - but, and here it starts to be interesting: As the tolower_ascii method is by far the most called method we have (~60 Mio. times) and as we compare only strings containing ascii characters (package names, configuration options) using our own method reduces execution time of APT by 4% plus it avoids that the locale settings can influence us.
2010-02-13[BREAK] merge MultiArch-ABI. We don't support MultiArch,David Kalnischkies
but we support the usage of the new ABI so libapt users can start to prepare for MultiArch (Closes: #536029) MultiArch isn't ready for Primetime usage for now, but the branch has managed to be a NOP if used in SingleArch-mode so we can start to promote the use of the new MultiArchable API-extensions.
2010-01-30cleanup the error header a bit by moving the printf-macros outDavid Kalnischkies
and remove the using std::string
2010-01-30* apt-pkg/contrib/macros.h:David Kalnischkies
- move the header system.h with a new name to the public domain, to be able to use it in other headers (Closes: #567662)