# PATCH ssize_t without messing with fcgi source

- Thread: https://externals.io/message/5458
- Original archive: https://news-web.php.net/php.internals/5458
- Started by Steph on 2003-11-14T01:08:20+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #5458 — Steph — 2003-11-14T01:08:20+00:00

URL: https://externals.io/message/5458#5458

Works with everything.  (phew!)

Wez??

- Steph

---

## #5461 — Ard Biesheuvel — 2003-11-14T11:16:53+00:00

URL: https://externals.io/message/5458#5461 · In reply to: #5458

> Works with everything.  (phew!)
> 

You might wanna use long instead of int here, as sizeof(ssize_t) is 
supposed to match the native pointer size.

-- 
Ard



> ------------------------------------------------------------------------
> 
> Index: main/config.w32.h
> ===================================================================
> RCS file: /repository/php-src/main/config.w32.h,v
> retrieving revision 1.80
> diff -u -r1.80 config.w32.h
> --- main/config.w32.h	13 Nov 2003 10:32:04 -0000	1.80
> +++ main/config.w32.h	14 Nov 2003 00:56:36 -0000
> @@ -174,7 +174,7 @@
>  #define SIZEOF_LONG_LONG_INT 0
>  #define SIZEOF_LONG_LONG 0
>  #define SIZEOF_INTMAX_T 0
> -#define ssize_t SSIZE_T
> +#define ssize_t int
>  #ifdef _WIN64
>  # define SIZEOF_SIZE_T 8
>  # define SIZEOF_PTRDIFF_T 8
> Index: sapi/cgi/libfcgi/include/fcgi_config_win32.h
> ===================================================================
> RCS file: /repository/php-src/sapi/cgi/libfcgi/include/fcgi_config_win32.h,v
> retrieving revision 1.2
> diff -u -r1.2 fcgi_config_win32.h
> --- sapi/cgi/libfcgi/include/fcgi_config_win32.h	13 Nov 2003 10:32:05 -0000	1.2
> +++ sapi/cgi/libfcgi/include/fcgi_config_win32.h	14 Nov 2003 00:56:38 -0000
> @@ -106,3 +106,6 @@
>  /* Define as `__inline' if that's what the C compiler calls it, or to nothing
>     if it is not supported. */
>  /* #undef inline */
> +
> +/* Define to `int' if <sys/types.h> does not define. */
> +#define ssize_t int

---

## #5462 — Ard Biesheuvel — 2003-11-14T11:19:48+00:00

URL: https://externals.io/message/5458#5462 · In reply to: #5458

Steph wrote:
> Works with everything.  (phew!)

Are you sure this will work on Win64 ?
I think sizeof(ssize_t) is supposed to match the native pointer size.

-- 
Ard

> ------------------------------------------------------------------------
> 
> Index: main/config.w32.h
> ===================================================================
> RCS file: /repository/php-src/main/config.w32.h,v
> retrieving revision 1.80
> diff -u -r1.80 config.w32.h
> --- main/config.w32.h	13 Nov 2003 10:32:04 -0000	1.80
> +++ main/config.w32.h	14 Nov 2003 00:56:36 -0000
> @@ -174,7 +174,7 @@
>  #define SIZEOF_LONG_LONG_INT 0
>  #define SIZEOF_LONG_LONG 0
>  #define SIZEOF_INTMAX_T 0
> -#define ssize_t SSIZE_T
> +#define ssize_t int
>  #ifdef _WIN64
>  # define SIZEOF_SIZE_T 8
>  # define SIZEOF_PTRDIFF_T 8
