Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
b9bc4bf6
Commit
b9bc4bf6
authored
Sep 18, 2001
by
Alan Modra
Committed by
Alan Modra
Sep 18, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* objalloc.h (OBJALLOC_ALIGN): Define using offsetof.
From-SVN: r45677
parent
d71ebc32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
include/ChangeLog
+4
-0
include/objalloc.h
+5
-6
No files found.
include/ChangeLog
View file @
b9bc4bf6
2001-09-18 Alan Modra <amodra@bigpond.net.au>
* objalloc.h (OBJALLOC_ALIGN): Define using offsetof.
2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libiberty.h (concat_length, concat_copy, concat_copy2,
...
...
include/objalloc.h
View file @
b9bc4bf6
/* objalloc.h -- routines to allocate memory for objects
Copyright 1997 Free Software Foundation, Inc.
Copyright 1997
, 2001
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Solutions.
This program is free software; you can redistribute it and/or modify it
...
...
@@ -56,12 +56,11 @@ struct objalloc_align { char x; double d; };
#ifndef offsetof
#include <stddef.h>
#endif
#define OBJALLOC_ALIGN \
((ptrdiff_t) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
#else
#define OBJALLOC_ALIGN \
((long) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
#endif
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
#endif
#define OBJALLOC_ALIGN offsetof (struct objalloc_align, d)
/* Create an objalloc structure. Returns NULL if malloc fails. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment