@@ -1144,6 +1144,17 @@ UV_EXTERN int uv_os_getenv(const char* name, char* buffer, size_t* size);
11441144UV_EXTERN int uv_os_setenv (const char * name , const char * value );
11451145UV_EXTERN int uv_os_unsetenv (const char * name );
11461146
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+
11471158UV_EXTERN int uv_os_gethostname (char * buffer , size_t * size );
11481159
11491160UV_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);
15741585typedef void (* uv_thread_cb )(void * arg );
15751586
15761587UV_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 );
15771606UV_EXTERN uv_thread_t uv_thread_self (void );
15781607UV_EXTERN int uv_thread_join (uv_thread_t * tid );
15791608UV_EXTERN int uv_thread_equal (const uv_thread_t * t1 , const uv_thread_t * t2 );
0 commit comments