[libdvdnav-devel] [Git][videolan/libdvdread][master] [msvc] use modern definition of ssize_t

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Fri May 29 08:18:20 UTC 2026



Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread


Commits:
6acfc10a by Brent Murphy at 2026-05-28T19:35:51+10:00
[msvc] use modern definition of ssize_t

Use modern definition of ssize_t for msvc.
https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types

SSIZE_T	
A signed version of SIZE_T.

This type is declared in BaseTsd.h as follows:
typedef LONG_PTR SSIZE_T;

This also matches with a change made in libudfread's public headers - https://code.videolan.org/videolan/libudfread/-/commit/92016f87a84780cb76f123897160e00434a4fc89
- - - - -


1 changed file:

- src/dvdread/dvd_reader.h


Changes:

=====================================
src/dvdread/dvd_reader.h
=====================================
@@ -34,8 +34,9 @@
 #include <inttypes.h>
 #include <stdarg.h>
 
-#ifdef _MSC_VER
-typedef ptrdiff_t ssize_t;
+#if defined(_MSC_VER) && !defined(ssize_t)
+#include <basetsd.h>
+typedef SSIZE_T ssize_t;
 #endif
 
 #include <dvdread/attributes.h>



View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/6acfc10af09b780b8357c880f89a788d246e520b

-- 
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/6acfc10af09b780b8357c880f89a788d246e520b
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the libdvdnav-devel mailing list