Re: [PATCH] common-minmax-2.1.99.diff.gz

Pavel Machek (pavel@atrey.karlin.mff.cuni.cz)
Mon, 4 May 1998 13:51:20 +0200


> common-minmax-2.1.99.diff:
>
> It solves the 'long awaited' problem that C files have to #define their
> own min/max. Now I've put it in <linux/kernel.h> because it is a
> frequently used header file [and is for generic purposes]. Only in two
> source files I had to add #include <linux/kernel.h> because it is not
> included by any other header file. I've only not changed ntfs.

You want to talk to mec@shout.net about this one. He did something
similar not-so-long ago.

Pavel

--- linux/include/net/tcp.h Sun May 3 20:36:48 1998
+++ linux-patched/include/net/tcp.h Sun May 3 20:39:48 1998
@@ -850,7 +850,7 @@
{
struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
/* Should be about 2 rtt's */
- net_reset_timer(sk, TIME_DONE, min(tp->srtt * 2,
TCP_DONE_TIME));
+ net_reset_timer(sk, TIME_DONE, MIN(tp->srtt * 2,
TCP_DONE_TIME));
sk->prot->unhash(sk);
/* fall through */
}

Warning: THIS IS TRICKY. Are you sure network's MIN are defined with
macro? If not, you may be breaking something.

Really talk to mec@shout.net. He did this and he did it right.

Pavel

-- 
The best software in life is free (not shareware)!		Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu