unix: remove sunpro references

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-01 21:11:02 +01:00
parent 91dc2389cc
commit 8a904e16d1
4 changed files with 7 additions and 17 deletions

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);
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);
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);
}