Re: commit - next round of libole2 fixes


Subject: Re: commit - next round of libole2 fixes
From: Michael D. Pritchett (MPritchett@attglobal.net)
Date: Wed Jun 07 2000 - 00:46:51 CDT


> I went ahead and committed the last round of changes by Jamie. The
Windows build still doesn't compile, but I am going to take a look at Dom's
suggestions and see what I can come up with.
>
Bob:

I don't know if this will help, but this is what I came up with to get
AbiWord to compile on my machine. I don't believe that I have broken
anything else, but unless you test you can never tell. It is down and dirty
and far from an elegant solution, but I wanted to get it working.

Right now I am too lazy to build a patch file for these changes so instead,
I describe the changes make with code snipets. Four files are involved.

Most of the problems seems to occur as windows MVC environment doesn't use
<unistd.h>. Currently wv ./configure doesn't correct this in the new libole2
stuff. So I attempted it manually.

wv/libole2/ms-ole.h
___was
#ifndef MS_OLE_H
#define MS_OLE_H

#include <fcntl.h> /* for mode_t */
#include <glib.h>

___now
#ifndef MS_OLE_H
#define MS_OLE_H

#include "config.h"
#ifdef HAVE_UNISTD_H
  #include <unistd.h>
#else
  #include <io.h>
  #define PROT_NONE 0
  #define PROT_READ 1
  #define PROT_WRITE 2
  #define PROT_EXEC 4

  #define S_IRUSR 0000400
  #define S_IWUSR 0000200
  #define S_IRGRP 0000040
  #define S_IWGRP 0000020

  #define _S_ISREG(m) (((m)&0170000) == 0100000)
  #define S_ISREG(m) _S_ISREG(m)

  #define O_NONBLOCK 0x4000

  typedef unsigned int guint32;
  typedef unsigned long mode_t;
  typedef /* signed */ long ssize_t;
  typedef /* signed */ long off_t;
#endif

#include <fcntl.h> /* for mode_t */
#include <glib.h>

wv/libole2/ms-ole.c
___commented out the following includes (now redundant in hte ms-ole.h file)
/*#include <unistd.h>*/
/*#include <fcntl.h>*/
/*#include <glib.h>*/
/*#include "config.h"*/

abi/src/wp/impexp/xp/Makefile
___rewrote the includes at the bottom to look like this
ifeq ($(OS_NAME), WIN32)
INCLUDES= -I$(ABI_XX_ROOT)/../wv -I$(ABI_XX_ROOT)/../zlib -I$(ABI_XX_ROOT)/
../wv/libole2
else
INCLUDES= -I$(ABI_ROOT)/../wv -I$(ABI_ROOT)/../wv/libole2
endif

ifdef GLIB_CONFIG
else
 ifeq ($(OS_NAME), WIN32)
  INCLUDES+= -I$(ABI_XX_ROOT)/../wv/glib-wv
 else
  INCLUDES+= -I$(ABI_ROOT)/../wv/glib-wv
 endif
endif

abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp
___changed line 92 from
 if (wvInitParser(&ps,szFilename))

___to
 if (wvInitParser(&ps,(char *)szFilename))

I hope this helps!

Cheers!

Michael D. Pritchett
newbie



This archive was generated by hypermail 2b25 : Tue Jun 06 2000 - 22:40:34 CDT