In libiberty the following points I found the following points. Index: hashtab.c =================================================================== --- hashtab.c (revision 122691) +++ hashtab.c (working copy) @@ -196,7 +196,7 @@ static hashval_t hash_pointer (const PTR p) { - return (hashval_t) ((long)p >> 3); + return (hashval_t) ((intptr_t)p >> 3); } /* Returns non-zero if P1 and P2 are equal. */ Index: pex-common.h =================================================================== --- pex-common.h (revision 122691) +++ pex-common.h (working copy) @@ -108,7 +108,7 @@ closed in the child process. The function should handle the PEX_STDERR_TO_STDOUT flag. Return >= 0 on success, or -1 on error and set *ERRMSG and *ERR. */ - long (*exec_child) (struct pex_obj *, int /* flags */, + intptr_t (*exec_child) (struct pex_obj *, int /* flags */, const char */* executable */, char * const * /* argv */, char * const * /* env */, int /* in */, int /* out */, int /* errdes */, @@ -120,7 +120,7 @@ and time in *TIME (if it is not null). CHILD is from fork. DONE is 1 if this is called via pex_free. ERRMSG and ERR are as in fork. Return 0 on success, -1 on error. */ - int (*wait) (struct pex_obj *, long /* child */, int * /* status */, + int (*wait) (struct pex_obj *, intptr_t /* child */, int * /* status */, struct pex_time * /* time */, int /* done */, const char ** /* errmsg */, int * /* err */); /* Create a pipe (only called if PEX_USE_PIPES is set) storing two Index: pex-win32.c =================================================================== --- pex-win32.c (revision 122691) +++ pex-win32.c (working copy) @@ -79,12 +79,12 @@ static int pex_win32_open_read (struct pex_obj *, const char *, int); static int pex_win32_open_write (struct pex_obj *, const char *, int); -static long pex_win32_exec_child (struct pex_obj *, int, const char *, +static intptr_t pex_win32_exec_child (struct pex_obj *, int, const char *, char * const *, char * const *, int, int, int, int, const char **, int *); static int pex_win32_close (struct pex_obj *, int); -static int pex_win32_wait (struct pex_obj *, long, int *, +static int pex_win32_wait (struct pex_obj *, intptr_t, int *, struct pex_time *, int, const char **, int *); static int pex_win32_pipe (struct pex_obj *, int *, int); static FILE *pex_win32_fdopenr (struct pex_obj *, int, int); @@ -522,7 +522,7 @@ return c1 - c2; } -static long +static intptr_t win32_spawn (const char *executable, BOOL search, char *const *argv, @@ -606,7 +606,7 @@ if (env_block) free (env_block); - return (long) pi->hProcess; + return (intptr_t) pi->hProcess; error: if (env_block) @@ -616,17 +616,17 @@ if (full_executable) free (full_executable); - return -1; + return (intptr_t) -1; } -static long +static intptr_t spawn_script (const char *executable, char *const *argv, char* const *env, DWORD dwCreationFlags, LPSTARTUPINFO si, LPPROCESS_INFORMATION pi) { - int pid = -1; + intptr_t pid = -1; int save_errno = errno; int fd = _open (executable, _O_RDONLY); @@ -696,7 +696,7 @@ /* Execute a child. */ -static long +static intptr_t pex_win32_exec_child (struct pex_obj *obj ATTRIBUTE_UNUSED, int flags, const char *executable, char * const * argv, char* const* env, @@ -705,7 +705,7 @@ const char **errmsg, int *err) { - long pid; + intptr_t pid; HANDLE stdin_handle; HANDLE stdout_handle; HANDLE stderr_handle; @@ -808,7 +808,7 @@ macros. Note that WIFSIGNALED will never be true under CRTDLL. */ static int -pex_win32_wait (struct pex_obj *obj ATTRIBUTE_UNUSED, long pid, +pex_win32_wait (struct pex_obj *obj ATTRIBUTE_UNUSED, intptr_t pid, int *status, struct pex_time *time, int done ATTRIBUTE_UNUSED, const char **errmsg, int *err) {
Regards, i.A. Kai Tietz ---------------------------------------- Kai Tietz - Software engineering OneVision Software Entwicklungs GmbH & Co KG Dr.-Leo-Ritter-Str. 9, 93049 Regensburg, Germany Phone: +49-941-78004-0 FAX: +49-941-78004-489 WWW: http://www.OneVision.com DJ Delorie <[EMAIL PROTECTED]> 08.03.2007 17:04 To [EMAIL PROTECTED] cc gcc@gcc.gnu.org Subject Re: What does coding-style tells about integer types for pointers ? > I found this problems until now in libc++, libiberty. Could you be more specific about the libiberty ones?