Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Faustin Lammler
mariadb-10.1
Commits
bbbf51f8
Commit
bbbf51f8
authored
Jun 19, 2015
by
Otto Kekäläinen
Browse files
Imported Upstream version 10.0.20
parent
9e48a920
Changes
410
Hide whitespace changes
Inline
Side-by-side
.gitattributes
View file @
bbbf51f8
...
...
@@ -12,12 +12,16 @@
# These files should be checked out as is
*.result -text -whitespace
*.dat -text -whitespace
storage/connect/mysql-test/connect/std_data/*.txt -text
storage/connect/mysql-test/connect/std_data/*.dat -text
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.frm binary
*.MYD binary
*.MYI binary
*.c diff=cpp
*.h diff=cpp
...
...
.gitignore
View file @
bbbf51f8
...
...
@@ -175,7 +175,6 @@ storage/tokudb/ft-index/ft/log_print.cc
storage/tokudb/ft-index/ft/logformat
storage/tokudb/ft-index/ft/ftverify
storage/tokudb/ft-index/ft/tdb-recover
storage/tokudb/ft-index/ft/tdb_logprint
storage/tokudb/ft-index/ft/tokuftdump
storage/tokudb/ft-index/portability/merge_archives_tokuportability_static.cmake
storage/tokudb/ft-index/portability/toku_config.h
...
...
@@ -186,11 +185,11 @@ storage/tokudb/ft-index/toku_include/toku_config.h
storage/tokudb/ft-index/tools/ba_replay
storage/tokudb/ft-index/tools/ftverify
storage/tokudb/ft-index/tools/tdb-recover
storage/tokudb/ft-index/tools/tdb_logprint
storage/tokudb/ft-index/tools/tokudb_dump
storage/tokudb/ft-index/tools/tokudb_gen
storage/tokudb/ft-index/tools/tokudb_load
storage/tokudb/ft-index/tools/tokuftdump
storage/tokudb/ft-index/tools/tokuft_logprint
storage/tokudb/ft-index/xz/
support-files/MySQL-shared-compat.spec
support-files/binary-configure
...
...
@@ -234,6 +233,9 @@ storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
*.ko
*.obj
*.elf
*.exp
*.dep
*.idb
# Precompiled Headers
*.gch
...
...
Docs/INFO_SRC
View file @
bbbf51f8
commit:
0880284bf715b4916cc735e19b76d1062c2bfdcf
date: 2015-0
5-08 17:06:35
+0
3
00
build-date: 2015-0
5-08 16:37:53
+0200
short:
0880284
commit:
a6087e7dc1ef3561d8189c8db15e9591d0f9b520
date: 2015-0
6-17 16:13:02
+0
2
00
build-date: 2015-0
6-17 16:54:14
+0200
short:
a6087e7
branch: HEAD
MySQL source 10.0.
19
MySQL source 10.0.
20
VERSION
View file @
bbbf51f8
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=0
MYSQL_VERSION_PATCH=
19
MYSQL_VERSION_PATCH=
20
client/mysqlcheck.c
View file @
bbbf51f8
...
...
@@ -54,6 +54,7 @@ static char *opt_plugin_dir= 0, *opt_default_auth= 0;
static
int
first_error
=
0
;
static
char
*
opt_skip_database
;
DYNAMIC_ARRAY
tables4repair
,
tables4rebuild
,
alter_table_cmds
;
DYNAMIC_ARRAY
views4repair
;
static
char
*
shared_memory_base_name
=
0
;
static
uint
opt_protocol
=
0
;
...
...
@@ -877,11 +878,19 @@ static int handle_request_for_tables(char *tables, size_t length, my_bool view)
switch
(
what_to_do
)
{
case
DO_CHECK
:
op
=
"CHECK"
;
if
(
opt_quick
)
end
=
strmov
(
end
,
" QUICK"
);
if
(
opt_fast
)
end
=
strmov
(
end
,
" FAST"
);
if
(
opt_medium_check
)
end
=
strmov
(
end
,
" MEDIUM"
);
/* Default */
if
(
opt_extended
)
end
=
strmov
(
end
,
" EXTENDED"
);
if
(
opt_check_only_changed
)
end
=
strmov
(
end
,
" CHANGED"
);
if
(
view
)
{
if
(
opt_fast
||
opt_check_only_changed
)
DBUG_RETURN
(
0
);
}
else
{
if
(
opt_quick
)
end
=
strmov
(
end
,
" QUICK"
);
if
(
opt_fast
)
end
=
strmov
(
end
,
" FAST"
);
if
(
opt_extended
)
end
=
strmov
(
end
,
" EXTENDED"
);
if
(
opt_medium_check
)
end
=
strmov
(
end
,
" MEDIUM"
);
/* Default */
if
(
opt_check_only_changed
)
end
=
strmov
(
end
,
" CHANGED"
);
}
if
(
opt_upgrade
)
end
=
strmov
(
end
,
" FOR UPGRADE"
);
break
;
case
DO_REPAIR
:
...
...
@@ -966,6 +975,7 @@ static void print_result()
uint
length_of_db
;
uint
i
;
my_bool
found_error
=
0
,
table_rebuild
=
0
;
DYNAMIC_ARRAY
*
array4repair
=
&
tables4repair
;
DBUG_ENTER
(
"print_result"
);
res
=
mysql_use_result
(
sock
);
...
...
@@ -1002,9 +1012,10 @@ static void print_result()
else
{
char
*
table_name
=
prev
+
(
length_of_db
+
1
);
insert_dynamic
(
&
tables
4repair
,
table_name
);
insert_dynamic
(
array
4repair
,
table_name
);
}
}
array4repair
=
&
tables4repair
;
found_error
=
0
;
table_rebuild
=
0
;
prev_alter
[
0
]
=
0
;
...
...
@@ -1020,8 +1031,11 @@ static void print_result()
we have to run upgrade on it. In this case we write a nicer message
than "Please do "REPAIR TABLE""...
*/
if
(
!
strcmp
(
row
[
2
],
"error"
)
&&
strstr
(
row
[
3
],
"REPAIR TABLE"
))
if
(
!
strcmp
(
row
[
2
],
"error"
)
&&
strstr
(
row
[
3
],
"REPAIR "
))
{
printf
(
"%-50s %s"
,
row
[
0
],
"Needs upgrade"
);
array4repair
=
strstr
(
row
[
3
],
"VIEW"
)
?
&
views4repair
:
&
tables4repair
;
}
else
printf
(
"%s
\n
%-9s: %s"
,
row
[
0
],
row
[
2
],
row
[
3
]);
if
(
opt_auto_repair
&&
strcmp
(
row
[
2
],
"note"
))
...
...
@@ -1052,7 +1066,7 @@ static void print_result()
else
{
char
*
table_name
=
prev
+
(
length_of_db
+
1
);
insert_dynamic
(
&
tables
4repair
,
table_name
);
insert_dynamic
(
array
4repair
,
table_name
);
}
}
mysql_free_result
(
res
);
...
...
@@ -1172,6 +1186,8 @@ int main(int argc, char **argv)
if
(
opt_auto_repair
&&
(
my_init_dynamic_array
(
&
tables4repair
,
sizeof
(
char
)
*
(
NAME_LEN
*
2
+
2
),
16
,
64
,
MYF
(
0
))
||
my_init_dynamic_array
(
&
views4repair
,
sizeof
(
char
)
*
(
NAME_LEN
*
2
+
2
),
16
,
64
,
MYF
(
0
))
||
my_init_dynamic_array
(
&
tables4rebuild
,
sizeof
(
char
)
*
(
NAME_LEN
*
2
+
2
),
16
,
64
,
MYF
(
0
))
||
my_init_dynamic_array
(
&
alter_table_cmds
,
MAX_ALTER_STR_SIZE
,
0
,
1
,
...
...
@@ -1202,6 +1218,13 @@ int main(int argc, char **argv)
rebuild_table
((
char
*
)
dynamic_array_ptr
(
&
tables4rebuild
,
i
));
for
(
i
=
0
;
i
<
alter_table_cmds
.
elements
;
i
++
)
run_query
((
char
*
)
dynamic_array_ptr
(
&
alter_table_cmds
,
i
),
1
);
if
(
!
opt_silent
&&
views4repair
.
elements
)
puts
(
"
\n
Repairing views"
);
for
(
i
=
0
;
i
<
views4repair
.
elements
;
i
++
)
{
char
*
name
=
(
char
*
)
dynamic_array_ptr
(
&
views4repair
,
i
);
handle_request_for_tables
(
name
,
fixed_name_length
(
name
),
TRUE
);
}
}
ret
=
MY_TEST
(
first_error
);
...
...
@@ -1209,8 +1232,10 @@ int main(int argc, char **argv)
dbDisconnect
(
current_host
);
if
(
opt_auto_repair
)
{
delete_dynamic
(
&
views4repair
);
delete_dynamic
(
&
tables4repair
);
delete_dynamic
(
&
tables4rebuild
);
delete_dynamic
(
&
alter_table_cmds
);
}
end1:
my_free
(
opt_password
);
...
...
client/mysqldump.c
View file @
bbbf51f8
...
...
@@ -97,7 +97,7 @@ static ulong find_set(TYPELIB *lib, const char *x, uint length,
static
char
*
alloc_query_str
(
ulong
size
);
static
void
field_escape
(
DYNAMIC_STRING
*
in
,
const
char
*
from
);
static
my_bool
verbose
=
0
,
opt_no_create_info
=
0
,
opt_no_data
=
0
,
static
my_bool
verbose
=
0
,
opt_no_create_info
=
0
,
opt_no_data
=
0
,
opt_no_data_med
=
1
,
quick
=
1
,
extended_insert
=
1
,
lock_tables
=
1
,
ignore_errors
=
0
,
flush_logs
=
0
,
flush_privileges
=
0
,
opt_drop
=
1
,
opt_keywords
=
0
,
opt_lock
=
1
,
opt_compress
=
0
,
...
...
@@ -203,6 +203,8 @@ const char *compatible_mode_names[]=
TYPELIB
compatible_mode_typelib
=
{
array_elements
(
compatible_mode_names
)
-
1
,
""
,
compatible_mode_names
,
NULL
};
#define MED_ENGINES "MRG_MyISAM, MRG_ISAM, CONNECT, OQGRAPH, SPIDER, VP, FEDERATED"
HASH
ignore_table
;
static
struct
my_option
my_long_options
[]
=
...
...
@@ -429,6 +431,9 @@ static struct my_option my_long_options[] =
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"no-data"
,
'd'
,
"No row information."
,
&
opt_no_data
,
&
opt_no_data
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"no-data-med"
,
0
,
"No row information for engines that "
"Manage External Data ("
MED_ENGINES
")."
,
&
opt_no_data_med
,
&
opt_no_data_med
,
0
,
GET_BOOL
,
NO_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
{
"no-set-names"
,
'N'
,
"Same as --skip-set-charset."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"opt"
,
OPT_OPTIMIZE
,
...
...
@@ -5406,12 +5411,12 @@ char check_if_ignore_table(const char *table_name, char *table_type)
/*
If these two types, we do want to skip dumping the table
*/
if
(
!
opt_no_data
&&
(
!
my_strcasecmp
(
&
my_charset_latin1
,
table_type
,
"MRG_MyISAM"
)
||
!
strcmp
(
table_type
,
"MRG_ISAM"
)
||
!
strcmp
(
table_type
,
"CONNECT"
)
||
!
strcmp
(
table_type
,
"FEDERATED"
)))
result
=
IGNORE_DATA
;
if
(
!
opt_no_data
&&
opt_no_data_med
)
{
const
char
*
found
=
strstr
(
" "
MED_ENGINES
","
,
table_type
);
if
(
found
&&
found
[
-
1
]
==
' '
&&
found
[
strlen
(
table_type
)]
==
','
)
result
=
IGNORE_DATA
;
}
}
mysql_free_result
(
res
);
DBUG_RETURN
(
result
);
...
...
client/mysqltest.cc
View file @
bbbf51f8
...
...
@@ -839,6 +839,7 @@ static void handle_no_active_connection(struct st_command* command,
#define EMB_END_CONNECTION 3
#define EMB_PREPARE_STMT 4
#define EMB_EXECUTE_STMT 5
#define EMB_CLOSE_STMT 6
/* workaround for MySQL BUG#57491 */
#undef MY_WME
...
...
@@ -887,6 +888,9 @@ pthread_handler_t connection_thread(void *arg)
case
EMB_EXECUTE_STMT
:
cn
->
result
=
mysql_stmt_execute
(
cn
->
stmt
);
break
;
case
EMB_CLOSE_STMT
:
cn
->
result
=
mysql_stmt_close
(
cn
->
stmt
);
break
;
default:
DBUG_ASSERT
(
0
);
}
...
...
@@ -984,6 +988,17 @@ static int do_stmt_execute(struct st_connection *cn)
}
static
int
do_stmt_close
(
struct
st_connection
*
cn
)
{
/* The cn->stmt is already set. */
if
(
!
cn
->
has_thread
)
return
mysql_stmt_close
(
cn
->
stmt
);
signal_connection_thd
(
cn
,
EMB_CLOSE_STMT
);
wait_query_thread_done
(
cn
);
return
cn
->
result
;
}
static
void
emb_close_connection
(
struct
st_connection
*
cn
)
{
if
(
!
cn
->
has_thread
)
...
...
@@ -1019,6 +1034,7 @@ static void init_connection_thd(struct st_connection *cn)
#define do_read_query_result(cn) mysql_read_query_result(cn->mysql)
#define do_stmt_prepare(cn, q, q_len) mysql_stmt_prepare(cn->stmt, q, q_len)
#define do_stmt_execute(cn) mysql_stmt_execute(cn->stmt)
#define do_stmt_close(cn) mysql_stmt_close(cn->stmt)
#endif
/*EMBEDDED_LIBRARY*/
...
...
@@ -1378,11 +1394,11 @@ void close_connections()
DBUG_ENTER
(
"close_connections"
);
for
(
--
next_con
;
next_con
>=
connections
;
--
next_con
)
{
if
(
next_con
->
stmt
)
do_stmt_close
(
next_con
);
#ifdef EMBEDDED_LIBRARY
emb_close_connection
(
next_con
);
#endif
if
(
next_con
->
stmt
)
mysql_stmt_close
(
next_con
->
stmt
);
next_con
->
stmt
=
0
;
mysql_close
(
next_con
->
mysql
);
next_con
->
mysql
=
0
;
...
...
@@ -5635,7 +5651,11 @@ void do_close_connection(struct st_command *command)
con
->
mysql
->
net
.
vio
=
0
;
}
}
#else
#endif
/*!EMBEDDED_LIBRARY*/
if
(
con
->
stmt
)
do_stmt_close
(
con
);
con
->
stmt
=
0
;
#ifdef EMBEDDED_LIBRARY
/*
As query could be still executed in a separate theread
we need to check if the query's thread was finished and probably wait
...
...
@@ -5643,9 +5663,6 @@ void do_close_connection(struct st_command *command)
*/
emb_close_connection
(
con
);
#endif
/*EMBEDDED_LIBRARY*/
if
(
con
->
stmt
)
mysql_stmt_close
(
con
->
stmt
);
con
->
stmt
=
0
;
mysql_close
(
con
->
mysql
);
con
->
mysql
=
0
;
...
...
cmake/abi_check.cmake
View file @
bbbf51f8
...
...
@@ -28,7 +28,7 @@ ELSE()
SET
(
RUN_ABI_CHECK 0
)
ENDIF
()
IF
(
CMAKE_COMPILER_I
S_GNUCC
AND RUN_ABI_CHECK
)
IF
(
CMAKE_
C_
COMPILER_I
D MATCHES
"GNU|Clang"
AND RUN_ABI_CHECK
)
IF
(
CMAKE_C_COMPILER MATCHES
"ccache$"
)
SET
(
COMPILER
${
CMAKE_C_COMPILER_ARG1
}
)
STRING
(
REGEX REPLACE
"^ "
""
COMPILER
${
COMPILER
}
)
...
...
cmake/cpack_rpm.cmake
View file @
bbbf51f8
...
...
@@ -21,11 +21,12 @@ SET(CPACK_COMPONENT_MANPAGESCLIENT_GROUP "client")
SET
(
CPACK_COMPONENT_README_GROUP
"server"
)
SET
(
CPACK_COMPONENT_SHAREDLIBRARIES_GROUP
"shared"
)
SET
(
CPACK_COMPONENT_COMMON_GROUP
"common"
)
SET
(
CPACK_COMPONENT_CLIENTPLUGINS_GROUP
"common"
)
SET
(
CPACK_COMPONENT_COMPAT_GROUP
"compat"
)
SET
(
CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts
SupportFiles Development ManPagesDevelopment
ManPagesTest Readme ManPagesClient Test
Common Client SharedLibraries
)
Common Client SharedLibraries
ClientPlugins
)
SET
(
CPACK_RPM_PACKAGE_NAME
"MariaDB"
)
SET
(
CPACK_PACKAGE_FILE_NAME
"
${
CPACK_RPM_PACKAGE_NAME
}
-
${
VERSION
}
-
${
RPM
}
-
${
CMAKE_SYSTEM_PROCESSOR
}
"
)
...
...
cmake/do_abi_check.cmake
View file @
bbbf51f8
...
...
@@ -58,7 +58,7 @@ FOREACH(file ${ABI_HEADERS})
EXECUTE_PROCESS
(
COMMAND
${
COMPILER
}
-E -nostdinc
-dI
-DMYSQL_ABI_CHECK -I
${
SOURCE_DIR
}
/include
-E -nostdinc -DMYSQL_ABI_CHECK -I
${
SOURCE_DIR
}
/include
-I
${
BINARY_DIR
}
/include -I
${
SOURCE_DIR
}
/include/mysql -I
${
SOURCE_DIR
}
/sql
${
file
}
ERROR_QUIET OUTPUT_FILE
${
tmpfile
}
)
...
...
cmake/libutils.cmake
View file @
bbbf51f8
...
...
@@ -308,17 +308,15 @@ INCLUDE(CheckCCompilerFlag)
SET
(
VISIBILITY_HIDDEN_FLAG
)
IF
(
CMAKE_COMPILER_IS_GNUCXX AND UNIX
)
IF
(
CMAKE_C_COMPILER_ID MATCHES
"SunPro"
)
SET
(
VISIBILITY_HIDDEN_FLAG
"-xldscope=hidden"
)
ELSEIF
(
UNIX
)
CHECK_C_COMPILER_FLAG
(
"-fvisibility=hidden"
HAVE_VISIBILITY_HIDDEN
)
IF
(
HAVE_VISIBILITY_HIDDEN
)
SET
(
VISIBILITY_HIDDEN_FLAG
"-fvisibility=hidden"
)
ENDIF
()
ENDIF
()
IF
(
CMAKE_C_COMPILER_ID MATCHES
"SunPro"
)
SET
(
VISIBILITY_HIDDEN_FLAG
"-xldscope=hidden"
)
ENDIF
()
# We try to hide the symbols in yassl/zlib to avoid name clashes with
# other libraries like openssl.
FUNCTION
(
RESTRICT_SYMBOL_EXPORTS target
)
...
...
cmake/maintainer.cmake
View file @
bbbf51f8
...
...
@@ -41,11 +41,11 @@ IF(MYSQL_MAINTAINER_MODE MATCHES "ERR")
ENDIF
()
# Set warning flags for GCC/Clang
IF
(
CMAKE_COMPILER_IS_GNUCC OR
CMAKE_C_COMPILER_ID MATCHES
"Clang"
)
IF
(
CMAKE_C_COMPILER_ID MATCHES
"
GNU|
Clang"
)
SET
(
MY_MAINTAINER_C_WARNINGS
"
${
MY_C_WARNING_FLAGS
}
"
)
ENDIF
()
# Set warning flags for G++/Clang++
IF
(
CMAKE_COMPILER_IS_GNUCXX OR
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
IF
(
CMAKE_CXX_COMPILER_ID MATCHES
"
GNU|
Clang"
)
SET
(
MY_MAINTAINER_CXX_WARNINGS
"
${
MY_CXX_WARNING_FLAGS
}
"
)
ENDIF
()
...
...
cmake/make_dist.cmake.in
View file @
bbbf51f8
# Copyright (c) 2009, 201
2
, Oracle and/or its affiliates.
All rights reserved.
# Copyright (c) 2009, 201
5
, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -60,9 +60,9 @@ IF(NOT GIT_EXECUTABLE)
# Save bison output first.
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
${CMAKE_BINARY_DIR}/sql_yacc.cc COPY
_
ONLY)
${CMAKE_BINARY_DIR}/sql_yacc.cc COPYONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h
${CMAKE_BINARY_DIR}/sql_yacc.h COPY
_
ONLY)
${CMAKE_BINARY_DIR}/sql_yacc.h COPYONLY)
IF(CMAKE_GENERATOR MATCHES "Makefiles")
# make clean
...
...
@@ -74,9 +74,9 @@ IF(NOT GIT_EXECUTABLE)
# Restore bison output
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.cc
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc COPY
_
ONLY)
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc COPYONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.h
${CMAKE_BINARY_DIR}/sql/sql_yacc.h COPY
_
ONLY)
${CMAKE_BINARY_DIR}/sql/sql_yacc.h COPYONLY)
FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.cc)
FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.h)
ENDIF()
...
...
cmake/os/WindowsCache.cmake
View file @
bbbf51f8
...
...
@@ -351,7 +351,6 @@ SET(C_HAS___inline 1 CACHE INTERNAL "")
SET
(
FIONREAD_IN_SYS_IOCTL CACHE INTERNAL
""
)
SET
(
FIONREAD_IN_SYS_FILIO CACHE INTERNAL
""
)
SET
(
GWINSZ_IN_SYS_IOCTL CACHE INTERNAL
""
)
SET
(
HAVE_CXXABI_H CACHE INTERNAL
""
)
SET
(
HAVE_NDIR_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_NDIR_H CACHE INTERNAL
""
)
SET
(
HAVE_SYS_NDIR_H CACHE INTERNAL
""
)
...
...
@@ -371,4 +370,8 @@ SET(HAVE_PTHREAD_ATTR_GETGUARDSIZE CACHE INTERNAL "")
SET
(
HAVE_UCONTEXT_H CACHE INTERNAL
""
)
SET
(
HAVE_SOCKPEERCRED CACHE INTERNAL
""
)
SET
(
HAVE_GGDB3 CACHE INTERNAL
""
)
SET
(
HAVE_ABI_CXA_DEMANGLE CACHE INTERNAL
""
)
SET
(
HAVE_GCC_ATOMIC_BUILTINS CACHE INTERNAL
""
)
SET
(
HAVE_GCC_C11_ATOMICS CACHE INTERNAL
""
)
SET
(
HAVE_VISIBILITY_HIDDEN CACHE INTERNAL
""
)
ENDIF
(
MSVC
)
cmd-line-utils/libedit/el_terminal.h
View file @
bbbf51f8
/* $NetBSD: terminal.h,v 1.3 2011/07/29 23:44:45 christos Exp $ */
/*-
* Copyright (c) 1992,
1993
* Copyright (c) 1992,
2015
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
...
...
@@ -103,7 +103,7 @@ protected int terminal_settc(EditLine *, int, const Char **);
protected
int
terminal_gettc
(
EditLine
*
,
int
,
char
**
);
protected
int
terminal_telltc
(
EditLine
*
,
int
,
const
Char
**
);
protected
int
terminal_echotc
(
EditLine
*
,
int
,
const
Char
**
);
protected
void
terminal_writec
(
EditLine
*
,
Int
);
protected
int
terminal_writec
(
EditLine
*
,
Int
);
protected
int
terminal__putc
(
EditLine
*
,
Int
);
protected
void
terminal__flush
(
EditLine
*
);
...
...
cmd-line-utils/libedit/emacs.c
View file @
bbbf51f8
/* $NetBSD: emacs.c,v 1.25 2011/07/29 15:16:33 christos Exp $ */
/*-
* Copyright (c) 1992,
1993
* Copyright (c) 1992,
2015
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
...
...
@@ -58,8 +58,10 @@ em_delete_or_list(EditLine *el, Int c)
/* if I'm at the end */
if
(
el
->
el_line
.
cursor
==
el
->
el_line
.
buffer
)
{
/* and the beginning */
terminal_writec
(
el
,
c
);
/* then do an EOF */
return
CC_EOF
;
if
(
!
(
terminal_writec
(
el
,
c
)))
/* then do an EOF */
return
CC_EOF
;
else
return
CC_ERROR
;
}
else
{
/*
* Here we could list completions, but it is an
...
...
cmd-line-utils/libedit/terminal.c
View file @
bbbf51f8
/* $NetBSD: terminal.c,v 1.10 2011/10/04 15:27:04 christos Exp $ */
/*-
* Copyright (c) 1992,
1993
* Copyright (c) 1992,
2015
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
...
...
@@ -1271,14 +1271,19 @@ terminal__flush(EditLine *el)
/* terminal_writec():
* Write the given character out, in a human readable form
*/
protected
void
protected
int
terminal_writec
(
EditLine
*
el
,
Int
c
)
{
Char
visbuf
[
VISUAL_WIDTH_MAX
+
1
];
ssize_t
vcnt
=
ct_visual_char
(
visbuf
,
VISUAL_WIDTH_MAX
,
c
);
visbuf
[
vcnt
]
=
'\0'
;
terminal_overwrite
(
el
,
visbuf
,
(
size_t
)
vcnt
);
terminal__flush
(
el
);
if
(
vcnt
==
-
1
)
return
1
;
/* Error due to insufficient space */
else
{
visbuf
[
vcnt
]
=
'\0'
;
terminal_overwrite
(
el
,
visbuf
,
(
size_t
)
vcnt
);
terminal__flush
(
el
);
return
0
;
}
}
...
...
cmd-line-utils/libedit/vi.c
View file @
bbbf51f8
/* $NetBSD: vi.c,v 1.41 2011/10/04 15:27:04 christos Exp $ */
/*-
* Copyright (c) 1992,
1993
* Copyright (c) 1992,
2015
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
...
...
@@ -607,8 +607,10 @@ vi_list_or_eof(EditLine *el, Int c)
if
(
el
->
el_line
.
cursor
==
el
->
el_line
.
lastchar
)
{
if
(
el
->
el_line
.
cursor
==
el
->
el_line
.
buffer
)
{
terminal_writec
(
el
,
c
);
/* then do a EOF */
return
CC_EOF
;
if
(
!
(
terminal_writec
(
el
,
c
)))
/* then do a EOF */
return
CC_EOF
;
else
return
CC_ERROR
;
}
else
{
/*
* Here we could list completions, but it is an
...
...
config.h.cmake
View file @
bbbf51f8
...
...
@@ -27,7 +27,6 @@
#cmakedefine HAVE_BSEARCH 1
#cmakedefine HAVE_CRYPT_H 1
#cmakedefine HAVE_CURSES_H 1
#cmakedefine HAVE_CXXABI_H 1
#cmakedefine HAVE_BFD_H 1
#cmakedefine HAVE_NCURSES_H 1
#cmakedefine HAVE_NDIR_H 1
...
...
@@ -202,7 +201,7 @@
#cmakedefine HAVE_MADVISE 1
#cmakedefine HAVE_DECL_MADVISE 1
#cmakedefine HAVE_DECL_TGOTO 1
#cmakedefine HAVE_DECL_MHA_MAPSIZE_VA
#cmakedefine HAVE_DECL_MHA_MAPSIZE_VA
1
#cmakedefine HAVE_MALLINFO 1
#cmakedefine HAVE_MEMCPY 1
#cmakedefine HAVE_MEMMOVE 1
...
...
@@ -395,7 +394,7 @@
#cmakedefine SOCKET_SIZE_TYPE @SOCKET_SIZE_TYPE@
#cmakedefine HAVE_MBSTATE_T
#cmakedefine HAVE_MBSTATE_T
1
#define MAX_INDEXES 64
...
...
@@ -430,15 +429,15 @@
#cmakedefine HAVE_WCTYPE_H 1
#cmakedefine HAVE_WCHAR_H 1
#cmakedefine HAVE_LANGINFO_H 1
#cmakedefine HAVE_MBRLEN
#cmakedefine HAVE_MBSCMP
#cmakedefine HAVE_MBSRTOWCS
#cmakedefine HAVE_WCRTOMB
#cmakedefine HAVE_MBRTOWC
#cmakedefine HAVE_WCSCOLL
#cmakedefine HAVE_WCSDUP
#cmakedefine HAVE_WCWIDTH
#cmakedefine HAVE_WCTYPE
#cmakedefine HAVE_MBRLEN
1
#cmakedefine HAVE_MBSCMP
1
#cmakedefine HAVE_MBSRTOWCS
1
#cmakedefine HAVE_WCRTOMB
1
#cmakedefine HAVE_MBRTOWC
1
#cmakedefine HAVE_WCSCOLL
1
#cmakedefine HAVE_WCSDUP
1
#cmakedefine HAVE_WCWIDTH
1
#cmakedefine HAVE_WCTYPE
1
#cmakedefine HAVE_ISWLOWER 1
#cmakedefine HAVE_ISWUPPER 1
#cmakedefine HAVE_TOWLOWER 1
...
...
@@ -452,7 +451,7 @@
#cmakedefine HAVE_STRCASECMP 1
#cmakedefine HAVE_STRNCASECMP 1
#cmakedefine HAVE_STRDUP 1
#cmakedefine HAVE_LANGINFO_CODESET
#cmakedefine HAVE_LANGINFO_CODESET
1
#cmakedefine HAVE_TCGETATTR 1
#cmakedefine HAVE_FLOCKFILE 1
...
...
@@ -471,6 +470,7 @@
#cmakedefine MY_ATOMIC_MODE_DUMMY 1
#cmakedefine MY_ATOMIC_MODE_RWLOCKS 1
#cmakedefine HAVE_GCC_ATOMIC_BUILTINS 1
#cmakedefine HAVE_GCC_C11_ATOMICS 1
#cmakedefine HAVE_SOLARIS_ATOMIC 1
#cmakedefine HAVE_DECL_SHM_HUGETLB 1
#cmakedefine HAVE_LARGE_PAGES 1
...
...
configure.cmake
View file @
bbbf51f8
...
...
@@ -52,7 +52,7 @@ IF(NOT SYSTEM_TYPE)
ENDIF
()
ENDIF
()
IF
(
CMAKE_COMPILER_I
S_GNUCXX
)
IF
(
CMAKE_
CXX_
COMPILER_I
D MATCHES
"GNU|Clang"
)
# MySQL "canonical" GCC flags. At least -fno-rtti flag affects
# ABI and cannot be simply removed.
SET
(
CMAKE_CXX_FLAGS
...
...
@@ -175,7 +175,6 @@ CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H)
CHECK_INCLUDE_FILES
(
aio.h HAVE_AIO_H
)
CHECK_INCLUDE_FILES
(
arpa/inet.h HAVE_ARPA_INET_H
)
CHECK_INCLUDE_FILES
(
crypt.h HAVE_CRYPT_H
)
CHECK_INCLUDE_FILE_CXX
(
cxxabi.h HAVE_CXXABI_H
)
CHECK_INCLUDE_FILES
(
bfd.h BFD_H_EXISTS
)
CHECK_INCLUDE_FILES
(
dirent.h HAVE_DIRENT_H
)
CHECK_INCLUDE_FILES
(
dlfcn.h HAVE_DLFCN_H
)
...
...
@@ -874,7 +873,7 @@ ENDIF(NOT HAVE_POSIX_SIGNALS)
# Assume regular sprintf
SET
(
SPRINTFS_RETURNS_INT 1
)
IF
(
CMAKE_COMPILER_I
S_GNUCXX AND HAVE_CXXABI_H
)
IF
(
CMAKE_
CXX_
COMPILER_I
D MATCHES
"GNU|Clang"
)
CHECK_CXX_SOURCE_COMPILES
(
"
#include <cxxabi.h>
int main(int argc, char **argv)
...
...
@@ -946,7 +945,6 @@ SET(SIGNAL_WITH_VIO_CLOSE 1)
MARK_AS_ADVANCED
(
NO_ALARM
)
IF
(
CMAKE_COMPILER_IS_GNUCXX
)
IF
(
WITH_ATOMIC_OPS STREQUAL
"up"
)
SET
(
MY_ATOMIC_MODE_DUMMY 1 CACHE BOOL
"Assume single-CPU mode, no concurrency"
)
ELSEIF
(
WITH_ATOMIC_OPS STREQUAL
"rwlocks"
)
...
...
@@ -977,10 +975,17 @@ ELSEIF(NOT WITH_ATOMIC_OPS)
return 0;
}"
HAVE_GCC_ATOMIC_BUILTINS
)
CHECK_CXX_SOURCE_COMPILES
(
"
int main()
{
long long int var= 1;
long long int *ptr= &var;
return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
}"
HAVE_GCC_C11_ATOMICS
)
ELSE
()
MESSAGE
(
FATAL_ERROR
"
${
WITH_ATOMIC_OPS
}
is not a valid value for WITH_ATOMIC_OPS!"
)
ENDIF
()
ENDIF
()
SET
(
WITH_ATOMIC_OPS
"
${
WITH_ATOMIC_OPS
}
"
CACHE STRING
"Implement atomic operations using pthread rwlocks (rwlocks); or atomic CPU
...
...
Prev
1
2
3
4
5
…
21
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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