@@ -34,7 +34,8 @@ option(ASAN "Enable AddressSanitizer (ASan)" OFF)
34
34
if (ASAN AND CMAKE_C_COMPILER_ID MATCHES "AppleClang|GNU|Clang" )
35
35
add_definitions (-D__ASAN__=1 )
36
36
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address" )
37
- set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address" )
37
+ set (CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address" )
38
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=address" )
38
39
endif ()
39
40
40
41
# Compiler check
@@ -209,10 +210,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
209
210
src/unix/pthread-fixes.c
210
211
src/unix/random-getentropy.c
211
212
src/unix/random-getrandom.c
212
- src/unix/random-sysctl-linux.c )
213
+ src/unix/random-sysctl-linux.c
214
+ src/unix/epoll.c )
213
215
endif ()
214
216
215
- if (APPLE OR CMAKE_SYSTEM_NAME MATCHES "Android|Linux|OS390 " )
217
+ if (APPLE OR CMAKE_SYSTEM_NAME MATCHES "Android|Linux" )
216
218
list (APPEND uv_sources src/unix/proctitle.c )
217
219
endif ()
218
220
@@ -253,7 +255,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
253
255
src/unix/linux-syscalls.c
254
256
src/unix/procfs-exepath.c
255
257
src/unix/random-getrandom.c
256
- src/unix/random-sysctl-linux.c )
258
+ src/unix/random-sysctl-linux.c
259
+ src/unix/epoll.c )
257
260
endif ()
258
261
259
262
if (CMAKE_SYSTEM_NAME STREQUAL "NetBSD" )
@@ -266,9 +269,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
266
269
endif ()
267
270
268
271
if (CMAKE_SYSTEM_NAME STREQUAL "OS390" )
269
- list (APPEND uv_defines PATH_MAX=255 )
272
+ enable_language (CXX )
273
+ list (APPEND uv_defines PATH_MAX=1024 )
270
274
list (APPEND uv_defines _AE_BIMODAL )
271
275
list (APPEND uv_defines _ALL_SOURCE )
276
+ list (APPEND uv_defines _ENHANCED_ASCII_EXT=0xFFFFFFFF )
272
277
list (APPEND uv_defines _ISOC99_SOURCE )
273
278
list (APPEND uv_defines _LARGE_TIME_API )
274
279
list (APPEND uv_defines _OPEN_MSGQ_EXT )
@@ -279,14 +284,31 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS390")
279
284
list (APPEND uv_defines _UNIX03_SOURCE )
280
285
list (APPEND uv_defines _UNIX03_THREADS )
281
286
list (APPEND uv_defines _UNIX03_WITHDRAWN )
287
+ list (APPEND uv_defines _XOPEN_SOURCE=600 )
282
288
list (APPEND uv_defines _XOPEN_SOURCE_EXTENDED )
283
289
list (APPEND uv_sources
284
290
src/unix/pthread-fixes.c
285
291
src/unix/os390.c
286
- src/unix/os390-syscalls.c )
287
- list (APPEND uv_cflags -Wc,DLL -Wc,exportall -Wc,xplink )
288
- list (APPEND uv_libraries -Wl,xplink )
289
- list (APPEND uv_test_libraries -Wl,xplink )
292
+ src/unix/os390-syscalls.c
293
+ src/unix/os390-proctitle.c )
294
+ list (APPEND uv_cflags
295
+ -q64
296
+ -qascii
297
+ -qexportall
298
+ -qgonumber
299
+ -qlongname
300
+ -qlibansi
301
+ -qfloat=IEEE
302
+ -qtune=10
303
+ -qarch=10
304
+ -qasm
305
+ -qasmlib=sys1.maclib:sys1.modgen )
306
+ find_library (ZOSLIB
307
+ NAMES zoslib
308
+ PATHS ${ZOSLIB_DIR}
309
+ PATH_SUFFIXES lib
310
+ )
311
+ list (APPEND uv_libraries ${ZOSLIB} )
290
312
endif ()
291
313
292
314
if (CMAKE_SYSTEM_NAME STREQUAL "OS400" )
@@ -303,9 +325,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS400")
303
325
endif ()
304
326
305
327
if (CMAKE_SYSTEM_NAME STREQUAL "SunOS" )
306
- list (APPEND uv_defines __EXTENSIONS__ _XOPEN_SOURCE=500 )
328
+ list (APPEND uv_defines __EXTENSIONS__ _XOPEN_SOURCE=500 _REENTRANT )
307
329
list (APPEND uv_libraries kstat nsl sendfile socket )
308
- list (APPEND uv_sources src/unix/no-proctitle.c src/unix/sunos.c )
330
+ list (APPEND uv_sources
331
+ src/unix/no-proctitle.c
332
+ src/unix/sunos.c )
309
333
endif ()
310
334
311
335
if (CMAKE_SYSTEM_NAME STREQUAL "Haiku" )
@@ -349,6 +373,10 @@ target_include_directories(uv
349
373
$< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
350
374
PRIVATE
351
375
$< BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /src> )
376
+ if (CMAKE_SYSTEM_NAME STREQUAL "OS390" )
377
+ target_include_directories (uv PUBLIC $< BUILD_INTERFACE:${ZOSLIB_DIR} /include> )
378
+ set_target_properties (uv PROPERTIES LINKER_LANGUAGE CXX )
379
+ endif ()
352
380
target_link_libraries (uv ${uv_libraries} )
353
381
354
382
add_library (uv_a STATIC ${uv_sources} )
@@ -360,6 +388,10 @@ target_include_directories(uv_a
360
388
$< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
361
389
PRIVATE
362
390
$< BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /src> )
391
+ if (CMAKE_SYSTEM_NAME STREQUAL "OS390" )
392
+ target_include_directories (uv_a PUBLIC $< BUILD_INTERFACE:${ZOSLIB_DIR} /include> )
393
+ set_target_properties (uv_a PROPERTIES LINKER_LANGUAGE CXX )
394
+ endif ()
363
395
target_link_libraries (uv_a ${uv_libraries} )
364
396
365
397
if (LIBUV_BUILD_TESTS )
@@ -457,6 +489,9 @@ if(LIBUV_BUILD_TESTS)
457
489
test /test-metrics.c
458
490
test /test-multiple-listen.c
459
491
test /test-mutexes.c
492
+ test /test-not-readable-nor-writable-on-read-error.c
493
+ test /test-not-readable-on-eof.c
494
+ test /test-not-writable-after-shutdown.c
460
495
test /test-osx-select.c
461
496
test /test-pass-always.c
462
497
test /test-ping-pong.c
@@ -489,6 +524,7 @@ if(LIBUV_BUILD_TESTS)
489
524
test /test-semaphore.c
490
525
test /test-shutdown-close.c
491
526
test /test-shutdown-eof.c
527
+ test /test-shutdown-simultaneous.c
492
528
test /test-shutdown-twice.c
493
529
test /test-signal-multiple-loops.c
494
530
test /test-signal-pending-on-close.c
@@ -582,6 +618,11 @@ if(LIBUV_BUILD_TESTS)
582
618
add_test (NAME uv_test_a
583
619
COMMAND uv_run_tests_a
584
620
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
621
+ if (CMAKE_SYSTEM_NAME STREQUAL "OS390" )
622
+ set_target_properties (uv_run_benchmarks_a PROPERTIES LINKER_LANGUAGE CXX )
623
+ set_target_properties (uv_run_tests PROPERTIES LINKER_LANGUAGE CXX )
624
+ set_target_properties (uv_run_tests_a PROPERTIES LINKER_LANGUAGE CXX )
625
+ endif ()
585
626
endif ()
586
627
587
628
if (UNIX OR MINGW )
0 commit comments