@@ -1144,6 +1144,17 @@ UV_EXTERN int uv_os_getenv(const char* name, char* buffer, size_t* size);
1144
1144
UV_EXTERN int uv_os_setenv (const char * name , const char * value );
1145
1145
UV_EXTERN int uv_os_unsetenv (const char * name );
1146
1146
1147
+ #ifdef MAXHOSTNAMELEN
1148
+ # define UV_MAXHOSTNAMESIZE (MAXHOSTNAMELEN + 1)
1149
+ #else
1150
+ /*
1151
+ Fallback for the maximum hostname size, including the null terminator. The
1152
+ Windows gethostname() documentation states that 256 bytes will always be
1153
+ large enough to hold the null-terminated hostname.
1154
+ */
1155
+ # define UV_MAXHOSTNAMESIZE 256
1156
+ #endif
1157
+
1147
1158
UV_EXTERN int uv_os_gethostname (char * buffer , size_t * size );
1148
1159
1149
1160
UV_EXTERN int uv_os_uname (uv_utsname_t * buffer );
@@ -1574,6 +1585,24 @@ UV_EXTERN void uv_key_set(uv_key_t* key, void* value);
1574
1585
typedef void (* uv_thread_cb )(void * arg );
1575
1586
1576
1587
UV_EXTERN int uv_thread_create (uv_thread_t * tid , uv_thread_cb entry , void * arg );
1588
+
1589
+ typedef enum {
1590
+ UV_THREAD_NO_FLAGS = 0x00 ,
1591
+ UV_THREAD_HAS_STACK_SIZE = 0x01
1592
+ } uv_thread_create_flags ;
1593
+
1594
+ struct uv_thread_options_s {
1595
+ unsigned int flags ;
1596
+ size_t stack_size ;
1597
+ /* More fields may be added at any time. */
1598
+ };
1599
+
1600
+ typedef struct uv_thread_options_s uv_thread_options_t ;
1601
+
1602
+ UV_EXTERN int uv_thread_create_ex (uv_thread_t * tid ,
1603
+ const uv_thread_options_t * params ,
1604
+ uv_thread_cb entry ,
1605
+ void * arg );
1577
1606
UV_EXTERN uv_thread_t uv_thread_self (void );
1578
1607
UV_EXTERN int uv_thread_join (uv_thread_t * tid );
1579
1608
UV_EXTERN int uv_thread_equal (const uv_thread_t * t1 , const uv_thread_t * t2 );
0 commit comments