FBSD: Build support for FreeBSD 13

Add sysnames and param.h files for FreeBSD 13.0 and 13.1.

Note that our param.h does differ from the FreeBSD 12 param.h, in that
AFS_64BITUSERPOINTER_ENV is defined for both UKERNEL and non-UKERNEL.
Otherwise, afs_pointer_to_int() causes warnings when building UKERNEL
(due to newer clang):

    .../src/afs/afs_icl.c:680:39: error: cast to smaller integer type 'afs_uint32' (aka 'unsigned int') from 'pthread_t' (aka 'struct pthread *') [-Werror,-Wpointer-to-int-cast]
        ICL_APPENDINT32(logp, (afs_int32) osi_ThreadUnique());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
    .../src/afs/afs_osi.h:201:28: note: expanded from macro 'osi_ThreadUnique'
                                    ^
    .../src/afs/UKERNEL/sysincludes.h:230:30: note: expanded from macro 'osi_getpid'
                                    ^
    .../include/afs/stds.h:282:37: note: expanded from macro 'afs_pointer_to_int'
                                        ^
    .../src/afs/afs_icl.c:523:41: note: expanded from macro 'ICL_APPENDINT32'
            (lp)->datap[(lp)->firstFree] = (x); \
                                            ^

Change-Id: I525c2df5981427d3ad1105030331c06fb7a59d78
Reviewed-on: https://gerrit.openafs.org/15160
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Andrew Deason 2022-10-25 13:25:33 -05:00
parent d822447c27
commit 403dfd677b
3 changed files with 121 additions and 0 deletions

View File

@ -376,6 +376,8 @@
#define SYS_NAME_ID_amd64_fbsd_121 3061
#define SYS_NAME_ID_amd64_fbsd_122 3062
#define SYS_NAME_ID_amd64_fbsd_123 3063
#define SYS_NAME_ID_amd64_fbsd_130 3070
#define SYS_NAME_ID_amd64_fbsd_131 3071
#define SYS_NAME_ID_amd64_w2k 3400

View File

@ -0,0 +1,58 @@
#ifndef AFS_PARAM_H
#define AFS_PARAM_H
/* Machine / Operating system information */
#define SYS_NAME "amd64_fbsd_130"
#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_130
#define AFS_64BITPOINTER_ENV 1
#define AFS_64BITUSERPOINTER_ENV 1
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
#define AFS_FBSD101_ENV 1
#define AFS_FBSD102_ENV 1
#define AFS_FBSD103_ENV 1
#define AFS_FBSD104_ENV 1
#define AFS_FBSD110_ENV 1
#define AFS_FBSD111_ENV 1
#define AFS_FBSD120_ENV 1
#define AFS_FBSD121_ENV 1
#define AFS_FBSD122_ENV 1
#define AFS_FBSD123_ENV 1
#define AFS_FBSD130_ENV 1
#define AFS_X86_FBSD101_ENV 1
#define AFS_X86_FBSD102_ENV 1
#define AFS_X86_FBSD103_ENV 1
#define AFS_X86_FBSD104_ENV 1
#define AFS_X86_FBSD110_ENV 1
#define AFS_X86_FBSD111_ENV 1
#define AFS_X86_FBSD120_ENV 1
#define AFS_X86_FBSD121_ENV 1
#define AFS_X86_FBSD122_ENV 1
#define AFS_X86_FBSD123_ENV 1
#define AFS_X86_FBSD130_ENV 1
#else /* !defined(UKERNEL) */
/* This section for user space compiles only */
#define AFS_USR_FBSD101_ENV 1
#define AFS_USR_FBSD102_ENV 1
#define AFS_USR_FBSD103_ENV 1
#define AFS_USR_FBSD104_ENV 1
#define AFS_USR_FBSD110_ENV 1
#define AFS_USR_FBSD111_ENV 1
#define AFS_USR_FBSD120_ENV 1
#define AFS_USR_FBSD121_ENV 1
#define AFS_USR_FBSD122_ENV 1
#define AFS_USR_FBSD123_ENV 1
#define AFS_USR_FBSD130_ENV 1
#endif /* !defined(UKERNEL) */
#define USE_UCONTEXT
#endif /* AFS_PARAM_H */

View File

@ -0,0 +1,61 @@
#ifndef AFS_PARAM_H
#define AFS_PARAM_H
/* Machine / Operating system information */
#define SYS_NAME "amd64_fbsd_131"
#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_131
#define AFS_64BITPOINTER_ENV 1
#define AFS_64BITUSERPOINTER_ENV 1
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
#define AFS_FBSD101_ENV 1
#define AFS_FBSD102_ENV 1
#define AFS_FBSD103_ENV 1
#define AFS_FBSD104_ENV 1
#define AFS_FBSD110_ENV 1
#define AFS_FBSD111_ENV 1
#define AFS_FBSD120_ENV 1
#define AFS_FBSD121_ENV 1
#define AFS_FBSD122_ENV 1
#define AFS_FBSD123_ENV 1
#define AFS_FBSD130_ENV 1
#define AFS_FBSD131_ENV 1
#define AFS_X86_FBSD101_ENV 1
#define AFS_X86_FBSD102_ENV 1
#define AFS_X86_FBSD103_ENV 1
#define AFS_X86_FBSD104_ENV 1
#define AFS_X86_FBSD110_ENV 1
#define AFS_X86_FBSD111_ENV 1
#define AFS_X86_FBSD120_ENV 1
#define AFS_X86_FBSD121_ENV 1
#define AFS_X86_FBSD122_ENV 1
#define AFS_X86_FBSD123_ENV 1
#define AFS_X86_FBSD130_ENV 1
#define AFS_X86_FBSD131_ENV 1
#else /* !defined(UKERNEL) */
/* This section for user space compiles only */
#define AFS_USR_FBSD101_ENV 1
#define AFS_USR_FBSD102_ENV 1
#define AFS_USR_FBSD103_ENV 1
#define AFS_USR_FBSD104_ENV 1
#define AFS_USR_FBSD110_ENV 1
#define AFS_USR_FBSD111_ENV 1
#define AFS_USR_FBSD120_ENV 1
#define AFS_USR_FBSD121_ENV 1
#define AFS_USR_FBSD122_ENV 1
#define AFS_USR_FBSD123_ENV 1
#define AFS_USR_FBSD130_ENV 1
#define AFS_USR_FBSD131_ENV 1
#endif /* !defined(UKERNEL) */
#define USE_UCONTEXT
#endif /* AFS_PARAM_H */