* 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.
This commit is contained in:
		| @@ -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. | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
| @@ -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: | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
| @@ -429,7 +429,7 @@ out: | ||||
| } | ||||
|  | ||||
| char * | ||||
| _pinfo::cmdline (size_t& n) | ||||
| _pinfo::cmdline (__off64_t& n) | ||||
| { | ||||
|   char *s; | ||||
|   if (!this || !pid) | ||||
|   | ||||
| @@ -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); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user