aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libssh/priv.h3
-rw-r--r--src/auth.c4
-rw-r--r--src/base64.c4
-rw-r--r--src/bignum.c2
-rw-r--r--src/buffer.c4
-rw-r--r--src/channels.c4
-rw-r--r--src/client.c4
-rw-r--r--src/connector.c2
-rw-r--r--src/error.c2
-rw-r--r--src/external/bcrypt_pbkdf.c2
-rw-r--r--src/external/fe25519.c2
-rw-r--r--src/external/ge25519.c2
-rw-r--r--src/external/sc25519.c2
-rw-r--r--src/match.c3
-rw-r--r--src/pki_crypto.c2
-rw-r--r--src/pki_ed25519.c2
-rw-r--r--src/sftp.c4
-rw-r--r--src/sftpserver.c4
-rw-r--r--src/socket.c4
-rw-r--r--src/string.c4
-rw-r--r--tests/client/torture_algorithms.c2
-rw-r--r--tests/client/torture_auth.c2
-rw-r--r--tests/client/torture_connect.c2
-rw-r--r--tests/client/torture_forward.c2
-rw-r--r--tests/client/torture_knownhosts.c2
-rw-r--r--tests/client/torture_proxycommand.c2
-rw-r--r--tests/client/torture_request_env.c2
-rw-r--r--tests/client/torture_session.c2
-rw-r--r--tests/client/torture_sftp_dir.c2
-rw-r--r--tests/client/torture_sftp_ext.c2
-rw-r--r--tests/client/torture_sftp_fsync.c2
-rw-r--r--tests/client/torture_sftp_read.c2
-rw-r--r--tests/pkd/pkd_hello.c2
-rw-r--r--tests/unittests/torture_buffer.c2
-rw-r--r--tests/unittests/torture_callbacks.c2
-rw-r--r--tests/unittests/torture_channel.c2
-rw-r--r--tests/unittests/torture_config.c2
-rw-r--r--tests/unittests/torture_crypto.c2
-rw-r--r--tests/unittests/torture_init.c2
-rw-r--r--tests/unittests/torture_isipaddr.c2
-rw-r--r--tests/unittests/torture_keyfiles.c2
-rw-r--r--tests/unittests/torture_list.c2
-rw-r--r--tests/unittests/torture_misc.c1
-rw-r--r--tests/unittests/torture_options.c2
-rw-r--r--tests/unittests/torture_pki.c2
-rw-r--r--tests/unittests/torture_pki_ed25519.c2
-rw-r--r--tests/unittests/torture_rand.c2
47 files changed, 92 insertions, 21 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 8e6a8e62..c2d20b2d 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -29,7 +29,8 @@
#ifndef _LIBSSH_PRIV_H
#define _LIBSSH_PRIV_H
-#include "config.h"
+#include <stdlib.h>
+#include <string.h>
#if !defined(HAVE_STRTOULL)
# if defined(HAVE___STRTOULL)
diff --git a/src/auth.c b/src/auth.c
index 1baec109..59b6f134 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -22,9 +22,9 @@
* MA 02111-1307, USA.
*/
-#include <stdlib.h>
+#include "config.h"
+
#include <stdio.h>
-#include <string.h>
#ifndef _WIN32
#include <netinet/in.h>
diff --git a/src/base64.c b/src/base64.c
index 2a162d0b..2bb33ee6 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -22,9 +22,9 @@
*/
/* just the dirtiest part of code i ever made */
-#include <string.h>
+#include "config.h"
+
#include <stdio.h>
-#include <stdlib.h>
#include "libssh/priv.h"
#include "libssh/buffer.h"
diff --git a/src/bignum.c b/src/bignum.c
index fd6cf954..346a08a8 100644
--- a/src/bignum.c
+++ b/src/bignum.c
@@ -19,6 +19,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#include <stdio.h>
#include "libssh/priv.h"
diff --git a/src/buffer.c b/src/buffer.c
index 2da6758a..96250e90 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -21,9 +21,9 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
#include <stdarg.h>
#ifndef _WIN32
diff --git a/src/channels.c b/src/channels.c
index d32f0d7a..b74c4f3d 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -22,9 +22,9 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#include <limits.h>
-#include <string.h>
-#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
diff --git a/src/client.c b/src/client.c
index 11a00229..6343dc6a 100644
--- a/src/client.c
+++ b/src/client.c
@@ -21,9 +21,9 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#ifndef _WIN32
#include <netinet/in.h>
diff --git a/src/connector.c b/src/connector.c
index 54e85241..6f15ee28 100644
--- a/src/connector.c
+++ b/src/connector.c
@@ -19,6 +19,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#include "libssh/priv.h"
#include "libssh/poll.h"
#include "libssh/callbacks.h"
diff --git a/src/error.c b/src/error.c
index bd755c4f..f1ba945b 100644
--- a/src/error.c
+++ b/src/error.c
@@ -21,6 +21,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#include <stdio.h>
#include <stdarg.h>
#include "libssh/priv.h"
diff --git a/src/external/bcrypt_pbkdf.c b/src/external/bcrypt_pbkdf.c
index 55868819..fdf84d0f 100644
--- a/src/external/bcrypt_pbkdf.c
+++ b/src/external/bcrypt_pbkdf.c
@@ -19,6 +19,8 @@
#ifndef HAVE_BCRYPT_PBKDF
+#include "config.h"
+
#include "libssh/priv.h"
#include "libssh/wrapper.h"
#include <stdlib.h>
diff --git a/src/external/fe25519.c b/src/external/fe25519.c
index db31f651..2b0b673e 100644
--- a/src/external/fe25519.c
+++ b/src/external/fe25519.c
@@ -4,6 +4,8 @@
* Copied from supercop-20130419/crypto_sign/ed25519/ref/fe25519.c
*/
+#include "config.h"
+
#define WINDOWSIZE 1 /* Should be 1,2, or 4 */
#define WINDOWMASK ((1<<WINDOWSIZE)-1)
diff --git a/src/external/ge25519.c b/src/external/ge25519.c
index b098cc5e..ffeb1d58 100644
--- a/src/external/ge25519.c
+++ b/src/external/ge25519.c
@@ -6,6 +6,8 @@
* Copied from supercop-20130419/crypto_sign/ed25519/ref/ge25519.c
*/
+#include "config.h"
+
#include "libssh/fe25519.h"
#include "libssh/sc25519.h"
#include "libssh/ge25519.h"
diff --git a/src/external/sc25519.c b/src/external/sc25519.c
index c7a02ee6..5f198d5b 100644
--- a/src/external/sc25519.c
+++ b/src/external/sc25519.c
@@ -4,6 +4,8 @@
* Copied from supercop-20130419/crypto_sign/ed25519/ref/sc25519.c
*/
+#include "config.h"
+
#include "libssh/priv.h"
#include "libssh/sc25519.h"
diff --git a/src/match.c b/src/match.c
index 36cc922a..c613a2e6 100644
--- a/src/match.c
+++ b/src/match.c
@@ -35,8 +35,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
+
#include <ctype.h>
-#include <string.h>
#include <sys/types.h>
#include "libssh/priv.h"
diff --git a/src/pki_crypto.c b/src/pki_crypto.c
index 70ac6854..53287f30 100644
--- a/src/pki_crypto.c
+++ b/src/pki_crypto.c
@@ -25,6 +25,8 @@
#ifndef _PKI_CRYPTO_H
#define _PKI_CRYPTO_H
+#include "config.h"
+
#include "libssh/priv.h"
#include <openssl/pem.h>
diff --git a/src/pki_ed25519.c b/src/pki_ed25519.c
index 393948ac..8ff398cb 100644
--- a/src/pki_ed25519.c
+++ b/src/pki_ed25519.c
@@ -21,6 +21,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#include "libssh/pki.h"
#include "libssh/pki_priv.h"
#include "libssh/ed25519.h"
diff --git a/src/sftp.c b/src/sftp.c
index 3b8e0985..3b017baf 100644
--- a/src/sftp.c
+++ b/src/sftp.c
@@ -24,12 +24,12 @@
/* This file contains code written by Nick Zitzmann */
+#include "config.h"
+
#include <errno.h>
#include <ctype.h>
#include <fcntl.h>
-#include <stdlib.h>
#include <stdio.h>
-#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/src/sftpserver.c b/src/sftpserver.c
index 659a688a..820e9668 100644
--- a/src/sftpserver.c
+++ b/src/sftpserver.c
@@ -21,8 +21,8 @@
* MA 02111-1307, USA.
*/
-#include <stdlib.h>
-#include <string.h>
+#include "config.h"
+
#include <stdio.h>
#ifndef _WIN32
diff --git a/src/socket.c b/src/socket.c
index 76dc55e5..95dedbb2 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -21,9 +21,9 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
#include <stdio.h>
#ifdef _WIN32
#include <winsock2.h>
diff --git a/src/string.c b/src/string.c
index ba112716..67bce7dc 100644
--- a/src/string.c
+++ b/src/string.c
@@ -21,10 +21,10 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#include <errno.h>
#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
#ifndef _WIN32
#include <netinet/in.h>
diff --git a/tests/client/torture_algorithms.c b/tests/client/torture_algorithms.c
index 81f3a328..8dd38904 100644
--- a/tests/client/torture_algorithms.c
+++ b/tests/client/torture_algorithms.c
@@ -19,6 +19,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/client/torture_auth.c b/tests/client/torture_auth.c
index 673ba467..754c66cc 100644
--- a/tests/client/torture_auth.c
+++ b/tests/client/torture_auth.c
@@ -19,6 +19,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/client/torture_connect.c b/tests/client/torture_connect.c
index 45e32b4c..0d445974 100644
--- a/tests/client/torture_connect.c
+++ b/tests/client/torture_connect.c
@@ -19,6 +19,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/client/torture_forward.c b/tests/client/torture_forward.c
index 170fd340..7a0f3d9a 100644
--- a/tests/client/torture_forward.c
+++ b/tests/client/torture_forward.c
@@ -19,6 +19,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/client/torture_knownhosts.c b/tests/client/torture_knownhosts.c
index 00aa8269..1702b467 100644
--- a/tests/client/torture_knownhosts.c
+++ b/tests/client/torture_knownhosts.c
@@ -19,6 +19,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/client/torture_proxycommand.c b/tests/client/torture_proxycommand.c
index 025fa8dc..2c9c8b9f 100644
--- a/tests/client/torture_proxycommand.c
+++ b/tests/client/torture_proxycommand.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/client/torture_request_env.c b/tests/client/torture_request_env.c
index a5664217..269116d3 100644
--- a/tests/client/torture_request_env.c
+++ b/tests/client/torture_request_env.c
@@ -19,6 +19,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/client/torture_session.c b/tests/client/torture_session.c
index 2962e464..3940bdc3 100644
--- a/tests/client/torture_session.c
+++ b/tests/client/torture_session.c
@@ -19,6 +19,8 @@
* MA 02111-1307, USA.
*/
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/client/torture_sftp_dir.c b/tests/client/torture_sftp_dir.c
index c4de2f60..80ca43a8 100644
--- a/tests/client/torture_sftp_dir.c
+++ b/tests/client/torture_sftp_dir.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/client/torture_sftp_ext.c b/tests/client/torture_sftp_ext.c
index 53644ce9..53a4a34f 100644
--- a/tests/client/torture_sftp_ext.c
+++ b/tests/client/torture_sftp_ext.c
@@ -1,5 +1,7 @@
#define LIBSSH_STATIC
+#include "config.h"
+
#include "torture.h"
#include "sftp.c"
diff --git a/tests/client/torture_sftp_fsync.c b/tests/client/torture_sftp_fsync.c
index 02e22e09..677bb90d 100644
--- a/tests/client/torture_sftp_fsync.c
+++ b/tests/client/torture_sftp_fsync.c
@@ -1,5 +1,7 @@
#define LIBSSH_STATIC
+#include "config.h"
+
#include "torture.h"
#include "sftp.c"
diff --git a/tests/client/torture_sftp_read.c b/tests/client/torture_sftp_read.c
index 51578773..a888a17b 100644
--- a/tests/client/torture_sftp_read.c
+++ b/tests/client/torture_sftp_read.c
@@ -1,5 +1,7 @@
#define LIBSSH_STATIC
+#include "config.h"
+
#include "torture.h"
#include "sftp.c"
diff --git a/tests/pkd/pkd_hello.c b/tests/pkd/pkd_hello.c
index 09c76975..4db8ee5c 100644
--- a/tests/pkd/pkd_hello.c
+++ b/tests/pkd/pkd_hello.c
@@ -3,10 +3,10 @@
*
* (c) 2014, 2017 Jon Simons <jon@jonsimons.org>
*/
+#include "config.h"
#include <setjmp.h> // for cmocka
#include <stdarg.h> // for cmocka
-#include <stdlib.h>
#include <stdio.h>
#include <unistd.h> // for cmocka
#include <cmocka.h>
diff --git a/tests/unittests/torture_buffer.c b/tests/unittests/torture_buffer.c
index 2a11c81a..4d29a2a5 100644
--- a/tests/unittests/torture_buffer.c
+++ b/tests/unittests/torture_buffer.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/unittests/torture_callbacks.c b/tests/unittests/torture_callbacks.c
index e0b7882e..f5923309 100644
--- a/tests/unittests/torture_callbacks.c
+++ b/tests/unittests/torture_callbacks.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/unittests/torture_channel.c b/tests/unittests/torture_channel.c
index fd98f95d..0762df94 100644
--- a/tests/unittests/torture_channel.c
+++ b/tests/unittests/torture_channel.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include <libssh/priv.h>
diff --git a/tests/unittests/torture_config.c b/tests/unittests/torture_config.c
index d5748012..0b17a7ab 100644
--- a/tests/unittests/torture_config.c
+++ b/tests/unittests/torture_config.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/unittests/torture_crypto.c b/tests/unittests/torture_crypto.c
index 3bddb371..755e5c0b 100644
--- a/tests/unittests/torture_crypto.c
+++ b/tests/unittests/torture_crypto.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/unittests/torture_init.c b/tests/unittests/torture_init.c
index 4a3cfe55..1713b7b9 100644
--- a/tests/unittests/torture_init.c
+++ b/tests/unittests/torture_init.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/unittests/torture_isipaddr.c b/tests/unittests/torture_isipaddr.c
index a6582a29..d2b4ba33 100644
--- a/tests/unittests/torture_isipaddr.c
+++ b/tests/unittests/torture_isipaddr.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/unittests/torture_keyfiles.c b/tests/unittests/torture_keyfiles.c
index e5f054f9..023396e7 100644
--- a/tests/unittests/torture_keyfiles.c
+++ b/tests/unittests/torture_keyfiles.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/unittests/torture_list.c b/tests/unittests/torture_list.c
index 9786c5b6..0b15fae8 100644
--- a/tests/unittests/torture_list.c
+++ b/tests/unittests/torture_list.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/unittests/torture_misc.c b/tests/unittests/torture_misc.c
index 1d0e0f5c..de84c4a3 100644
--- a/tests/unittests/torture_misc.c
+++ b/tests/unittests/torture_misc.c
@@ -1,3 +1,4 @@
+#include "config.h"
#include <sys/types.h>
#ifndef _WIN32
diff --git a/tests/unittests/torture_options.c b/tests/unittests/torture_options.c
index 05dadba4..f3197b8f 100644
--- a/tests/unittests/torture_options.c
+++ b/tests/unittests/torture_options.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#ifndef _WIN32
diff --git a/tests/unittests/torture_pki.c b/tests/unittests/torture_pki.c
index 8e6e2b63..b0e6840c 100644
--- a/tests/unittests/torture_pki.c
+++ b/tests/unittests/torture_pki.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/unittests/torture_pki_ed25519.c b/tests/unittests/torture_pki_ed25519.c
index 4270d169..11a72db3 100644
--- a/tests/unittests/torture_pki_ed25519.c
+++ b/tests/unittests/torture_pki_ed25519.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include "torture.h"
diff --git a/tests/unittests/torture_rand.c b/tests/unittests/torture_rand.c
index 95c61316..46815c48 100644
--- a/tests/unittests/torture_rand.c
+++ b/tests/unittests/torture_rand.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#define LIBSSH_STATIC
#include <libssh/priv.h>
#include <libssh/callbacks.h>