diff options
author | Ed Wildgoose <ed+git@wildgooses.com> | 2020-06-16 15:00:56 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2020-07-02 08:25:47 +0200 |
commit | 93277314f0ec84409e15f6e2cd616d028cb53065 (patch) | |
tree | 8d1700eaf083f9cf364eeb6f99a4845e9aeb3210 /libc/sysdeps/linux/x86_64/bits | |
parent | a852c9941054d2cb5e50964cb9ddb975b5d11689 (diff) |
Rename __unused struct members to include a namespace
Rename various spare fields in structs to include a namespace
This should avoid accidental clashes with uses of the __unused symbol
in upstream projects. eg currently it causes a compile error in dhcpcd 8.x
due to their re-use of the __unused symbol as a macro
This follows the style of glibc which does something equivalent
Diffstat (limited to 'libc/sysdeps/linux/x86_64/bits')
-rw-r--r-- | libc/sysdeps/linux/x86_64/bits/fenv.h | 10 | ||||
-rw-r--r-- | libc/sysdeps/linux/x86_64/bits/kernel_stat.h | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/x86_64/bits/msq.h | 10 | ||||
-rw-r--r-- | libc/sysdeps/linux/x86_64/bits/sem.h | 8 | ||||
-rw-r--r-- | libc/sysdeps/linux/x86_64/bits/shm.h | 18 | ||||
-rw-r--r-- | libc/sysdeps/linux/x86_64/bits/stat.h | 8 |
6 files changed, 28 insertions, 28 deletions
diff --git a/libc/sysdeps/linux/x86_64/bits/fenv.h b/libc/sysdeps/linux/x86_64/bits/fenv.h index 8e38c16ec..f16b64ad3 100644 --- a/libc/sysdeps/linux/x86_64/bits/fenv.h +++ b/libc/sysdeps/linux/x86_64/bits/fenv.h @@ -69,18 +69,18 @@ typedef unsigned short int fexcept_t; typedef struct { unsigned short int __control_word; - unsigned short int __unused1; + unsigned short int __uclibc_unused1; unsigned short int __status_word; - unsigned short int __unused2; + unsigned short int __uclibc_unused2; unsigned short int __tags; - unsigned short int __unused3; + unsigned short int __uclibc_unused3; unsigned int __eip; unsigned short int __cs_selector; unsigned int __opcode:11; - unsigned int __unused4:5; + unsigned int __uclibc_unused4:5; unsigned int __data_offset; unsigned short int __data_selector; - unsigned short int __unused5; + unsigned short int __uclibc_unused5; #if __WORDSIZE == 64 unsigned int __mxcsr; #endif diff --git a/libc/sysdeps/linux/x86_64/bits/kernel_stat.h b/libc/sysdeps/linux/x86_64/bits/kernel_stat.h index e194a7f76..d01d81d69 100644 --- a/libc/sysdeps/linux/x86_64/bits/kernel_stat.h +++ b/libc/sysdeps/linux/x86_64/bits/kernel_stat.h @@ -21,7 +21,7 @@ struct kernel_stat { struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; - long __unused[3]; + long __uclibc_unused[3]; }; /* x86-64 stat64 is same as stat */ diff --git a/libc/sysdeps/linux/x86_64/bits/msq.h b/libc/sysdeps/linux/x86_64/bits/msq.h index 838910713..3141266bc 100644 --- a/libc/sysdeps/linux/x86_64/bits/msq.h +++ b/libc/sysdeps/linux/x86_64/bits/msq.h @@ -39,23 +39,23 @@ struct msqid_ds struct ipc_perm msg_perm; /* structure describing operation permission */ __time_t msg_stime; /* time of last msgsnd command */ #if __WORDSIZE == 32 - unsigned long int __unused1; + unsigned long int __uclibc_unused1; #endif __time_t msg_rtime; /* time of last msgrcv command */ #if __WORDSIZE == 32 - unsigned long int __unused2; + unsigned long int __uclibc_unused2; #endif __time_t msg_ctime; /* time of last change */ #if __WORDSIZE == 32 - unsigned long int __unused3; + unsigned long int __uclibc_unused3; #endif unsigned long int __msg_cbytes; /* current number of bytes on queue */ msgqnum_t msg_qnum; /* number of messages currently on queue */ msglen_t msg_qbytes; /* max number of bytes allowed on queue */ __pid_t msg_lspid; /* pid of last msgsnd() */ __pid_t msg_lrpid; /* pid of last msgrcv() */ - unsigned long int __unused4; - unsigned long int __unused5; + unsigned long int __uclibc_unused4; + unsigned long int __uclibc_unused5; }; #ifdef __USE_MISC diff --git a/libc/sysdeps/linux/x86_64/bits/sem.h b/libc/sysdeps/linux/x86_64/bits/sem.h index 8c09031c7..9dfab87cb 100644 --- a/libc/sysdeps/linux/x86_64/bits/sem.h +++ b/libc/sysdeps/linux/x86_64/bits/sem.h @@ -39,12 +39,12 @@ struct semid_ds { struct ipc_perm sem_perm; /* operation permission struct */ __time_t sem_otime; /* last semop() time */ - unsigned long int __unused1; + unsigned long int __uclibc_unused1; __time_t sem_ctime; /* last time changed by semctl() */ - unsigned long int __unused2; + unsigned long int __uclibc_unused2; unsigned long int sem_nsems; /* number of semaphores in set */ - unsigned long int __unused3; - unsigned long int __unused4; + unsigned long int __uclibc_unused3; + unsigned long int __uclibc_unused4; }; /* The user should define a union like the following to use it for arguments diff --git a/libc/sysdeps/linux/x86_64/bits/shm.h b/libc/sysdeps/linux/x86_64/bits/shm.h index 3a25de562..316895853 100644 --- a/libc/sysdeps/linux/x86_64/bits/shm.h +++ b/libc/sysdeps/linux/x86_64/bits/shm.h @@ -52,21 +52,21 @@ struct shmid_ds size_t shm_segsz; /* size of segment in bytes */ __time_t shm_atime; /* time of last shmat() */ #if __WORDSIZE == 32 - unsigned long int __unused1; + unsigned long int __uclibc_unused1; #endif __time_t shm_dtime; /* time of last shmdt() */ #if __WORDSIZE == 32 - unsigned long int __unused2; + unsigned long int __uclibc_unused2; #endif __time_t shm_ctime; /* time of last change by shmctl() */ #if __WORDSIZE == 32 - unsigned long int __unused3; + unsigned long int __uclibc_unused3; #endif __pid_t shm_cpid; /* pid of creator */ __pid_t shm_lpid; /* pid of last shmop */ shmatt_t shm_nattch; /* number of current attaches */ - unsigned long int __unused4; - unsigned long int __unused5; + unsigned long int __uclibc_unused4; + unsigned long int __uclibc_unused5; }; #ifdef __USE_MISC @@ -88,10 +88,10 @@ struct shminfo unsigned long int shmmni; unsigned long int shmseg; unsigned long int shmall; - unsigned long int __unused1; - unsigned long int __unused2; - unsigned long int __unused3; - unsigned long int __unused4; + unsigned long int __uclibc_unused1; + unsigned long int __uclibc_unused2; + unsigned long int __uclibc_unused3; + unsigned long int __uclibc_unused4; }; struct shm_info diff --git a/libc/sysdeps/linux/x86_64/bits/stat.h b/libc/sysdeps/linux/x86_64/bits/stat.h index e25f01521..a7412c8f9 100644 --- a/libc/sysdeps/linux/x86_64/bits/stat.h +++ b/libc/sysdeps/linux/x86_64/bits/stat.h @@ -99,11 +99,11 @@ struct stat unsigned long int st_ctimensec; /* Nsecs of last status change. */ #endif #if __WORDSIZE == 64 - long int __unused[3]; + long int __uclibc_unused[3]; #else # ifndef __USE_FILE_OFFSET64 - unsigned long int __unused4; - unsigned long int __unused5; + unsigned long int __uclibc_unused4; + unsigned long int __uclibc_unused5; # else __ino64_t st_ino; /* File serial number. */ # endif @@ -160,7 +160,7 @@ struct stat64 unsigned long int st_ctimensec; /* Nsecs of last status change. */ #endif #if __WORDSIZE == 64 - long int __unused[3]; + long int __uclibc_unused[3]; #else __ino64_t st_ino; /* File serial number. */ #endif |