#include <fcntl.h>
#include <assert.h>

/* Linux
moz2_0.zip:filesize 763601
0006c940: 0009 2a04 b500 6fb1 2a05 b500 6fb1 0000  ..*...o.*...o...
change to:
                 06             06
*/
#ifdef linux
#define BEGIN (0x0006c940+3)
#endif

/* Solaris 2.4 & Win 32:
moz2_0.zip:filesize 763604
0006c940: 006c 9900 092a 04b5 0054 b12a 05b5 0054  .l...*...T.*...T
change to:
                         06             06
*/

#if defined(solaris) || defined(win32) || defined(SGI)
#define BEGIN (0x0006c940+6)
#endif

/* HPUX
moz2_0.zip:filesize 763590
0006c930: 1db6 0074 9900 092a 04b5 0070 b12a 05b5  ...t...*...p.*..
change to:
                              06             06

*/
#ifdef hpux
#define BEGIN (0x6c930+8)
#endif

main()
{
        char *six = "\6";
        int fd = open("moz2_0.zip", O_RDWR);
        assert(fd != -1);
        assert(lseek(fd,BEGIN,0) == BEGIN);
        assert(write(fd, six, 1) == 1);
        assert(lseek(fd,BEGIN + 6,0) == BEGIN+6);
        assert(write(fd, six, 1) == 1);
}
