Alter.Org.UA  
 << Back Home RU ru   Donate Donate www/www1/www2

binary GNU patch for FreeBSD 4.9

patch_bin.patch.v2.rar/tgz (9.3 Kb/9.6 Kb)

Patch for GNU patch utility (that is located in /usr/src/gnu/usr.bin/patch). Allows applying patch-files to binaries. There are tho troubles with standard patch:
  1. it has hardcoded maximum line size of 4096
  2. functions with different line-terminators are used. For file operations patch uses fgets() ('\n' is treated as EOL), for further string operations strxxx() are used ('\0' is treated as EOL)
Win-32 versions of these utilities workaround this problem with --text and --binary. Patch adds --binary switch and --buffersize switch for maximum line size tuning. Usually --buffersize 65536 is enough. You can also enable line-size autodetection using --buffersize 0.
Patch is based on FBSD 4.9 sources (patch.c - 1.4.6.3 2003/08/23 16:19:36)
Was checked under FBSD 4.9 and WinNT4.

patch_bin_v2.rar/tgz (42.1 Kb/44.9 Kb) - Full sources of patched patch utility.

And in addition simple perl-script w2u_patch.pl.rar/tgz (512 bytes/602 bytes) for converting paths in windows-generated patch-files to unix style (slashes....).

2004.04.12

Mail to alterX@alter.org.ua (remove X)  
designed by Alter aka Alexander A. Telyatnikov powered by Apache+PHP under FBSD © 2002-2017