Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use long int for the pids, just to be sure without doublechecking what the size of...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 12 Apr 2006 09:10:10 +0000 (09:10 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 12 Apr 2006 09:10:10 +0000 (09:10 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2140 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/gras/virtu.h
src/gras/Virtu/rl_process.c
src/gras/Virtu/sg_process.c
src/xbt/log_default_appender.c

index 1e0464c..65d3a81 100644 (file)
@@ -46,7 +46,7 @@ gras_os_myname(void);
  * Returns the process ID of the current process.  (This is often used
    by routines that generate unique temporary file names.)
  */
-int gras_os_getpid(void);
+long int gras_os_getpid(void);
 
 /** @} */
 SG_END_DECL()
index 49f6e90..64c5f12 100644 (file)
@@ -29,8 +29,8 @@ const char *xbt_procname(void) {
   else return "";
 }
 
-int gras_os_getpid(void) {
-  return getpid();
+long int gras_os_getpid(void) {
+  return (long int) getpid();
 }
 
 /* **************************************************************************
index 0883454..2ad07e2 100644 (file)
@@ -144,10 +144,10 @@ const char* xbt_procname(void) {
     return "";
 }
 
-int gras_os_getpid(void) {
+long int gras_os_getpid(void) {
   m_process_t process = MSG_process_self();
   if ((process != NULL) && (process->simdata))
-    return MSG_process_get_PID(MSG_process_self());
+    return (long int)MSG_process_get_PID(MSG_process_self());
   else
-    return 0;
+    return (long int)0;
 }
index df94569..0126353 100644 (file)
@@ -41,7 +41,7 @@ static const char* xbt_logappender_verbose_information(void) {
     begin_of_time=gras_os_time();
 
   if(strlen(xbt_procname()))
-    sprintf(buffer,"%s:%s:(%d) %f", gras_os_myname(),
+    sprintf(buffer,"%s:%s:(%ld) %f", gras_os_myname(),
            xbt_procname(),gras_os_getpid(),gras_os_time()-begin_of_time);
   else 
     buffer[0]=0;