OK, 'int' cast added to getpid() calls with %d; patch attached.
---
Bruce Momjian wrote:
Neil Conway wrote:
Bruce Momjian wrote:
Tom Lane wrote:
Traditionally PIDs fit in 16 bits, let alone 32. I'd recommend that
Bruce Momjian wrote:
I see in include/sys/types.h on Solaris 9:
#if defined(_LP64) || defined(_I32LPx)
typedef uint_t nlink_t; /* file link type */
typedef int pid_t; /* process id type */
#else
typedef ulong_t
Peter Eisentraut wrote:
Am Freitag, 24. September 2004 11:06 schrieb Magnus Hagander:
(Btw., the Windows port defines pid_t as unsigned long;
that's surely wrong.)
In what way is that wrong? A PID on Windows is a DWORD, which is an
unsigned long. Or am I missing something
Tom Lane wrote:
Neil Conway [EMAIL PROTECTED] writes:
I guess it would be safest to use %ld and cast pid_t to long. Of course,
this seems a little paranoid -- is there actually a system with
sizeof(pid_t) != 4?
Traditionally PIDs fit in 16 bits, let alone 32. I'd recommend that we
Oliver Jowett wrote:
Peter Eisentraut wrote:
Am Freitag, 24. September 2004 09:34 schrieb Oliver Jowett:
Neil Conway wrote:
On Fri, 2004-09-24 at 16:51, Oliver Jowett wrote:
gcc (3.2.3 on Solaris 9) warns about a couple of places where a pid_t is
formatted with %d by a printf-family
Bruce Momjian wrote:
Tom Lane wrote:
Traditionally PIDs fit in 16 bits, let alone 32. I'd recommend that we
standardize on casting pid_t to int for printing purposes;
Done.
Uh, what? Your patch removes the casting of pid_t to int -- Tom was
suggesting that we consistently cast pid_t to int.
On Fri, 2004-09-24 at 16:51, Oliver Jowett wrote:
gcc (3.2.3 on Solaris 9) warns about a couple of places where a pid_t is
formatted with %d by a printf-family function.
For curiosity's sake, what formatting escape does gcc prefer?
-Neil
---(end of
Am Freitag, 24. September 2004 09:34 schrieb Oliver Jowett:
Neil Conway wrote:
On Fri, 2004-09-24 at 16:51, Oliver Jowett wrote:
gcc (3.2.3 on Solaris 9) warns about a couple of places where a pid_t is
formatted with %d by a printf-family function.
For curiosity's sake, what formatting
(Btw., the Windows port defines pid_t as unsigned long;
that's surely wrong.)
In what way is that wrong? A PID on Windows is a DWORD, which is an
unsigned long. Or am I missing something (probably..)?
//Magnus
---(end of broadcast)---
TIP 5:
Am Freitag, 24. September 2004 11:06 schrieb Magnus Hagander:
(Btw., the Windows port defines pid_t as unsigned long;
that's surely wrong.)
In what way is that wrong? A PID on Windows is a DWORD, which is an
unsigned long. Or am I missing something (probably..)?
The mingw header files
Peter Eisentraut wrote:
Am Freitag, 24. September 2004 09:34 schrieb Oliver Jowett:
Neil Conway wrote:
On Fri, 2004-09-24 at 16:51, Oliver Jowett wrote:
gcc (3.2.3 on Solaris 9) warns about a couple of places where a pid_t is
formatted with %d by a printf-family function.
For curiosity's sake,
On Fri, 2004-09-24 at 20:31, Oliver Jowett wrote:
pid_t on the Solaris/sparc system is a long (but both int and long are
32 bits). Some experimentation shows that gcc is happy with a %ld format
specifier. But compiling the same code on a Linux/x86 system makes gcc
complain when applying %ld
Neil Conway [EMAIL PROTECTED] writes:
I guess it would be safest to use %ld and cast pid_t to long. Of course,
this seems a little paranoid -- is there actually a system with
sizeof(pid_t) != 4?
Traditionally PIDs fit in 16 bits, let alone 32. I'd recommend that we
standardize on casting
13 matches
Mail list logo