diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 43a546c42..0acf18cec 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,18 @@
+2003-03-08  Corinna Vinschen  <corinna@vinschen.de>
+
+	* external.cc (cygwin_internal): Change n to __off64_t to match change
+	of _pinfo::cmdline.
+	* fhandler.h (class fhandler_virtual): Change filesize member to
+	__off64_t.
+	* fhandler_proc.cc (format_proc_meminfo): Change to return __off64_t.
+	(format_proc_stat): Ditto.
+	(format_proc_uptime): Ditto.
+	* fhandler_process.cc (format_process_stat): Ditto.
+	(format_process_status): Ditto.
+	(format_process_statm): Ditto.
+	* pinfo.cc (_pinfo::cmdline): Expect __off64_t parameter.
+	* pinfo.h (class _pinfo): Change declaration of cmdline accordingly.
+
 2003-03-07  Christopher Faylor  <cgf@redhat.com>
 
 	* path.h (PATH_LNK): New enum val.
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index 582bb2add..113e98475 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -242,7 +242,7 @@ cygwin_internal (cygwin_getinfo_types t, ...)
 	}
       case CW_CMDLINE:
 	{
-	  size_t n;
+	  __off64_t n;
 	  pid_t pid = va_arg (arg, pid_t);
 	  pinfo p (pid);
 	  return (DWORD) p->cmdline (n);
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index cc278a4c7..445af49d8 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -1105,7 +1105,8 @@ class fhandler_virtual : public fhandler_base
 {
  protected:
   char *filebuf;
-  size_t bufalloc, filesize;
+  size_t bufalloc;
+  __off64_t filesize;
   __off64_t position;
   int fileid; // unique within each class
  public:
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index 40863c7dc..6e8ced59a 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -70,9 +70,9 @@ static const DWORD proc_fhandlers[PROC_LINK_COUNT] = {
 const char proc[] = "/proc";
 const int proc_len = sizeof (proc) - 1;
 
-static off_t format_proc_meminfo (char *destbuf, size_t maxsize);
-static off_t format_proc_stat (char *destbuf, size_t maxsize);
-static off_t format_proc_uptime (char *destbuf, size_t maxsize);
+static __off64_t format_proc_meminfo (char *destbuf, size_t maxsize);
+static __off64_t format_proc_stat (char *destbuf, size_t maxsize);
+static __off64_t format_proc_uptime (char *destbuf, size_t maxsize);
 
 /* auxillary function that returns the fhandler associated with the given path
  * this is where it would be nice to have pattern matching in C - polymorphism
@@ -368,7 +368,7 @@ fhandler_proc::fill_filebuf ()
 }
 
 static
-off_t
+__off64_t
 format_proc_meminfo (char *destbuf, size_t maxsize)
 {
   unsigned long mem_total = 0UL, mem_free = 0UL, swap_total = 0UL,
@@ -399,7 +399,7 @@ format_proc_meminfo (char *destbuf, size_t maxsize)
 }
 
 static
-off_t
+__off64_t
 format_proc_uptime (char *destbuf, size_t maxsize)
 {
   unsigned long long uptime = 0ULL, idle_time = 0ULL;
@@ -430,7 +430,7 @@ format_proc_uptime (char *destbuf, size_t maxsize)
 }
 
 static
-off_t
+__off64_t
 format_proc_stat (char *destbuf, size_t maxsize)
 {
   unsigned long long user_time = 0ULL, kernel_time = 0ULL, idle_time = 0ULL;
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index a349b6c60..29789b07c 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -67,9 +67,9 @@ static const char * const process_listing[] =
 static const int PROCESS_LINK_COUNT =
   (sizeof (process_listing) / sizeof (const char *)) - 1;
 
-static off_t format_process_stat (_pinfo *p, char *destbuf, size_t maxsize);
-static off_t format_process_status (_pinfo *p, char *destbuf, size_t maxsize);
-static off_t format_process_statm (_pinfo *p, char *destbuf, size_t maxsize);
+static __off64_t format_process_stat (_pinfo *p, char *destbuf, size_t maxsize);
+static __off64_t format_process_status (_pinfo *p, char *destbuf, size_t maxsize);
+static __off64_t format_process_statm (_pinfo *p, char *destbuf, size_t maxsize);
 static int get_process_state (DWORD dwProcessId);
 static bool get_mem_values (DWORD dwProcessId, unsigned long *vmsize,
 			    unsigned long *vmrss, unsigned long *vmtext,
@@ -364,7 +364,7 @@ fhandler_process::fill_filebuf ()
 }
 
 static
-off_t
+__off64_t
 format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
 {
   char cmd[MAX_PATH];
@@ -500,7 +500,7 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
 }
 
 static
-off_t
+__off64_t
 format_process_status (_pinfo *p, char *destbuf, size_t maxsize)
 {
   char cmd[MAX_PATH];
@@ -594,7 +594,7 @@ format_process_status (_pinfo *p, char *destbuf, size_t maxsize)
 }
 
 static
-off_t
+__off64_t
 format_process_statm (_pinfo *p, char *destbuf, size_t maxsize)
 {
   unsigned long vmsize = 0UL, vmrss = 0UL, vmtext = 0UL, vmdata = 0UL,
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 74e14f354..152277adf 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -429,7 +429,7 @@ out:
 }
 
 char *
-_pinfo::cmdline (size_t& n)
+_pinfo::cmdline (__off64_t& n)
 {
   char *s;
   if (!this || !pid)
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h
index 89b683f94..d6370bc81 100644
--- a/winsup/cygwin/pinfo.h
+++ b/winsup/cygwin/pinfo.h
@@ -138,7 +138,7 @@ public:
   void commune_recv ();
   commune_result commune_send (DWORD);
   bool alive ();
-  char *cmdline (size_t &);
+  char *cmdline (__off64_t &);
 
   friend void __stdcall set_myself (pid_t, HANDLE);