Skip to content

Commit 726d595

Browse files
committed
Remove code for OS2
The last release of OS2 was in December 2021, so 20 years ago. Remove this effectively dead code
1 parent dd8de1e commit 726d595

File tree

1 file changed

+2
-36
lines changed

1 file changed

+2
-36
lines changed

ext/standard/filestat.c

+2-36
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@
3737
# include <sys/vfs.h>
3838
#endif
3939

40-
#ifdef OS2
41-
# define INCL_DOS
42-
# include <os2.h>
43-
#endif
44-
4540
#if defined(__APPLE__)
4641
/*
4742
Apple statvfs has an interger overflow in libc copying to statvfs.
@@ -133,21 +128,7 @@ static int php_disk_total_space(char *path, double *space) /* {{{ */
133128
return SUCCESS;
134129
}
135130
/* }}} */
136-
#elif defined(OS2) /* {{{ */
137-
{
138-
double bytestotal = 0;
139-
FSALLOCATE fsinfo;
140-
char drive = path[0] & 95;
141-
142-
if (DosQueryFSInfo( drive ? drive - 64 : 0, FSIL_ALLOC, &fsinfo, sizeof( fsinfo ) ) == 0) {
143-
bytestotal = (double)fsinfo.cbSector * fsinfo.cSectorUnit * fsinfo.cUnit;
144-
*space = bytestotal;
145-
return SUCCESS;
146-
}
147-
return FAILURE;
148-
}
149-
/* }}} */
150-
#else /* {{{ if !defined(OS2) && !defined(WINDOWS) */
131+
#else /* {{{ if !defined(WINDOWS) */
151132
{
152133
double bytestotal = 0;
153134
#if defined(HAVE_SYS_STATVFS_H) && defined(HAVE_STATVFS)
@@ -230,22 +211,7 @@ static int php_disk_free_space(char *path, double *space) /* {{{ */
230211

231212
return SUCCESS;
232213
}
233-
/* }}} */
234-
#elif defined(OS2) /* {{{ */
235-
{
236-
double bytesfree = 0;
237-
FSALLOCATE fsinfo;
238-
char drive = path[0] & 95;
239-
240-
if (DosQueryFSInfo( drive ? drive - 64 : 0, FSIL_ALLOC, &fsinfo, sizeof( fsinfo ) ) == 0) {
241-
bytesfree = (double)fsinfo.cbSector * fsinfo.cSectorUnit * fsinfo.cUnitAvail;
242-
*space = bytesfree;
243-
return SUCCESS;
244-
}
245-
return FAILURE;
246-
}
247-
/* }}} */
248-
#else /* {{{ if !defined(OS2) && !defined(WINDOWS) */
214+
#else /* {{{ if !defined(WINDOWS) */
249215
{
250216
double bytesfree = 0;
251217
#if defined(HAVE_SYS_STATVFS_H) && defined(HAVE_STATVFS)

0 commit comments

Comments
 (0)