• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

libevent / libevent / 653
81%

Build:
DEFAULT BRANCH: master
Ran 27 Feb 2019 08:24PM UTC
Jobs 1
Files 99
Run time 194min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
653

push

travis-ci

azat
Define `_GNU_SOURCE` properly/consistently per autoconf

Although `_GNU_SOURCE` can be defined as an arbitrary #define per the
glibc docs [1], it's best to define it in a manner consistent with the way
that autoconf defines it, i.e., `1`.

While this shouldn't matter in most cases, it does when the headers from
other projects follow the poorly defined GNU convention implemented by
autoconf and are included after the libevent's util.h header. An example
failure with clang, similar to the failure I encountered, is as follows:
```
$ printf "#define _GNU_SOURCE\n#define _GNU_SOURCE 1" | clang -c -x c -
<stdin>:2:9: warning: '_GNU_SOURCE' macro redefined [-Wmacro-redefined]
        ^
<stdin>:1:9: note: previous definition is here
        ^
1 warning generated.
```

This happened when compiling python [2] with a stale homebrew util.h file from
libevent (which admittedly would not happen in a correct libevent install, as the
header should be installed under /usr/local/include/event2/util.h). However, if
both headers had been combined (which is more likely), it would have failed as
shown above.

Removing the ad hoc definition unbreaks compiling python's pyconfig.h.in header
when included after util.h from libevent.

1. http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
2. https://github.com/python/cpython/blob/master/configure.ac#L126

Closes: #773 (cherry-picked)

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>

11016 of 13683 relevant lines covered (80.51%)

246981.43 hits per line

Jobs
ID Job ID Ran Files Coverage
1 653.1 (EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=debug" COVERALLS=yes) 27 Feb 2019 08:24PM UTC 0
80.51
Travis Job 653.1
Source Files on build 653
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #653
  • 5f87be42 on github
  • Prev Build on master (#652)
  • Next Build on master (#657)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc