Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] off_t size problem

Maxim Dounin
November 09, 2011 02:54PM
Hello!

On Wed, Nov 09, 2011 at 04:48:38PM +0800, Simon Liu wrote:

> Nginx define _FILE_OFFSET_BITS=64 in linux platform(ngx_linux_config.h),
> and it will cause size of off_t is 8 byte. Therefore it should include
> nginx header file in starting position of other module(must be before
> <sys/types.h>), otherwise off_t will be 4 byte(32 bit system) in the
> module, this will be to cause some confusion .
>
> I think use gcc -D will be better.

Not really. Failing to include nginx headers before anything else
will cause other problems as well (e.g. take a look at
ngx_win32_config.h), and moving _FILE_OFFSET_BITS to compiler
arguments won't solve the problem but rather hide it.

Maxim Dounin

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] off_t size problem

Simon Liu 2277 November 09, 2011 03:50AM

Re: [PATCH] off_t size problem

Maxim Dounin 1015 November 09, 2011 02:54PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 135
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready