mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-27 02:56:18 -04:00
bug 1047: inline functions C99 conformance
C99 6.7.4p3 sets some constraints on what can be done in inline functions, and the Sun C compiler on OpenSolaris is reported to take those constraints seriously. See the elinks-dev thread "Patch for porting Elinks to OpenSolaris" that started on 2009-02-18.
This commit is contained in:
parent
a2404407ce
commit
5a320b6ec0
2
NEWS
2
NEWS
@ -18,6 +18,8 @@ To be released as 0.11.6.
|
||||
Turkish locale
|
||||
* minor: clicking a link with the mouse activates that link, rather
|
||||
than the one selected with move-cursor-* actions
|
||||
* build bug 1047: attempt to make inline functions satisfy C99 6.7.4p3
|
||||
so that ELinks can be built on OpenSolaris
|
||||
|
||||
ELinks 0.11.5:
|
||||
--------------
|
||||
|
@ -423,7 +423,9 @@ load_ecmascript_imports(struct session *ses, struct document_view *doc_view)
|
||||
#define load_ecmascript_imports(ses, doc_view)
|
||||
#endif
|
||||
|
||||
inline void
|
||||
/* can't be inline according to C99 6.7.4p3 because it uses static
|
||||
* request_frameset() and is not itself static */
|
||||
void
|
||||
load_frames(struct session *ses, struct document_view *doc_view)
|
||||
{
|
||||
struct document *document = doc_view->document;
|
||||
|
@ -52,9 +52,9 @@ elinks_ulongcat(unsigned char *s, unsigned int *slen,
|
||||
unsigned char fillchar, unsigned int base,
|
||||
unsigned int upper)
|
||||
{
|
||||
static unsigned char unum[]= "0123456789ABCDEF";
|
||||
static unsigned char lnum[]= "0123456789abcdef";
|
||||
unsigned char *to_num = (unsigned char *) (upper ? &unum : &lnum);
|
||||
static const unsigned char unum[]= "0123456789ABCDEF";
|
||||
static const unsigned char lnum[]= "0123456789abcdef";
|
||||
const unsigned char *to_num = (upper ? unum : lnum);
|
||||
unsigned int start = slen ? *slen : 0;
|
||||
unsigned int nlen = 1; /* '0' is one char, we can't have less. */
|
||||
unsigned int pos = start; /* starting position of the number */
|
||||
|
Loading…
Reference in New Issue
Block a user