[dev] pertag and bstack patches to dwm incompatible

From: Donald Allen <donaldcallen_AT_gmail.com>
Date: Wed, 7 Jul 2010 11:08:13 -0400

dwm-5.8.2: if you attempt to apply both the pertag and bstack patches to
dwm, the resulting code will not compile. The reason is that the definition
of the monitor struct is moved after the include of config.h in dwm.c by
the pertag patch. The bstack patch includes the bstack and bstackhoriz
functions (which reference the monitor struct) in config.h. The code won't
compile, because those references to the monitor struct are now forward

I have fixed this by inserting the bstack and bstackhoriz functions directly
into dwm.c, just after the analogous tile function. Function prototypes for
bstack and bstackhoriz are also needed in the /* Function declarations */
section. For the community, this could easily be fixed by generating a .diff
to dwm.c for the bstack patch, rather than including the code in config.h.

I also note that simply attempting to apply the bstack patch fails (I did
this with vanilla 5.8.2 -- no pertag patch applied):

patch -p1 < dwm-5.8.2-bstack.diff
patching file bstack.c
patching file bstackhoriz.c
patching file config.def.h
Hunk #1 succeeded at 29 with fuzz 1.
Hunk #2 FAILED at 36.
1 out of 2 hunks FAILED -- saving rejects to file config.def.h.rej

It appears that whoever updated this patch for 5.8.2 didn't bother to test
whether it actually worked, which is disappointing. I hand-edited the lines
that patch refused to insert.

Received on Wed Jul 07 2010 - 17:08:13 CEST

This archive was generated by hypermail 2.2.0 : Wed Jul 07 2010 - 17:12:01 CEST