Fix _FILE_OFFSET_BITS redinition (solaris/autotools)

So firstly include our header (config.h) -- <evconfig-private.h>, and
only after it <sys/types.h> since latest has #ifdef guard, while our
config.h is not inteded for this.

And besides all this thing with LARGE_FILE is a abit awkward, since we
don't nefine _LP64/_LP32 anyway, and so we have next error actually (64bit VS
32bit):
==> solaris: In file included from ./util-internal.h:30:0,
==> solaris:                  from test/regress_ssl.c:49:
  ==> solaris: ./evconfig-private.h:29:0: warning: "_FILE_OFFSET_BITS" redefined
  ==> solaris:  #define _FILE_OFFSET_BITS 64
  ==> solaris:  ^
  ==> solaris: In file included from /usr/include/sys/types.h:17:0,
  ==> solaris:                  from test/regress_ssl.c:38:
  ==> solaris: /opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:196:0: note: this is the location of the previous definition
  ==> solaris:  #define _FILE_OFFSET_BITS 32
  ==> solaris:  ^

For cmake it commented in: 8b228e27f57300be61b57a41a2ec8666b726dc34
("Lot's of cmake updates")
This commit is contained in:
Azat Khuzhin 2016-12-06 13:15:27 +03:00
parent f7c70aef73
commit 336f3b11e5
2 changed files with 3 additions and 2 deletions

View File

@ -34,6 +34,8 @@
#include <windows.h>
#endif
#include "util-internal.h"
#ifndef _WIN32
#include <sys/types.h>
#include <sys/socket.h>
@ -46,7 +48,6 @@
#include "event2/bufferevent_struct.h"
#include "event2/buffer.h"
#include "event2/listener.h"
#include "util-internal.h"
#include "regress.h"
#include "tinytest.h"

View File

@ -25,6 +25,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "event2/event-config.h"
#include "util-internal.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -41,7 +42,6 @@
#include "event2/event.h"
#include "event2/event_compat.h"
#include "event2/event_struct.h"
#include "util-internal.h"
int called = 0;