Fri 17 Mar 2006 12:57:39 AM UTC, original submission:
Thanks for the utilities. I just ported it to DJGPP. It ported very easily, so I could have ported it to OpenWatcom as well, but I don't have the time. The following lists the changes necessary:
1) added missing getopt files, from DJGPP's make (or many other DJGPP utils...)
getopt.h
getopt.c
getopt1.c
gettext.h
1a) fix bug line 695 of getopt.c
if (opterr) missing braces around if-else
1b) fix bug line 108 of getopt.h no args
extern int getopt (int argc, char const argv, const char *optstring);
2) changed global #include <getopt.h> to local "getopt.h" in files:
bioddecode.c
dmiopt.c
ownership.c
vpdopt.c
#ifdef _DJGPP_
#include "getopt.h"
#else
#include <getopt.h>
#endif
3) changed config.h #ifndef _BEOS_
#if !defined( _BEOS_ ) && !defined( _DJGPP_ )
4) fixed bug in vpddecode.c line 356 missing cast
(unsigned long)0xf0000+fp);
5) changed util.c #ifndef USE_MMAP
#if !defined( USE_MMAP ) && !defined( _DJGPP_ )
6) changed DJGPP routine to util.c mem_chunk()
void mem_chunk(size_t base, size_t len, const char devmem)
{
#ifndef _DJGPP_
/* original body of mem_chunk() function goes here */
#else /* DJGPP */
#include <go32.h>
#include <dpmi.h>
#include <sys\nearptr.h>
unsigned long CS_base;
void *p;
if((p=malloc(len))==NULL)
{
perror("malloc");
return NULL;
}
__dpmi_get_segment_base_address(_my_cs(), &CS_base);
__djgpp_nearptr_enable();
memcpy(p,(unsigned char *)base-CS_base,len);
return p;
#endif /* DJGPP */
}
7) copy makefile to makefile.dj and add to rules and rules for getopt.o and
getopt1.o to makefile
Rod Pemberton
PS You can post to comp.os.mdos.djgpp if you need to contact me.
PPS You need to have your isp turn greylisting off and spam filtering off. -unavailable- and -unavailable- both refuse to authenticate my email client. Due to the difficulties getting this to you, I shouldn't have bothered trying to post this here either...
|