1
- // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
@@ -720,10 +720,14 @@ pub mod types {
720
720
721
721
}
722
722
723
- #[ cfg( target_arch = "x86_64" ) ]
723
+ #[ cfg( any( target_arch = "x86_64" ,
724
+ target_arch = "aarch64" ) ) ]
724
725
pub mod arch {
725
726
pub mod c95 {
727
+ #[ cfg( not( target_arch = "aarch64" ) ) ]
726
728
pub type c_char = i8 ;
729
+ #[ cfg( target_arch = "aarch64" ) ]
730
+ pub type c_char = u8 ;
727
731
pub type c_schar = i8 ;
728
732
pub type c_uchar = u8 ;
729
733
pub type c_short = i16 ;
@@ -739,7 +743,10 @@ pub mod types {
739
743
pub type clock_t = i64 ;
740
744
pub type time_t = i64 ;
741
745
pub type suseconds_t = i64 ;
746
+ #[ cfg( not( target_arch = "aarch64" ) ) ]
742
747
pub type wchar_t = i32 ;
748
+ #[ cfg( target_arch = "aarch64" ) ]
749
+ pub type wchar_t = u32 ;
743
750
}
744
751
pub mod c99 {
745
752
pub type c_longlong = i64 ;
@@ -760,6 +767,7 @@ pub mod types {
760
767
pub type mode_t = u32 ;
761
768
pub type ssize_t = i64 ;
762
769
}
770
+ #[ cfg( not( target_arch = "aarch64" ) ) ]
763
771
pub mod posix01 {
764
772
use types:: os:: arch:: c95:: { c_int, c_long, time_t} ;
765
773
use types:: os:: arch:: posix88:: { dev_t, gid_t, ino_t} ;
@@ -769,6 +777,7 @@ pub mod types {
769
777
pub type nlink_t = u64 ;
770
778
pub type blksize_t = i64 ;
771
779
pub type blkcnt_t = i64 ;
780
+
772
781
#[ repr( C ) ]
773
782
#[ deriving( Copy ) ] pub struct stat {
774
783
pub st_dev : dev_t ,
@@ -802,6 +811,51 @@ pub mod types {
802
811
pub __size : [ u64 ; 7 ]
803
812
}
804
813
}
814
+ #[ cfg( target_arch = "aarch64" ) ]
815
+ pub mod posix01 {
816
+ use types:: os:: arch:: c95:: { c_int, c_long, time_t} ;
817
+ use types:: os:: arch:: posix88:: { dev_t, gid_t, ino_t} ;
818
+ use types:: os:: arch:: posix88:: { mode_t, off_t} ;
819
+ use types:: os:: arch:: posix88:: { uid_t} ;
820
+
821
+ pub type nlink_t = u32 ;
822
+ pub type blksize_t = i32 ;
823
+ pub type blkcnt_t = i64 ;
824
+
825
+ #[ repr( C ) ]
826
+ #[ deriving( Copy ) ] pub struct stat {
827
+ pub st_dev : dev_t ,
828
+ pub st_ino : ino_t ,
829
+ pub st_mode : mode_t ,
830
+ pub st_nlink : nlink_t ,
831
+ pub st_uid : uid_t ,
832
+ pub st_gid : gid_t ,
833
+ pub st_rdev : dev_t ,
834
+ pub __pad1 : dev_t ,
835
+ pub st_size : off_t ,
836
+ pub st_blksize : blksize_t ,
837
+ pub __pad2 : c_int ,
838
+ pub st_blocks : blkcnt_t ,
839
+ pub st_atime : time_t ,
840
+ pub st_atime_nsec : c_long ,
841
+ pub st_mtime : time_t ,
842
+ pub st_mtime_nsec : c_long ,
843
+ pub st_ctime : time_t ,
844
+ pub st_ctime_nsec : c_long ,
845
+ pub __unused : [ c_int ; 2 ] ,
846
+ }
847
+
848
+ #[ repr( C ) ]
849
+ #[ deriving( Copy ) ] pub struct utimbuf {
850
+ pub actime : time_t ,
851
+ pub modtime : time_t ,
852
+ }
853
+
854
+ #[ repr( C ) ]
855
+ #[ deriving( Copy ) ] pub struct pthread_attr_t {
856
+ pub __size : [ u64 ; 8 ]
857
+ }
858
+ }
805
859
pub mod posix08 {
806
860
}
807
861
pub mod bsd44 {
@@ -2444,7 +2498,8 @@ pub mod consts {
2444
2498
}
2445
2499
#[ cfg( any( target_arch = "x86" ,
2446
2500
target_arch = "x86_64" ,
2447
- target_arch = "arm" ) ) ]
2501
+ target_arch = "arm" ,
2502
+ target_arch = "aarch64" ) ) ]
2448
2503
pub mod posix88 {
2449
2504
use types:: os:: arch:: c95:: c_int;
2450
2505
use types:: common:: c95:: c_void;
@@ -2939,7 +2994,9 @@ pub mod consts {
2939
2994
pub const PTHREAD_STACK_MIN : size_t = 16384 ;
2940
2995
2941
2996
#[ cfg( all( target_os = "linux" ,
2942
- any( target_arch = "mips" , target_arch = "mipsel" ) ) ) ]
2997
+ any( target_arch = "mips" ,
2998
+ target_arch = "mipsel" ,
2999
+ target_arch = "aarch64" ) ) ) ]
2943
3000
pub const PTHREAD_STACK_MIN : size_t = 131072 ;
2944
3001
2945
3002
pub const CLOCK_REALTIME : c_int = 0 ;
@@ -2948,6 +3005,7 @@ pub mod consts {
2948
3005
pub mod posix08 {
2949
3006
}
2950
3007
#[ cfg( any( target_arch = "arm" ,
3008
+ target_arch = "aarch64" ,
2951
3009
target_arch = "x86" ,
2952
3010
target_arch = "x86_64" ) ) ]
2953
3011
pub mod bsd44 {
@@ -3043,7 +3101,8 @@ pub mod consts {
3043
3101
}
3044
3102
#[ cfg( any( target_arch = "x86" ,
3045
3103
target_arch = "x86_64" ,
3046
- target_arch = "arm" ) ) ]
3104
+ target_arch = "arm" ,
3105
+ target_arch = "aarch64" ) ) ]
3047
3106
pub mod extra {
3048
3107
use types:: os:: arch:: c95:: c_int;
3049
3108
0 commit comments