unix: remove sunpro references (#5017)

Sun Studio / Oracle Developer Studio hasn't had a release in almost
nine years. If Oracle doesn't feel like supporting it, then neither
do I.
This commit is contained in:
Ben Noordhuis 2026-02-02 23:15:38 +01:00 committed by GitHub
parent c68ca444e7
commit fc90bb9843
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 18 deletions

View File

@ -12,7 +12,6 @@
| Linux with musl | Tier 2 | musl >= 1.0 | |
| Android | Tier 3 | NDK >= r15b | Android 7.0, `-DANDROID_PLATFORM=android-24` |
| MinGW | Tier 3 | MinGW-w64 | |
| SunOS | Tier 3 | Solaris 121 and later | |
| Other | Tier 3 | N/A | |
## Support types

View File

@ -44,10 +44,8 @@ extern "C" {
/* Building static library. */
# define UV_EXTERN /* nothing */
# endif
#elif __GNUC__ >= 4
#elif defined(__GNUC__)
# define UV_EXTERN __attribute__((visibility("default")))
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) /* Sun Studio >= 8 */
# define UV_EXTERN __global
#else
# define UV_EXTERN /* nothing */
#endif

View File

@ -89,9 +89,7 @@ int uv__getaddrinfo_translate_error(int sys_err) {
}
assert(!"unknown EAI_* error code");
abort();
#ifndef __SUNPRO_C
return 0; /* Pacify compiler. */
#endif
}

View File

@ -870,9 +870,7 @@ int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex, uint64_t timeout) {
return UV_ETIMEDOUT;
abort();
#ifndef __SUNPRO_C
return UV_EINVAL; /* Satisfy the compiler. */
#endif
}

View File

@ -73,12 +73,6 @@ static const int is_win32 = 1;
static const int is_win32 = 0;
#endif
#if defined(__APPLE__) || defined(__SUNPRO_C)
static const int is_apple_or_sunpro_c = 1;
#else
static const int is_apple_or_sunpro_c = 0;
#endif
typedef struct {
const char* path;
double atime;
@ -882,9 +876,10 @@ static void check_utime(const char* path,
ASSERT_LE(s->st_atim.tv_sec, (long) atime);
} else {
double st_atim;
#ifndef __APPLE__
/* TODO(vtjnash): would it be better to normalize this? */
if (!is_apple_or_sunpro_c)
ASSERT_DOUBLE_GE(s->st_atim.tv_nsec, 0);
#endif
st_atim = s->st_atim.tv_sec + s->st_atim.tv_nsec / 1e9;
/* Linux does not allow reading reliably the atime of a symlink
* since readlink() can update it
@ -917,9 +912,10 @@ static void check_utime(const char* path,
ASSERT_LE(s->st_mtim.tv_sec, (long) mtime);
} else {
double st_mtim;
#ifndef __APPLE__
/* TODO(vtjnash): would it be better to normalize this? */
if (!is_apple_or_sunpro_c)
ASSERT_DOUBLE_GE(s->st_mtim.tv_nsec, 0);
#endif
st_mtim = s->st_mtim.tv_sec + s->st_mtim.tv_nsec / 1e9;
ASSERT_DOUBLE_EQ(st_mtim, mtime);
}