[test-suite] r261068 - cmake: 254.gap: Add sgtty.h with stubs for iOS

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 12:36:11 PST 2016


Hi Matthias,

Is this fix cmake-specific? I think I hit the same issue just recently - is it possible to fix it for other cases too?

Thanks,
Michael

> On Feb 16, 2016, at 9:42 PM, Matthias Braun via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Author: matze
> Date: Tue Feb 16 23:42:28 2016
> New Revision: 261068
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=261068&view=rev
> Log:
> cmake: 254.gap: Add sgtty.h with stubs for iOS
> 
> Added:
>    test-suite/trunk/External/SPEC/CINT2000/254.gap/stubs/
>    test-suite/trunk/External/SPEC/CINT2000/254.gap/stubs/sgtty.h
> Modified:
>    test-suite/trunk/External/SPEC/CINT2000/254.gap/CMakeLists.txt
> 
> Modified: test-suite/trunk/External/SPEC/CINT2000/254.gap/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/254.gap/CMakeLists.txt?rev=261068&r1=261067&r2=261068&view=diff
> ==============================================================================
> --- test-suite/trunk/External/SPEC/CINT2000/254.gap/CMakeLists.txt (original)
> +++ test-suite/trunk/External/SPEC/CINT2000/254.gap/CMakeLists.txt Tue Feb 16 23:42:28 2016
> @@ -4,6 +4,7 @@ list(APPEND CPPFLAGS -include unistd.h -
> 
> if(TARGET_OS STREQUAL "Darwin")
>   list(APPEND CPPFLAGS -DSYS_IS_BSD)
> +  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/stubs)
> else()
>   list(APPEND CPPFLAGS -DSYS_IS_USG)
> endif()
> 
> Added: test-suite/trunk/External/SPEC/CINT2000/254.gap/stubs/sgtty.h
> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/254.gap/stubs/sgtty.h?rev=261068&view=auto
> ==============================================================================
> --- test-suite/trunk/External/SPEC/CINT2000/254.gap/stubs/sgtty.h (added)
> +++ test-suite/trunk/External/SPEC/CINT2000/254.gap/stubs/sgtty.h Tue Feb 16 23:42:28 2016
> @@ -0,0 +1,34 @@
> +// 254.gap uses sgtty/ioctl to disable terminal input buffering. This pointless
> +// as far as benchmarking goes. Newer iOS SDKs do not provide sgtty.h anymore
> +// (it's not part of any standards anyway), so this file stubs out some sgtty
> +// stuff.
> +#ifndef SYS_IS_BSD
> +#error workaround assumes the SYS_IS_BSD code is used
> +#endif
> +
> +struct tchars {
> +  int t_intrc;
> +  int t_quitc;
> +};
> +struct sgttyb {
> +  int sg_flags;
> +};
> +
> +#ifndef TIOCGETP
> +#define TIOCGETP 0
> +#endif
> +#ifndef TIOCGETC
> +#define TIOCGETC 0
> +#endif
> +#ifndef TIOCSETC
> +#define TIOCSETC 0
> +#endif
> +#ifndef TIOCSETN
> +#define TIOCSETN 0
> +#endif
> +#ifndef CBREAK
> +#define CBREAK 0
> +#endif
> +#ifndef ECHO
> +#define ECHO 0
> +#endif
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list