[libdvdnav-devel] [Git][videolan/libdvdread][master] 4 commits: move strcase Windows replacements in internal header

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Fri Jul 31 07:26:01 UTC 2026



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


Commits:
af1fa669 by Steve Lhomme at 2026-07-30T07:16:07+02:00
move strcase Windows replacements in internal header

unistd.h should only redefine things that are supposed to be in unistd.h.
These functions are supposed to be in string.h.

It was also odd to include unistd.h for that only for Windows, when in fact
that header doesn't exist on Windows.

- - - - -
cdf2a8e1 by Steve Lhomme at 2026-07-30T07:25:28+02:00
file_win32: don't include unistd.h

It doesn't exist on Windows. We can include the proper files.

- - - - -
253d6c6b by Steve Lhomme at 2026-07-30T07:25:58+02:00
ifo_print: remove unistd.h include

It's not needed.

- - - - -
8fed2cb8 by Steve Lhomme at 2026-07-30T07:27:18+02:00
remove MSVC unistd.h

It's not used anymore.

- - - - -


5 changed files:

- meson.build
- − msvc/include/unistd.h
- src/dvdread_internal.h
- src/file/file_win32.c
- src/ifo_print.c


Changes:

=====================================
meson.build
=====================================
@@ -18,10 +18,6 @@ cdata = configuration_data()
 
 # Include directories
 dvdread_inc_dirs = include_directories('.', 'src', 'src/dvdread')
-if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
-    # extra POSIX headers not found in the Windows SDK
-    dvdread_inc_dirs = [dvdread_inc_dirs, include_directories('msvc/include')]
-endif
 
 # The version number for the shared library
 dvdread_soname_version = '8.2.0'


=====================================
msvc/include/unistd.h deleted
=====================================
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2000-2001 the xine project
- *
- * This file is part of xine, a unix video player.
- *
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * xine is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * WIN32 PORT,
- * by Matthew Grooms <elon at altavista.com>
- *
- * unistd.h - Maps the unix libc calls used by libdvdread to the
- *            equivalent win32 CRT functions.
- */
-
-#ifndef _SYS_UNISTD_H_
-#define _SYS_UNISTD_H_
-
-#include <io.h>
-#include <string.h>
-
-#ifndef strcasecmp
-#define strcasecmp _stricmp
-#endif
-
-#ifndef strncasecmp
-#define strncasecmp _strnicmp
-#endif
-
-#endif


=====================================
src/dvdread_internal.h
=====================================
@@ -24,7 +24,13 @@
 #include <sys/types.h>
 
 #ifdef _WIN32
-# include <unistd.h>
+#ifndef strcasecmp
+#define strcasecmp _stricmp
+#endif
+
+#ifndef strncasecmp
+#define strncasecmp _strnicmp
+#endif
 #endif /* _WIN32 */
 
 #include "dvdread/dvd_reader.h"


=====================================
src/file/file_win32.c
=====================================
@@ -20,7 +20,6 @@
 #include <io.h>
 #include <limits.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>


=====================================
src/ifo_print.c
=====================================
@@ -19,7 +19,6 @@
 #include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <inttypes.h>
 #include <string.h>
 #include <ctype.h>



View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/0b21c45f648a38947ee2bbc75c9a1bd577d96b71...8fed2cb8e07b388c00f1e00715ae89f3ceaa6c55

-- 
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/0b21c45f648a38947ee2bbc75c9a1bd577d96b71...8fed2cb8e07b388c00f1e00715ae89f3ceaa6c55
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