summaryrefslogtreecommitdiffstats
path: root/lib/system.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'elfutils-0.174'Ulf Hermann2018-10-111-0/+1
|\ | | | | | | | | | | elfutils 0.174 release Change-Id: Ibcbdfca61cf0b65391ab6d0ad00f18ba61027e07
| * Consolidate error.h inclusion in system.hRoss Burton2018-07-051-0/+1
| | | | | | | | | | | | | | | | | | error.h isn't standard and so isn't part of the musl C library. To easy future porting, consolidate the inclusion of error.h into system.h. https://sourceware.org/bugzilla/show_bug.cgi?id=21008 Signed-off-by: Ross Burton <ross.burton@intel.com>
| * Avoid double-including config.hUlf Hermann2017-05-021-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config.h doesn't have include guards, so including it twice is bad. We deal with this by checking for PACKAGE_NAME, but only in some places. Once we start using gnulib, we will need to include config.h before any gnulib-generated headers. This is problematic if we include it transitively through our own private headers. In order to set a clear rule about inclusion of config.h, it is now included in every .c file as first header, but not in any header. This will definitely avoid double-inclusion and satisfy the condition that it has to be included before gnulib headers. It comes at the price of adding some redundancy, but there is no clean way to avoid this. Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
* | Use OS-specific pathsUlf Hermann2017-05-081-0/+16
| | | | | | | | | | | | | | | | | | | | In general we need to use ';' as path separator and '\' and directory separator on windows. The shell will automatically translate paths to some extent, but we have to call "pwd -W" rather than plain "pwd" to get something useful. Change-Id: I1a117d219a2aa00c1f77ae7d3a1d92b9bae526db Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Drop handrolled or #ifdef'ed libc replacementsUlf Hermann2017-04-281-5/+0
| | | | | | | | | | | | | | | | | | mempcpy, memrchr, rawmemchr, and argp are provided by gnulib now. We don't need to define them locally and we don't need to search for an external libargp. Change-Id: I131ca4bc2d77c597b99c296c28259a3600e5d1b5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Avoid double-including config.hUlf Hermann2017-04-261-4/+0
|/ | | | | | | | | | | | | | | | | config.h doesn't have include guards, so including it twice is bad. We deal with this by checking for PACKAGE_NAME, but only in some places. Once we start using gnulib, we will need to include config.h before any gnulib-generated headers. This is problematic if we include it transitively through our own private headers. In order to set a clear rule about inclusion of config.h, it is now included in every .c file as first header, but not in any header. This will definitely avoid double-inclusion and satisfy the condition that it has to be included before gnulib headers. It comes at the price of adding some redundancy, but there is no clean way to avoid this. Change-Id: Ib78dd7e058ef8ac93cd379dcd14a2ffbc86c1988 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Move print_version into printversion.{h|c}Ulf Hermann2017-02-171-16/+0
| | | | | | | | Rename version.c so that the implementation is called after the header and the header doesn't clash with the toplevel version.h. print_version depends on argp and is only used in the tools. Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
* Check for existence of mempcpyUlf Hermann2017-02-171-0/+5
| | | | | | If it doesn't exist, provide a definition based on memcpy. Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix TEMP_FAILURE_RETRY definition when not defined.Luiz Angelo Daros de Luca2016-12-301-1/+1
| | | | | | https://sourceware.org/bugzilla/show_bug.cgi?id=21001 Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
* http://elfutils.org/ is now hosted at http://sourceware.org/elfutils/Mark Wielaard2016-12-241-0/+2
| | | | | | | | | | | | | | | | | fedorahosted used to be our home, but we are now hosted at sourceware. Change the elfutils project home to http://elfutils.org/ Point hosted services (email, release, git, bug tracker and web pages) to https://sourceware.org/elfutils/ Move design notes from README to NOTES. Add URLs for home, releases, bugs, git and mailinglist to README. Make the --version output of all tools the same by using a common print_version function and update the publicly shown copyright holder to the elfutils developers. Signed-off-by: Mark Wielaard <mark@klomp.org>
* Do not depend on some non-POSIX features.Akihiko Odaki2016-10-131-0/+16
| | | | | | | | Define/open code memrchr, rawmemchr, powerof2 and TEMP_FAILURE_RETRY if not available through system headers. Signed-off-by: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> Signed-off-by: Mark Wielaard <mjw@redhat.com>
* lib: Provide MAX and MIN in system.hAkihiko Odaki2016-10-121-41/+7
| | | | | | | | | | This change also creates a new header file libeu.h to provide the prototypes for the function of libeu. That hides the definition of function crc32, which can conflict with zlib, from libelf. It also prevents mistakes to refer those functions from a component which doesn't link with libeu, such as libelf. Signed-off-by: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
* Unify {BE,LE}{32,64} in lib/system.h.Jan Kratochvil2013-04-261-0/+4
| | | | | | | | | | | | lib/ * system.h (LE64, BE64): Move here the definitions from libdwfl/link_map.c. libdwfl/ * link_map.c (BE32, BE64, LE32, LE64): Delete the definitions, move them to lib/system.h. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* Handle partial read or write.Adam Markey2012-10-101-6/+56
| | | | | | | | | Ran into a situation where pread was returning less data than requested for remote files on a networked filesystem. This patch modifies the IO wrappers to request the remaining data as long as no real errors occured. Signed-off-by: Adam Markey <adam@etinternational.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
* lib/Jan Kratochvil2012-10-081-0/+7
| | | | | | | | | | system.h (eu_static_assert): New macro. libdw/ cfi.c: New include system.h. (execute_cfi) (enough_registers): Clear new memory after realloc. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* Update name, license and contributor policy.Mark Wielaard2012-06-051-39/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change name from "Red Hat elfutils" to "elfutils". * Update license of standalone tools and test from GPLv2 to GPLv3+. * Change license of libraries from GPLv2+exception to GPLv2/LGPLv3+. * Add Developer Certificate of Origin based contributor policy. top-level: - COPYING: Upgraded from GPLv2 to GPLv3. - CONTRIBUTING, COPYING-GPLv2, COPYING-LGPLv3: New files. - NEWS: Added note about new contribution and license policy. - Makefile.am: Updated to GPLv3, added new files to EXTRA_DIST. - configure.ac: Update to GPLv3, changed AC_INIT name to 'elfutils'. backends, lib, libasm, libcpu, libdw, libdwfl, libebl, libelf: - All files updated to GPLv2/LGPLv3+. Except some very small files (<5 lines) which didn't have any headers at all before, the linker .maps files and the libcpu/defs files which only contain data and libelf/elf.h which comes from glibc and is under LGPLv2+. config: - elfutils.spec.in: Add new License: headers and new %doc files. - Update all license headers to GPLv2/LGPLv3+ for files used by libs. src, tests: - All files updated to GPLv3+. Except for the test bz2 data files, the linker maps and script files and some very small files (<5 lines) that don't have any headers. Signed-off-by: Richard Fontana <rfontana@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Color code output of nm and objdumpUlrich Drepper2012-01-211-0/+34
|
* Add demangling support to nmUlrich Drepper2011-10-021-0/+5
|
* Clean up byte order handling in md5 and sha1 code.Roland McGrath2011-07-091-1/+13
|
* Move argp_program_version_hook and argp_program_bug_address variablesUlrich Drepper2009-01-171-1/+13
| | | | in all programs into the .rodata section.
* Fix FSF address. No exception for libdwarf.Ulrich Drepper2006-04-041-1/+1
|
* propagate from branch 'com.redhat.elfutils.roland.pending' (head ↵Ulrich Drepper2006-04-041-11/+44
| | | | | | 4f8fc821345feef58624f0aa5b470d4827577d8c) to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
* merge of 333c187506c852455e9f7be44fa9adc360416217Ulrich Drepper2005-08-291-0/+8
| | | | and 79955b942e3f0ddc71117feea5754df61edcc42a
* 2005-08-24 Roland McGrath <roland@redhat.com>Roland McGrath2005-08-251-8/+0
| | | | | * line2addr.c (print_address): Omit () for DSOs.
* Fix more EINTR handling problems. Add jump prediction.Ulrich Drepper2005-08-291-0/+8
|
* Adjust for monotone.Ulrich Drepper2005-07-261-0/+40