mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
solaris 11 fix
git-svn-id: file:///svn/unbound/trunk@1547 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
dbf9f42142
commit
e5c414355e
6 changed files with 4583 additions and 3335 deletions
|
|
@ -279,7 +279,8 @@ ifeq "$(strip $(LEX))" ":"
|
|||
$Qecho "rebuild lexer, but no lex program, skipped"
|
||||
else
|
||||
@-if test ! -d util; then $(INSTALL) -d util; fi
|
||||
$Qecho "#include \"util/configyyrename.h\"" > $@
|
||||
$Qecho "#include \"config.h\"" > $@
|
||||
$Qecho "#include \"util/configyyrename.h\"" >> $@
|
||||
$Q$(LEX) -t $< >> $@
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1076,7 +1076,6 @@ AC_DEFUN(ACX_STRIP_EXT_FLAGS,
|
|||
ACX_CFLAGS_STRIP(-D_XOPEN_SOURCE=600)
|
||||
ACX_CFLAGS_STRIP(-D_XOPEN_SOURCE_EXTENDED=1)
|
||||
ACX_CFLAGS_STRIP(-D_ALL_SOURCE)
|
||||
ACX_CFLAGS_STRIP(-std=c99)
|
||||
ACX_CFLAGS_STRIP(-D_LARGEFILE_SOURCE=1)
|
||||
]) dnl End of ACX_STRIP_EXT_FLAGS
|
||||
|
||||
|
|
@ -1104,8 +1103,6 @@ AHX_CONFIG_FLAG_EXT(-D_POSIX_C_SOURCE=200112)
|
|||
AHX_CONFIG_FLAG_EXT(-D_XOPEN_SOURCE=600)
|
||||
AHX_CONFIG_FLAG_EXT(-D_XOPEN_SOURCE_EXTENDED=1)
|
||||
AHX_CONFIG_FLAG_EXT(-D_ALL_SOURCE)
|
||||
AHX_CONFIG_FLAG_OMITTED(AS_TR_CPP(OMITTED_-std=c99),_STDC_C99,1)
|
||||
|
||||
AHX_CONFIG_FLAG_EXT(-D_LARGEFILE_SOURCE=1)
|
||||
])
|
||||
|
||||
|
|
|
|||
53
config.h.in
53
config.h.in
|
|
@ -339,9 +339,6 @@
|
|||
/* Put -D__EXTENSIONS__ define in config.h */
|
||||
#undef OMITTED__D__EXTENSIONS__
|
||||
|
||||
/* Put -std=c99 define in config.h */
|
||||
#undef OMITTED__STD_C99
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
|
|
@ -391,6 +388,28 @@
|
|||
/* Define if you want to use internal select based events */
|
||||
#undef USE_MINI_EVENT
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
|
||||
|
||||
/* Whether the windows socket API is used */
|
||||
#undef USE_WINSOCK
|
||||
|
||||
|
|
@ -401,13 +420,6 @@
|
|||
`char[]'. */
|
||||
#undef YYTEXT_POINTER
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
|
|
@ -417,18 +429,28 @@
|
|||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
#undef _POSIX_1_SOURCE
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT32_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT64_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT8_T
|
||||
|
||||
|
|
@ -512,6 +534,7 @@
|
|||
/* Define as `fork' if `vfork' does not work. */
|
||||
#undef vfork
|
||||
|
||||
|
||||
#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
|
@ -540,10 +563,6 @@
|
|||
#define _ALL_SOURCE 1
|
||||
#endif
|
||||
|
||||
#if defined(OMITTED__STD_C99) && !defined(_STDC_C99)
|
||||
#define _STDC_C99 1
|
||||
#endif
|
||||
|
||||
#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
|
||||
#define _LARGEFILE_SOURCE 1
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
- more neat configure.ac. Removed duplicate config.h includes.
|
||||
- neater config.h.in.
|
||||
- iana portlist updated.
|
||||
- fix util/configlexer.c and solaris -std=c99 flag.
|
||||
|
||||
23 March 2009: Wouter
|
||||
- added launchd plist example file for MacOSX to contrib.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#include "config.h"
|
||||
#include "util/configyyrename.h"
|
||||
|
||||
#line 3 "<stdout>"
|
||||
|
|
@ -9,7 +10,7 @@
|
|||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 5
|
||||
#define YY_FLEX_SUBMINOR_VERSION 35
|
||||
#define YY_FLEX_SUBMINOR_VERSION 33
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
|
|
@ -31,7 +32,7 @@
|
|||
|
||||
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
|
||||
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
||||
* if you want the limit (max/min) macros for int types.
|
||||
|
|
@ -94,12 +95,11 @@ typedef unsigned int flex_uint32_t;
|
|||
|
||||
#else /* ! __cplusplus */
|
||||
|
||||
/* C99 requires __STDC__ to be defined as 1. */
|
||||
#if defined (__STDC__)
|
||||
#ifdef __STDC__
|
||||
|
||||
#define YY_USE_CONST
|
||||
|
||||
#endif /* defined (__STDC__) */
|
||||
#endif /* __STDC__ */
|
||||
#endif /* ! __cplusplus */
|
||||
|
||||
#ifdef YY_USE_CONST
|
||||
|
|
@ -179,9 +179,14 @@ extern FILE *yyin, *yyout;
|
|||
|
||||
#define unput(c) yyunput( c, (yytext_ptr) )
|
||||
|
||||
/* The following is because we cannot portably get our hands on size_t
|
||||
* (without autoconf's help, which isn't available because we want
|
||||
* flex-generated scanners to compile on their own).
|
||||
*/
|
||||
|
||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||
#define YY_TYPEDEF_YY_SIZE_T
|
||||
typedef size_t yy_size_t;
|
||||
typedef unsigned int yy_size_t;
|
||||
#endif
|
||||
|
||||
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
||||
|
|
@ -1391,7 +1396,7 @@ static void config_end_include(void)
|
|||
#define YY_NO_INPUT 1
|
||||
#endif
|
||||
|
||||
#line 1394 "<stdout>"
|
||||
#line 1398 "<stdout>"
|
||||
|
||||
#define INITIAL 0
|
||||
#define quotedstring 1
|
||||
|
|
@ -1414,35 +1419,6 @@ static void config_end_include(void)
|
|||
|
||||
static int yy_init_globals (void );
|
||||
|
||||
/* Accessor methods to globals.
|
||||
These are made visible to non-reentrant scanners for convenience. */
|
||||
|
||||
int yylex_destroy (void );
|
||||
|
||||
int yyget_debug (void );
|
||||
|
||||
void yyset_debug (int debug_flag );
|
||||
|
||||
YY_EXTRA_TYPE yyget_extra (void );
|
||||
|
||||
void yyset_extra (YY_EXTRA_TYPE user_defined );
|
||||
|
||||
FILE *yyget_in (void );
|
||||
|
||||
void yyset_in (FILE * in_str );
|
||||
|
||||
FILE *yyget_out (void );
|
||||
|
||||
void yyset_out (FILE * out_str );
|
||||
|
||||
int yyget_leng (void );
|
||||
|
||||
char *yyget_text (void );
|
||||
|
||||
int yyget_lineno (void );
|
||||
|
||||
void yyset_lineno (int line_number );
|
||||
|
||||
/* Macros after this point can all be overridden by user definitions in
|
||||
* section 1.
|
||||
*/
|
||||
|
|
@ -1483,7 +1459,7 @@ static int input (void );
|
|||
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||
* we now use fwrite().
|
||||
*/
|
||||
#define ECHO fwrite( yytext, yyleng, 1, yyout )
|
||||
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
|
||||
#endif
|
||||
|
||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
||||
|
|
@ -1494,7 +1470,7 @@ static int input (void );
|
|||
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
||||
{ \
|
||||
int c = '*'; \
|
||||
unsigned n; \
|
||||
size_t n; \
|
||||
for ( n = 0; n < max_size && \
|
||||
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
||||
buf[n] = (char) c; \
|
||||
|
|
@ -1578,7 +1554,7 @@ YY_DECL
|
|||
|
||||
#line 120 "util/configlexer.lex"
|
||||
|
||||
#line 1581 "<stdout>"
|
||||
#line 1556 "<stdout>"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
|
|
@ -2336,7 +2312,7 @@ YY_RULE_SETUP
|
|||
#line 312 "util/configlexer.lex"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 2339 "<stdout>"
|
||||
#line 2314 "<stdout>"
|
||||
|
||||
case YY_END_OF_BUFFER:
|
||||
{
|
||||
|
|
@ -2565,7 +2541,7 @@ static int yy_get_next_buffer (void)
|
|||
|
||||
/* Read in more data. */
|
||||
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
|
||||
(yy_n_chars), (size_t) num_to_read );
|
||||
(yy_n_chars), num_to_read );
|
||||
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
||||
}
|
||||
|
|
@ -2589,14 +2565,6 @@ static int yy_get_next_buffer (void)
|
|||
else
|
||||
ret_val = EOB_ACT_CONTINUE_SCAN;
|
||||
|
||||
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
||||
/* Extend the array by 50%, plus the number we really need. */
|
||||
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
|
||||
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
||||
}
|
||||
|
||||
(yy_n_chars) += number_to_move;
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
|
||||
|
|
@ -2975,8 +2943,6 @@ static void yyensure_buffer_stack (void)
|
|||
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
|
||||
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
||||
);
|
||||
if ( ! (yy_buffer_stack) )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
||||
|
||||
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
||||
|
||||
|
|
@ -2995,8 +2961,6 @@ static void yyensure_buffer_stack (void)
|
|||
((yy_buffer_stack),
|
||||
num_to_alloc * sizeof(struct yy_buffer_state*)
|
||||
);
|
||||
if ( ! (yy_buffer_stack) )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
||||
|
||||
/* zero only the new slots.*/
|
||||
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
|
||||
|
|
@ -3041,7 +3005,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
|||
|
||||
/** Setup the input buffer state to scan a string. The next call to yylex() will
|
||||
* scan from a @e copy of @a str.
|
||||
* @param yystr a NUL-terminated string to scan
|
||||
* @param str a NUL-terminated string to scan
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
* @note If you want to scan bytes that may contain NUL values, then use
|
||||
|
|
|
|||
Loading…
Reference in a new issue