forked from OSchip/llvm-project
				
			Check for process_vm_readv using CheckSymbolExists
Instead of checking if code compiles, I think it is a better to check if the symbol exists. This is simpler and should do the same thing. Differential Revision: https://reviews.llvm.org/D47897 llvm-svn: 334219
This commit is contained in:
		
							parent
							
								
									e8eb567e17
								
							
						
					
					
						commit
						05c10d0def
					
				| 
						 | 
					@ -14,14 +14,8 @@ check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 | 
				
			||||||
check_include_file(termios.h HAVE_TERMIOS_H)
 | 
					check_include_file(termios.h HAVE_TERMIOS_H)
 | 
				
			||||||
check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
 | 
					check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
check_cxx_source_compiles("
 | 
					check_cxx_symbol_exists(process_vm_readv "sys/uio.h" HAVE_PROCESS_VM_READV)
 | 
				
			||||||
  #include <sys/uio.h>
 | 
					check_cxx_symbol_exists(__NR_process_vm_readv "sys/syscall.h" HAVE_NR_PROCESS_VM_READV)
 | 
				
			||||||
  int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }"
 | 
					 | 
				
			||||||
  HAVE_PROCESS_VM_READV)
 | 
					 | 
				
			||||||
check_cxx_source_compiles("
 | 
					 | 
				
			||||||
    #include <sys/syscall.h>
 | 
					 | 
				
			||||||
    int main() { return __NR_process_vm_readv; }"
 | 
					 | 
				
			||||||
    HAVE_NR_PROCESS_VM_READV)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
check_library_exists(compression compression_encode_buffer "" HAVE_LIBCOMPRESSION)
 | 
					check_library_exists(compression compression_encode_buffer "" HAVE_LIBCOMPRESSION)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue