Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
1 user(s) are online (1 user(s) are browsing Forum)

Members: 0
Guests: 1

more...

Browsing this Thread:   1 Anonymous Users



« 1 ... 3 4 5 (6)


Re: a more modern gcc?

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 1026
Offline
Quote:

Kalamatee wrote:
Quote:

Kalamatee wrote:
Quote:

simplex wrote:
I looked up the ucontext.h source and I think maybe you meant that I should change it to struct ucontext_t. I made that change and I’'ll update the moment I know something.



no, ucontext_t should be a typedef of type struct xxxx.




I would be interested to see the contents of your ucontext.h - could you perhaps email it to me at kalamatee@gmail.com

Thanks for fixing the AROS build with newer gcc!

Here's my ucontext relevant part in sys/ucontext.h:

/* Userlevel context. */
typedef struct ucontext_t
{
unsigned long int uc_flags;
struct ucontext_t *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
sigset_t uc_sigmask;
struct _libc_fpstate __fpregs_mem;
} ucontext_t;

Definition is the same for __x86_64__ and !__x86_64__

[dizzy@linux include]$ grep -r "ucontext" *

asm/ucontext.h: * layout pointed by the fpstate pointer in the ucontext's sigcontext
asm/ucontext.h:#include
asm-generic/ucontext.h:struct ucontext {
asm-generic/ucontext.h: struct ucontext *uc_link;
rdma/cxgb4-abi.h:struct c4iw_alloc_ucontext_resp {
rdma/mlx5-abi.h:struct mlx5_ib_alloc_ucontext_req {
rdma/mlx5-abi.h:struct mlx5_ib_alloc_ucontext_req_v2 {
rdma/mlx5-abi.h:enum mlx5_ib_alloc_ucontext_resp_mask {
rdma/mlx5-abi.h:struct mlx5_ib_alloc_ucontext_resp {
rdma/qedr-abi.h:struct qedr_alloc_ucontext_resp {
rdma/mthca-abi.h:struct mthca_alloc_ucontext_resp {
rdma/vmw_pvrdma-abi.h:struct pvrdma_alloc_ucontext_resp {
rdma/hns-abi.h:struct hns_roce_ib_alloc_ucontext_resp {
rdma/ocrdma-abi.h:struct ocrdma_alloc_ucontext_resp {
rdma/nes-abi.h:struct nes_alloc_ucontext_req {
rdma/nes-abi.h:struct nes_alloc_ucontext_resp {
rdma/mlx4-abi.h:struct mlx4_ib_alloc_ucontext_resp_v3 {
rdma/mlx4-abi.h:struct mlx4_ib_alloc_ucontext_resp {
signal.h:/* This will define `ucontext_t' and `mcontext_t'. */
signal.h:# include
sys/ucontext.h:typedef struct ucontext_t
sys/ucontext.h: struct ucontext_t *uc_link;
sys/ucontext.h: } ucontext_t;
sys/ucontext.h:typedef struct ucontext_t
sys/ucontext.h: struct ucontext_t *uc_link;
sys/ucontext.h: } ucontext_t;
sys/ucontext.h:#endif /* sys/ucontext.h */
ucontext.h:#include
ucontext.h:extern int getcontext (ucontext_t *__ucp) __THROWNL;
ucontext.h:extern int setcontext (const ucontext_t *__ucp) __THROWNL;
ucontext.h:extern int swapcontext (ucontext_t *__restrict __oucp,
ucontext.h: const ucontext_t *__restrict __ucp) __THROWNL;
ucontext.h:extern void makecontext (ucontext_t *__ucp, void (*__func) (void),
ucontext.h:#endif /* ucontext.h */

Posted on: 4/19 22:48
Transfer the post to other applications Transfer


No Account
Re: a more modern gcc?
Guest_No Account
Quote:

DizzyOfCRN wrote:
Quote:

Kalamatee wrote:
Quote:

Kalamatee wrote:
Quote:

simplex wrote:
I looked up the ucontext.h source and I think maybe you meant that I should change it to struct ucontext_t. I made that change and I’'ll update the moment I know something.



no, ucontext_t should be a typedef of type struct xxxx.




I would be interested to see the contents of your ucontext.h - could you perhaps email it to me at kalamatee@gmail.com

Thanks for fixing the AROS build with newer gcc!

Here's my ucontext relevant part in sys/ucontext.h:

/* Userlevel context. */
typedef struct ucontext_t
{
unsigned long int uc_flags;
struct ucontext_t *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
sigset_t uc_sigmask;
struct _libc_fpstate __fpregs_mem;
} ucontext_t;

Definition is the same for __x86_64__ and !__x86_64__

[dizzy@linux include]$ grep -r "ucontext" *

asm/ucontext.h: * layout pointed by the fpstate pointer in the ucontext's sigcontext
asm/ucontext.h:#include
asm-generic/ucontext.h:struct ucontext {
asm-generic/ucontext.h: struct ucontext *uc_link;
rdma/cxgb4-abi.h:struct c4iw_alloc_ucontext_resp {
rdma/mlx5-abi.h:struct mlx5_ib_alloc_ucontext_req {
rdma/mlx5-abi.h:struct mlx5_ib_alloc_ucontext_req_v2 {
rdma/mlx5-abi.h:enum mlx5_ib_alloc_ucontext_resp_mask {
rdma/mlx5-abi.h:struct mlx5_ib_alloc_ucontext_resp {
rdma/qedr-abi.h:struct qedr_alloc_ucontext_resp {
rdma/mthca-abi.h:struct mthca_alloc_ucontext_resp {
rdma/vmw_pvrdma-abi.h:struct pvrdma_alloc_ucontext_resp {
rdma/hns-abi.h:struct hns_roce_ib_alloc_ucontext_resp {
rdma/ocrdma-abi.h:struct ocrdma_alloc_ucontext_resp {
rdma/nes-abi.h:struct nes_alloc_ucontext_req {
rdma/nes-abi.h:struct nes_alloc_ucontext_resp {
rdma/mlx4-abi.h:struct mlx4_ib_alloc_ucontext_resp_v3 {
rdma/mlx4-abi.h:struct mlx4_ib_alloc_ucontext_resp {
signal.h:/* This will define `ucontext_t' and `mcontext_t'. */
signal.h:# include
sys/ucontext.h:typedef struct ucontext_t
sys/ucontext.h: struct ucontext_t *uc_link;
sys/ucontext.h: } ucontext_t;
sys/ucontext.h:typedef struct ucontext_t
sys/ucontext.h: struct ucontext_t *uc_link;
sys/ucontext.h: } ucontext_t;
sys/ucontext.h:#endif /* sys/ucontext.h */
ucontext.h:#include
ucontext.h:extern int getcontext (ucontext_t *__ucp) __THROWNL;
ucontext.h:extern int setcontext (const ucontext_t *__ucp) __THROWNL;
ucontext.h:extern int swapcontext (ucontext_t *__restrict __oucp,
ucontext.h: const ucontext_t *__restrict __ucp) __THROWNL;
ucontext.h:extern void makecontext (ucontext_t *__ucp, void (*__func) (void),
ucontext.h:#endif /* ucontext.h */


I think we need to adjust the used ucontext.h ("ucontext.h" or "sys/ucontext.h") depending on host, and query which in the top level configure.

From what ive seen and read, "ucontext_t" _is_ the correct type specifier to use (not struct ucontext_t), since the actual structure type could have different name depending on host (ucontext, ucontext_t or unnamed on some..), but it depends on including the correct header to get the definition.

sys/uncontext.h is meant to be deprecated according to POSIX.1-2008, and may not exist on some systems.

Posted on: 4/20 11:13
Transfer the post to other applications Transfer



« 1 ... 3 4 5 (6)



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4434
2 magorium
magorium
4095
3 nikolaos
nikolaos
4026
4 phoenixkonsole
phoenixkonsole
3929
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2796
7 mazze
mazze
2221
8 clusteruk
clusteruk
2112
9 damocles
damocles
1789
10 BSzili
BSzili
1513
© 2004-2018 AROS Exec