* [PATCH] iptables: optionally disable largefile support.
@ 2010-05-10 7:30 Karl Hiramoto
2010-05-10 8:00 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Karl Hiramoto @ 2010-05-10 7:30 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber, Karl Hiramoto
Many toolchains for embedded systems don't have largefile support.
Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
---
configure.ac | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index f26facb..e8fe031 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,11 @@ AC_ARG_ENABLE([ipv4],
AC_ARG_ENABLE([ipv6],
AS_HELP_STRING([--disable-ipv6], [Do not build ip6tables]),
[enable_ipv6="$enableval"], [enable_ipv6="yes"])
+AC_ARG_ENABLE([largefile],
+ AS_HELP_STRING([--disable-largefile], [Do not build largefile support]),
+ [enable_largefile="$enableval"],
+ [enable_largefile="yes";
+ largefile_cflags='-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64'])
AC_ARG_ENABLE([devel],
AS_HELP_STRING([--enable-devel],
[Install Xtables development headers]),
@@ -59,6 +64,7 @@ AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = "yes"])
AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = "yes"])
AM_CONDITIONAL([ENABLE_IPV4], [test "$enable_ipv4" = "yes"])
AM_CONDITIONAL([ENABLE_IPV6], [test "$enable_ipv6" = "yes"])
+AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"])
AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"])
AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"])
@@ -66,7 +72,7 @@ PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
[nfnetlink=1], [nfnetlink=0])
AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
-regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
+regular_CFLAGS="${largefile_cflags} \
-D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
-Winline -pipe \
--
1.6.6.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] iptables: optionally disable largefile support.
2010-05-10 7:30 [PATCH] iptables: optionally disable largefile support Karl Hiramoto
@ 2010-05-10 8:00 ` Jan Engelhardt
2010-05-10 8:14 ` Karl Hiramoto
0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2010-05-10 8:00 UTC (permalink / raw)
To: Karl Hiramoto; +Cc: netfilter-devel, kaber
On Monday 2010-05-10 09:30, Karl Hiramoto wrote:
>Many toolchains for embedded systems don't have largefile support.
>
>+AC_ARG_ENABLE([largefile],
>+ AS_HELP_STRING([--disable-largefile], [Do not build largefile support]),
>+ [enable_largefile="$enableval"],
>+ [enable_largefile="yes";
>+ largefile_cflags='-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64'])
What is the actual problem you are experiencing? If the toolchain does
not support largefiles, the -D macros should not do anything, so that
conversely, their presence is not harmful.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iptables: optionally disable largefile support.
2010-05-10 8:00 ` Jan Engelhardt
@ 2010-05-10 8:14 ` Karl Hiramoto
2010-05-10 15:25 ` Patrick McHardy
0 siblings, 1 reply; 6+ messages in thread
From: Karl Hiramoto @ 2010-05-10 8:14 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
On 05/10/2010 10:00 AM, Jan Engelhardt wrote:
> What is the actual problem you are experiencing? If the toolchain does
> not support largefiles, the -D macros should not do anything, so that
> conversely, their presence is not harmful.
>
Uclibc include headers do checking see:
http://git.uclibc.org/uClibc/tree/include/features.h#n216
You get errors like:
usr/include/features.h:383:4: error: #error It appears you have defined
_FILE_OFFSET_BITS=64. Unfortunately, uClibc was built without large file
support enabled.
In file included from /build_armeb/staging_dir/usr/include/stdio.h:72,
from libiptc/libip4tc.c:18:
/build_armeb/staging_dir/usr/include/bits/uClibc_stdio.h:72:2: error:
#error Sorry... uClibc was built without large file support!
In file included from libiptc/libip4tc.c:18:
/build_armeb/staging_dir/usr/include/stdio.h:83: error: expected '=',
',', ';', 'asm' or '__attribute__' before 'fpos_t'
In file included from libiptc/libip4tc.c:18:
/build_armeb/staging_dir/usr/include/stdio.h:709: error: expected
declaration specifiers or '...' before 'fpos_t'
/build_armeb/staging_dir/usr/include/stdio.h:711: error: expected ';',
',' or ')' before '*' token
With this patch everything compiles and works fine.
--
Karl
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iptables: optionally disable largefile support.
2010-05-10 8:14 ` Karl Hiramoto
@ 2010-05-10 15:25 ` Patrick McHardy
2010-05-10 15:48 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Patrick McHardy @ 2010-05-10 15:25 UTC (permalink / raw)
To: Karl Hiramoto; +Cc: Jan Engelhardt, netfilter-devel
Karl Hiramoto wrote:
> On 05/10/2010 10:00 AM, Jan Engelhardt wrote:
>> What is the actual problem you are experiencing? If the toolchain does
>> not support largefiles, the -D macros should not do anything, so that
>> conversely, their presence is not harmful.
>>
> Uclibc include headers do checking see:
>
> http://git.uclibc.org/uClibc/tree/include/features.h#n216
>
>
> You get errors like:
>
>
> usr/include/features.h:383:4: error: #error It appears you have defined
> _FILE_OFFSET_BITS=64. Unfortunately, uClibc was built without large file
> support enabled.
> In file included from /build_armeb/staging_dir/usr/include/stdio.h:72,
> from libiptc/libip4tc.c:18:
> /build_armeb/staging_dir/usr/include/bits/uClibc_stdio.h:72:2: error:
> #error Sorry... uClibc was built without large file support!
> In file included from libiptc/libip4tc.c:18:
> /build_armeb/staging_dir/usr/include/stdio.h:83: error: expected '=',
> ',', ';', 'asm' or '__attribute__' before 'fpos_t'
> In file included from libiptc/libip4tc.c:18:
> /build_armeb/staging_dir/usr/include/stdio.h:709: error: expected
> declaration specifiers or '...' before 'fpos_t'
> /build_armeb/staging_dir/usr/include/stdio.h:711: error: expected ';',
> ',' or ')' before '*' token
>
>
> With this patch everything compiles and works fine.
Thanks for the explanation. Jan, can I assume you're OK with this patch?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iptables: optionally disable largefile support.
2010-05-10 15:25 ` Patrick McHardy
@ 2010-05-10 15:48 ` Jan Engelhardt
2010-05-10 15:52 ` Patrick McHardy
0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2010-05-10 15:48 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Karl Hiramoto, netfilter-devel
On Monday 2010-05-10 17:25, Patrick McHardy wrote:
>Karl Hiramoto wrote:
>> On 05/10/2010 10:00 AM, Jan Engelhardt wrote:
>>> What is the actual problem you are experiencing? If the toolchain does
>>> not support largefiles, the -D macros should not do anything, so that
>>> conversely, their presence is not harmful.
>>>
>> Uclibc include headers do checking see:
>>
>> http://git.uclibc.org/uClibc/tree/include/features.h#n216
>>
>>
>> You get errors like:
>>
>>
>> usr/include/features.h:383:4: error: #error It appears you have defined
>> _FILE_OFFSET_BITS=64. Unfortunately, uClibc was built without large file
>> support enabled.
>> In file included from /build_armeb/staging_dir/usr/include/stdio.h:72,
>> from libiptc/libip4tc.c:18:
>> /build_armeb/staging_dir/usr/include/bits/uClibc_stdio.h:72:2: error:
>> #error Sorry... uClibc was built without large file support!
>> In file included from libiptc/libip4tc.c:18:
>> /build_armeb/staging_dir/usr/include/stdio.h:83: error: expected '=',
>> ',', ';', 'asm' or '__attribute__' before 'fpos_t'
>> In file included from libiptc/libip4tc.c:18:
>> /build_armeb/staging_dir/usr/include/stdio.h:709: error: expected
>> declaration specifiers or '...' before 'fpos_t'
>> /build_armeb/staging_dir/usr/include/stdio.h:711: error: expected ';',
>> ',' or ')' before '*' token
>>
>>
>> With this patch everything compiles and works fine.
>
>Thanks for the explanation. Jan, can I assume you're OK with this patch?
Yeah. Time to bugger uclibc now :-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iptables: optionally disable largefile support.
2010-05-10 15:48 ` Jan Engelhardt
@ 2010-05-10 15:52 ` Patrick McHardy
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2010-05-10 15:52 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Karl Hiramoto, netfilter-devel
Jan Engelhardt wrote:
> On Monday 2010-05-10 17:25, Patrick McHardy wrote:
>
>> Karl Hiramoto wrote:
>>> On 05/10/2010 10:00 AM, Jan Engelhardt wrote:
>>>> What is the actual problem you are experiencing? If the toolchain does
>>>> not support largefiles, the -D macros should not do anything, so that
>>>> conversely, their presence is not harmful.
>>>>
>>> Uclibc include headers do checking see:
>>>
>>> http://git.uclibc.org/uClibc/tree/include/features.h#n216
>>>
>>>
>>> You get errors like:
>>>
>>>
>>> usr/include/features.h:383:4: error: #error It appears you have defined
>>> _FILE_OFFSET_BITS=64. Unfortunately, uClibc was built without large file
>>> support enabled.
>>> In file included from /build_armeb/staging_dir/usr/include/stdio.h:72,
>>> from libiptc/libip4tc.c:18:
>>> /build_armeb/staging_dir/usr/include/bits/uClibc_stdio.h:72:2: error:
>>> #error Sorry... uClibc was built without large file support!
>>> In file included from libiptc/libip4tc.c:18:
>>> /build_armeb/staging_dir/usr/include/stdio.h:83: error: expected '=',
>>> ',', ';', 'asm' or '__attribute__' before 'fpos_t'
>>> In file included from libiptc/libip4tc.c:18:
>>> /build_armeb/staging_dir/usr/include/stdio.h:709: error: expected
>>> declaration specifiers or '...' before 'fpos_t'
>>> /build_armeb/staging_dir/usr/include/stdio.h:711: error: expected ';',
>>> ',' or ')' before '*' token
>>>
>>>
>>> With this patch everything compiles and works fine.
>> Thanks for the explanation. Jan, can I assume you're OK with this patch?
>
> Yeah. Time to bugger uclibc now :-)
Applies, thanks everyone.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-10 15:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10 7:30 [PATCH] iptables: optionally disable largefile support Karl Hiramoto
2010-05-10 8:00 ` Jan Engelhardt
2010-05-10 8:14 ` Karl Hiramoto
2010-05-10 15:25 ` Patrick McHardy
2010-05-10 15:48 ` Jan Engelhardt
2010-05-10 15:52 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).