Skip to content

Commit f939f04

Browse files
committed
Win32: Deprecate Windows version info API
`dwMajorVersion` alone has no meaning since Windows 7. Use API in VersionHelper.h instead.
1 parent 50e5c54 commit f939f04

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

include/ruby/win32.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ struct ifaddrs {
262262
#endif
263263

264264
extern void rb_w32_sysinit(int *, char ***);
265-
extern DWORD rb_w32_osid(void);
266265
extern int flock(int fd, int oper);
267266
extern int rb_w32_io_cancelable_p(int);
268267
extern int rb_w32_is_socket(int);
@@ -306,7 +305,11 @@ extern void rb_w32_free_environ(char **);
306305
extern int rb_w32_map_errno(DWORD);
307306
extern const char *WSAAPI rb_w32_inet_ntop(int,const void *,char *,size_t);
308307
extern int WSAAPI rb_w32_inet_pton(int,const char *,void *);
309-
extern DWORD rb_w32_osver(void);
308+
309+
RBIMPL_ATTR_DEPRECATED(("as Windows 9x is not supported already"))
310+
extern DWORD rb_w32_osid(void);
311+
RBIMPL_ATTR_DEPRECATED(("by Windows Version Helper APIs"))
312+
extern DWORD rb_w32_osver(void);
310313

311314
extern int rb_w32_uchown(const char *, int, int);
312315
extern int rb_w32_ulink(const char *, const char *);

0 commit comments

Comments
 (0)