summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/macros.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove code tagged APT_PKG_590, add some missing includesJulian Andres Klode2020-02-181-7/+0
| | | | | | 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.
* Bump ABI to 6.0Julian Andres Klode2020-02-181-2/+2
|
* Raise buffer size for Hashes::AddFD() from 4 KiB to 64 KiBJulian Andres Klode2020-01-141-0/+3
| | | | | | 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.
* Only define likely/unlikely if APT_COMPILING_APT setJulian Andres Klode2020-01-071-0/+2
| | | | This ensures that we do not leak simple words like that.
* Remove various unused macros like MAX/MIN/ABS/APT_CONSTJulian Andres Klode2020-01-071-33/+0
| | | | | 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.
* Rename _count() macro to APT_ARRAY_SIZE()Julian Andres Klode2020-01-071-1/+1
|
* Avoid #define _error, use anonymous C++ struct insteadJulian Andres Klode2020-01-071-0/+2
| | | | | | | | | | | | 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
* RFC1123StrToTime: Accept const std::string& as first argumentJulian Andres Klode2019-06-171-0/+7
| | | | | | We are converting to std::string anyway by passing to istringstream, and this removes the need for .c_str() in callers.
* Run unifdef -DAPT_{8,9,10,15}_CLEANER_HEADERSJulian Andres Klode2019-06-121-20/+0
|
* Change soname to libapt-pkg.so.5.90Julian Andres Klode2019-05-061-2/+2
| | | | | This is a bit experimental, and we'll go through a few stages before reaching libapt-pkg.so.6.0.
* Bump SONAMEs in preparation for ABI breaksJulian Andres Klode2019-02-261-2/+2
|
* deprecate the single-line deprecation ignoring macroDavid Kalnischkies2017-12-131-0/+1
| | | | | | | | | | 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
* Redefine APT_CONST to mean APT_PUREJulian Andres Klode2017-08-241-1/+2
| | | | | | | | | | | | | | | | | | | | | 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.
* clean archives without changing directoryDavid Kalnischkies2017-06-261-1/+1
| | | | | Adopting this change in other frontends will require source changes as well similar to our own changes in apt-private/.
* add support for Build-Depends/Conflicts-ArchJohannes Schauer2016-11-091-1/+1
| | | | | | | | | | | | | | 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
* Revert "Revert "appease adequate with some weak symbols for -private""Julian Andres Klode2015-11-281-0/+2
| | | | This reverts commit 7ac9386cb6e272625490fcf3e8183b45e28bbc43.
* Revert "appease adequate with some weak symbols for -private"Julian Andres Klode2015-11-281-2/+0
| | | | | | This reverts commit 28f24d3dad1844af316337d565ba2ebc11c8ce97. This fails on Ubuntu as they build with -Bsymbolic-functions.
* add messages to our deprecation warnings in libaptDavid Kalnischkies2015-11-271-0/+2
| | | | Git-Dch: Ignore
* appease adequate with some weak symbols for -privateDavid Kalnischkies2015-11-271-0/+2
| | | | Closes: #806422
* change to libapt-pkg abi 5.0 with versioned symbolsDavid Kalnischkies2015-08-101-2/+2
| | | | | | | | | | | 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.
* implement reverse_iterators for cachesetsDavid Kalnischkies2015-08-101-0/+6
| | | | | | | | 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
* fix macro definition for very old GCC < 3David Kalnischkies2015-05-111-1/+1
| | | | Git-Dch: Ignore
* use a abi version check similar to the gcc checkDavid Kalnischkies2014-11-081-0/+1
| | | | Git-Dch: Ignore
* replace ignore-deprecated #pragma dance with _PragmaDavid Kalnischkies2014-11-081-0/+16
| | | | | | | | | 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
* Bump ABI to 4.15Michael Vogt2014-11-051-1/+1
|
* Bump library version to libapt-pkg4.14Michael Vogt2014-10-031-1/+1
|
* apt-pkg/contrib/macros.h: bump library version to 4.13Michael Vogt2014-05-071-1/+1
|
* enable fvisibility=hidden for our private libraryDavid Kalnischkies2014-03-211-0/+4
| | | | | | | | | | 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
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-4/+4
| | | | | | | | 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)
* move defines for version to macros.hDavid Kalnischkies2014-03-131-17/+67
| | | | | | also adds namespaced attributes for good usage Git-Dch: Ignore
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-1/+1
|
* replace every call to toupper with one to our own tolower_asciiDavid Kalnischkies2010-03-301-4/+6
| | | | | | | | | | 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.
* [BREAK] merge MultiArch-ABI. We don't support MultiArch,David Kalnischkies2010-02-131-16/+16
| | | | | | | | | 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.
* cleanup the error header a bit by moving the printf-macros outDavid Kalnischkies2010-01-301-0/+9
| | | | and remove the using std::string
* * apt-pkg/contrib/macros.h:David Kalnischkies2010-01-301-0/+79
- move the header system.h with a new name to the public domain, to be able to use it in other headers (Closes: #567662)