BoundedIntArg: Allow unsigned bounds.

Requested by Cliff Frey. Requires rigamarole. Simultaneously, prefer
click_intmax_t to click_int_large_t and so forth.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Add test for lexer problem reported by Asa Zernik.
Correct lexer error demonstrated by last test.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Support atomic_cmpxchg on architectures that define it as a function

Click uses the C-preprocessor to determine whether an architecture
has defined atomic_cmpxchg. The ARM architecture (among others)
defines this as an inline function, so Click will not attempt
to use atomic_cmpxchg on those architectures. This causes the
warning "using nonatomic approximation..." when building for SMP
on ARM.

Signed-off-by: Kevin Paul Herbert <kph@meraki.net>
Merge pull request #63 from kph/atomic

Support atomic_cmpxchg on architectures that define it as a function
Fix ac_cv_linuxmodule_click_skb_recycle test.

Add -Werror-implicit-function-declaration to ac_cv_linuxmodule_click_skb_recycle
test to detect if skb_recycle actually return sk_buff ptr. Otherwise, autoconf
logs a warning about implicit declaration and passes.
packet.cc: Clear tx_flags for kernels with SKBTX_DEV_ZEROCOPY

Ensure that tx_flags is cleared for kernels which have SKBTX_DEV_ZEROCOPY
when uniqueifying a packet. If the flag is not cleared, the kernel
will jump to a random address when the skb is eventually freed.

Signed-off-by: Kevin Paul Herbert <kph@meraki.net>
fixincludes: Add fixup for enum migrate_mode

Add a fixup for enum migrate_mode, added in
mainline Linux a6bc32b899223a877f595ef9ddc1e89ead5072b8.

Apparantly this forward referenced enum was causing problems
for other compilers as well, so the need for this is resolved
in 6536e3123e5d3371a6f52e32a3d0694bcc987702.

Unfortunately, Ubuntu is presently shipping a kernel with this problem.
The change to fixincludes.pl should work for all versions.

Signed-off-by: Kevin Paul Herbert <kph@meraki.net>
fix negative MAXLENGTH support
testcase: Idle -> Print(MAXLENGTH -1) -> Discard;
Merge pull request #66 from shoban/master

Fix complile issue for older kernels.
Merge pull request #65 from aquila/master

Fix negative MAXLENGTH support in Print
Update configure as well.
Fix find_left() in empty-string case
String::find_left fixes, again.
Merge pull request #64 from kph/kernel-compat

Kernel compat
Tweak.
String::find_left again.
Fix ntohq/htonq on big-endian machines.

Markku Savela report. Oy.
Bitvector: Fix a bug in explicit Bitvector constructor.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Json: Fix a bug in (const_)?array_iterator
const_array_iterator::live() was not checking for null _cjson; this was causing
segfaults/kernel panics trying to iterate over an empty, non-uniqueified array.