--- djvulibre-3.5.12.os2\libdjvu\GOS.cpp	Sun Oct 19 15:12:54 2003
+++ djvulibre-3.5.12\libdjvu\GOS.cpp	Fri May  2 22:38:08 2003
@@ -72,11 +72,6 @@
 #include <math.h>
 #include <string.h>
 
-#ifdef OS2
-#define INCL_DOS
-#include <os2.h>
-#endif
-
 #ifdef WIN32
 #include <atlbase.h>
 #include <windows.h>
@@ -88,7 +83,7 @@
 
 
 
-#if defined(UNIX) || defined(OS2)
+#ifdef UNIX
 # include <errno.h>
 # include <sys/types.h>
 # include <sys/stat.h>
@@ -148,7 +143,7 @@
 #if defined(UNIX)
   static const char tilde='~';
   static const char root[] = "/";
-#elif defined(WIN32) || defined(OS2)
+#elif defined(WIN32)
   static const char root[] = "\\";
 #elif defined(macintosh)
   static char const * const root = &nillchar;
@@ -166,7 +161,7 @@
 {
 #if defined(UNIX)
   return fname.rsearch('/',0);
-#elif defined(WIN32) || defined(OS2)
+#elif defined(WIN32)
   return fname.rcontains("\\/",0);
 #elif defined(macintosh)
   return fname.rcontains(":/",0);
@@ -186,7 +181,7 @@
     return gfname;
 
   const char *fname=gfname;
-#if defined(WIN32) || defined(OS2)
+#ifdef WIN32
   // Special cases
   if (fname[1] == colon)
   {
@@ -272,28 +267,24 @@
 unsigned long
 GOS::ticks()
 {
-#if defined(UNIX)
+#ifdef UNIX
   struct timeval tv;
   if (gettimeofday(&tv, NULL) < 0)
     G_THROW(errmsg());
   return (unsigned long)( ((tv.tv_sec & 0xfffff)*1000)
                           + (tv.tv_usec/1000) );
-#elif defined(WIN32)
+#else
+#ifdef WIN32
   DWORD clk = GetTickCount();
   return (unsigned long)clk;
-#elif defined(OS2)
-
-  ULONG clk = 0;
-
-  DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, (PVOID)&clk, sizeof(ULONG));
-
-  return clk;
-
-#elif defined(macintosh)
+#else
+#ifdef macintosh
   return (unsigned long)((double)TickCount()*16.66);
 #else
 #error "Define something here for your operating system"
 #endif
+#endif  
+#endif
 }
 
 // sleep(int milliseconds) --
@@ -314,9 +305,6 @@
 #ifdef WIN32
   Sleep(milliseconds);
 #endif
-#ifdef OS2
-  DosSleep(milliseconds);
-#endif
 #ifdef macintosh
     unsigned long tick = ticks(), now;
     while (1) {
@@ -404,7 +392,7 @@
 GUTF8String
 GOS::cwd(const GUTF8String &dirname)
 {
-#if defined(UNIX) || defined(macintosh) || defined(OS2)
+#if defined(UNIX) || defined(macintosh) 
   if (dirname.length() && chdir(dirname.getUTF82Native())==-1)//MBCS cvt
     G_THROW(errmsg());
   char *string_buffer;
--- djvulibre-3.5.12.os2\libdjvu\GURL.cpp	Sun Oct 19 15:27:26 2003
+++ djvulibre-3.5.12\libdjvu\GURL.cpp	Tue Jun 17 23:27:22 2003
@@ -101,7 +101,7 @@
 # endif
 #endif
 
-#if defined(UNIX) || defined(OS2)
+#ifdef UNIX
 # include <unistd.h>
 # include <sys/types.h>
 # include <sys/stat.h>
@@ -186,7 +186,7 @@
 #if defined(UNIX)
   static const char tilde='~';
   static const char root[] = "/";
-#elif defined(WIN32) || defined(OS2)
+#elif defined(WIN32)
   static const char root[] = "\\";
 #elif defined(macintosh)
   static char const * const root = &nillchar;
@@ -293,7 +293,7 @@
   // Convert /./ stuff into plain /
   for(;(ptr=strstr(start, "/./"));collapse(ptr, 2))
     EMPTY_LOOP;
-#if defined(WIN32) || defined(OS2)
+#ifdef WIN32
   if(!xurl.cmp(filespec,sizeof(filespec)-1))
   {
 	int offset=1;
@@ -443,7 +443,7 @@
 GURL::GURL(const GNativeString & url_in)
   : url(url_in.getNative2UTF8()), validurl(false)
 {
-#if defined(WIN32) || defined(OS2)
+#ifdef WIN32
   if(is_valid() && is_local_file_url())
   {
     GURL::Filename::UTF8 xurl(UTF8Filename());
@@ -1077,7 +1077,7 @@
   for (; *s; s++,d++)
   {
     // Convert directory separator to slashes
-#if defined(WIN32) || defined(OS2)
+#ifdef WIN32
     if (*s == backslash || *s== slash)
 #else
 #ifdef macintosh
@@ -1341,7 +1341,7 @@
     retval = expand_name(url_ptr,root);
 #endif
 
-#if defined(WIN32) || defined(OS2)
+#ifdef WIN32
     if (url_ptr[0] && url_ptr[1]=='|' && url_ptr[2]== slash)
     {
       if ((url_ptr[0]>='a' && url_ptr[0]<='z')
@@ -1368,7 +1368,7 @@
   return UTF8Filename().getUTF82Native();
 }
 
-#if defined(UNIX) || defined(macintosh) || defined(OS2)
+#if defined(UNIX) || defined(macintosh)
 static int
 urlstat(const GURL &url,struct stat &buf)
 {
@@ -1384,7 +1384,7 @@
   bool retval=false;
   if(is_local_file_url())
   {
-#if defined(UNIX) || defined(macintosh) || defined(OS2)
+#if defined(UNIX) || defined(macintosh)
     struct stat buf;
     if (!urlstat(*this,buf))
     {
@@ -1427,7 +1427,7 @@
   bool retval=false;
   if(is_local_file_url())
   {
-#if defined(UNIX) || defined(macintosh) || defined(OS2)
+#if defined(UNIX) || defined(macintosh)
     struct stat buf;
     retval=!urlstat(*this,buf);
 #else
@@ -1468,7 +1468,7 @@
   if(is_local_file_url())
   {
     // UNIX implementation
-#if defined(UNIX) || defined(macintosh) || defined(OS2)
+#if defined(UNIX) || defined(macintosh)
     struct stat buf;
     if (!urlstat(*this,buf))
     {
@@ -1587,7 +1587,7 @@
   GList<GURL> retval;
   if(is_dir())
   {
-#if defined(UNIX) || defined(OS2)
+#if defined(UNIX)
     DIR * dir=opendir(NativeFilename());//MBCS cvt
     for(dirent *de=readdir(dir);de;de=readdir(dir))
     {
@@ -1950,7 +1950,7 @@
     EMPTY_LOOP;
   *s = 0;
   return ((string_buffer[0]==colon)?(string_buffer+1):string_buffer);
-#elif   defined(UNDER_CE) || defined(OS2)
+#elif   defined(UNDER_CE) 
   retval=fname;
 #else
 #error "Define something here for your operating system"
--- djvulibre-3.5.12.os2\libdjvu\DjVuMessage.cpp	Sun Oct 19 17:24:00 2003
+++ djvulibre-3.5.12\libdjvu\DjVuMessage.cpp	Tue Feb 18 02:09:26 2003
@@ -312,11 +312,9 @@
 #else
     GUTF8String home=GOS::getenv("HOME");
     if (! home.length()) {
-#ifndef OS2
       struct passwd *pw=0;
       if ((pw = getpwuid(getuid())))
         home=GNativeString(pw->pw_dir);
-#endif
     }
     if (home.length()) {
       GURL hpath = GURL::UTF8(LocalDjVuDir,GURL::Filename::UTF8(home));
--- djvulibre-3.5.12.os2\libdjvu\GException.cpp	Sun Oct 26 12:17:40 2003
+++ djvulibre-3.5.12\libdjvu\GException.cpp	Sun Mar 23 00:19:36 2003
@@ -257,7 +257,6 @@
 
 // ------ MEMORY MANAGEMENT HANDLER
 
-#ifndef OS2
 #ifndef NEED_DJVU_MEMORY
 // This is not activated when C++ memory management
 // is overidden.  The overriding functions handle
@@ -282,7 +281,6 @@
 #endif // !_MSC_VER
 #endif // !NEED_DJVU_MEMORY
 
-#endif // !OS2
 
 #ifdef HAVE_NAMESPACES
 }
