Skip to content

Commit

Permalink
starboard/types.h: Remove SSIZE_T provisions/fallbacks (#4382)
Browse files Browse the repository at this point in the history
A cursory search shows that SSIZE_T is defined in all //starboard
platforms. This CL aims to remove it, but before that I want to
see whether any bot configuration is covering this path.
    
SSIZE_MAX is certainly not used as per code search so can be  
removed right away.
    
b/366064934
  • Loading branch information
yell0wd0g authored Nov 15, 2024
1 parent 02c7026 commit 7fea434
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 36 deletions.
1 change: 1 addition & 0 deletions starboard/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The functionality is migrated to starboard extension.
### Removed unused symbols from `starboard/socket.h`
### Removed unused symbols from `starboard/thread.h`
### Removed unused symbols from `starboard/types.h`
* Removed provisions for SSIZE_T
### Removed `DEPRECATED_SCOPED_PTR`
### Removed `SB_HAS_IPV6` config
All platforms support IPv6
Expand Down
3 changes: 0 additions & 3 deletions starboard/android/shared/configuration_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
// Whether the current platform provides the standard header sys/types.h.
#define SB_HAS_SYS_TYPES_H 0

// Whether the current platform provides ssize_t.
#define SB_HAS_SSIZE_T 1

// Type detection for wchar_t.
#if defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
Expand Down
3 changes: 0 additions & 3 deletions starboard/evergreen/arm/hardfp/configuration_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
// Whether the current platform provides the standard header sys/types.h.
#define SB_HAS_SYS_TYPES_H 0

// Whether the current platform provides ssize_t.
#define SB_HAS_SSIZE_T 1

// Type detection for wchar_t.
#if defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
Expand Down
3 changes: 0 additions & 3 deletions starboard/evergreen/arm/softfp/configuration_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
// Whether the current platform provides the standard header sys/types.h.
#define SB_HAS_SYS_TYPES_H 0

// Whether the current platform provides ssize_t.
#define SB_HAS_SSIZE_T 1

// Type detection for wchar_t.
#if defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
Expand Down
3 changes: 0 additions & 3 deletions starboard/evergreen/arm64/configuration_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
// Whether the current platform provides the standard header sys/types.h.
#define SB_HAS_SYS_TYPES_H 0

// Whether the current platform provides ssize_t.
#define SB_HAS_SSIZE_T 1

// Type detection for wchar_t.
#if defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
Expand Down
3 changes: 0 additions & 3 deletions starboard/evergreen/x64/configuration_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
// Whether the current platform provides the standard header sys/types.h.
#define SB_HAS_SYS_TYPES_H 0

// Whether the current platform provides ssize_t.
#define SB_HAS_SSIZE_T 1

// Type detection for wchar_t.
#if defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
Expand Down
3 changes: 0 additions & 3 deletions starboard/linux/shared/configuration_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
// Whether the current platform provides the standard header sys/types.h.
#define SB_HAS_SYS_TYPES_H 1

// Whether the current platform provides ssize_t.
#define SB_HAS_SSIZE_T 1

// Type detection for wchar_t.
#if defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
Expand Down
3 changes: 0 additions & 3 deletions starboard/raspi/shared/configuration_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
// Whether the current platform provides the standard header sys/types.h.
#define SB_HAS_SYS_TYPES_H 1

// Whether the current platform provides ssize_t.
#define SB_HAS_SSIZE_T 1

// Type detection for wchar_t.
#if defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
Expand Down
3 changes: 0 additions & 3 deletions starboard/stub/configuration_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
// Whether the current platform provides the standard header sys/types.h.
#define SB_HAS_SYS_TYPES_H 0

// Whether the current platform provides ssize_t.
#define SB_HAS_SSIZE_T 1

// Type detection for wchar_t.
#if defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
Expand Down
12 changes: 0 additions & 12 deletions starboard/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,6 @@
extern "C" {
#endif

// --- Standard Include Emulation ----------------------------------------------

#if !SB_HAS(SSIZE_T)
#if SB_IS(32_BIT)
typedef int32_t ssize_t;
#define SSIZE_MAX INT_MAX
#elif SB_IS(64_BIT)
typedef int64_t ssize_t;
#define SSIZE_MAX LONG_MAX
#endif
#endif // !SB_HAS(SSIZE_T)

// --- Standard Include Emulation Audits ---------------------------------------

#if (UINT_MIN + 1 == UINT_MAX - 1) || (INT_MIN + 1 == INT_MAX - 1) || \
Expand Down

0 comments on commit 7fea434

Please sign in to comment.