mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
tidy-up: whitespace, sorting, comment and naming fixups
This commit is contained in:
committed by
Viktor Szakats
parent
ccfeac87da
commit
9aa1964dfb
@@ -144,10 +144,10 @@ set(MAN_PAGES
|
||||
libssh2_session_init_ex.3
|
||||
libssh2_session_last_errno.3
|
||||
libssh2_session_last_error.3
|
||||
libssh2_session_set_last_error.3
|
||||
libssh2_session_method_pref.3
|
||||
libssh2_session_methods.3
|
||||
libssh2_session_set_blocking.3
|
||||
libssh2_session_set_last_error.3
|
||||
libssh2_session_set_timeout.3
|
||||
libssh2_session_startup.3
|
||||
libssh2_session_supported_algs.3
|
||||
|
||||
@@ -114,10 +114,10 @@ dist_man_MANS = \
|
||||
libssh2_session_init_ex.3 \
|
||||
libssh2_session_last_errno.3 \
|
||||
libssh2_session_last_error.3 \
|
||||
libssh2_session_set_last_error.3 \
|
||||
libssh2_session_method_pref.3 \
|
||||
libssh2_session_methods.3 \
|
||||
libssh2_session_set_blocking.3 \
|
||||
libssh2_session_set_last_error.3 \
|
||||
libssh2_session_set_timeout.3 \
|
||||
libssh2_session_startup.3 \
|
||||
libssh2_session_supported_algs.3 \
|
||||
|
||||
@@ -41,26 +41,26 @@ add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
set(EXAMPLES
|
||||
direct_tcpip
|
||||
ssh2
|
||||
scp
|
||||
scp_nonblock
|
||||
scp_write
|
||||
scp_write_nonblock
|
||||
sftp
|
||||
sftp_RW_nonblock
|
||||
sftp_append
|
||||
sftp_mkdir
|
||||
sftp_mkdir_nonblock
|
||||
sftp_nonblock
|
||||
sftp_write
|
||||
sftp_write_nonblock
|
||||
sftp_mkdir
|
||||
sftp_mkdir_nonblock
|
||||
sftp_RW_nonblock
|
||||
sftp_write_sliding
|
||||
sftpdir
|
||||
sftpdir_nonblock
|
||||
ssh2_exec
|
||||
ssh2
|
||||
ssh2_agent
|
||||
ssh2_agent_forwarding
|
||||
ssh2_echo
|
||||
sftp_append
|
||||
ssh2_exec
|
||||
subsystem_netconf
|
||||
tcpip-forward)
|
||||
|
||||
@@ -71,6 +71,7 @@ foreach(example ${EXAMPLES})
|
||||
target_include_directories(example-${example} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../src)
|
||||
target_link_libraries(example-${example} ${LIB_STATIC} ${LIBRARIES})
|
||||
endforeach()
|
||||
|
||||
add_target_to_copy_dependencies(
|
||||
TARGET copy_example_dependencies
|
||||
DEPENDENCIES ${RUNTIME_DEPENDENCIES}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Sample showing how to makes SSH2 with X11 Forwarding works.
|
||||
*
|
||||
* Usage :
|
||||
* Usage:
|
||||
* "ssh2 host user password [DEBUG]"
|
||||
*/
|
||||
|
||||
|
||||
@@ -138,4 +138,3 @@ int _libssh2_channel_close(LIBSSH2_CHANNEL * channel);
|
||||
int _libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener);
|
||||
|
||||
#endif /* __LIBSSH2_CHANNEL_H */
|
||||
|
||||
|
||||
@@ -14,4 +14,4 @@ Version: @LIBSSH2_VERSION@
|
||||
Requires.private: @PC_REQUIRES_PRIVATE@
|
||||
Libs: -L${libdir} -lssh2 @PC_LIBS@
|
||||
Libs.private: @PC_LIBS@
|
||||
Cflags: -I${includedir}
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
|
||||
/* Functions */
|
||||
#cmakedefine HAVE_GETTIMEOFDAY
|
||||
#cmakedefine HAVE_POLL
|
||||
#cmakedefine HAVE_SELECT
|
||||
#cmakedefine HAVE_STRTOLL
|
||||
#cmakedefine HAVE_STRTOI64
|
||||
#cmakedefine HAVE_SNPRINTF
|
||||
@@ -70,6 +68,9 @@
|
||||
#cmakedefine HAVE_EXPLICIT_MEMSET
|
||||
#cmakedefine HAVE_MEMSET_S
|
||||
|
||||
#cmakedefine HAVE_POLL
|
||||
#cmakedefine HAVE_SELECT
|
||||
|
||||
/* Socket non-blocking support */
|
||||
#cmakedefine HAVE_O_NONBLOCK
|
||||
#cmakedefine HAVE_FIONBIO
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
# define LIBSSH2_WINDOWS_APP
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif /* WIN32 */
|
||||
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
@@ -1406,4 +1406,3 @@ _libssh2_packet_requirev(LIBSSH2_SESSION *session,
|
||||
state->start = 0;
|
||||
return LIBSSH2_ERROR_SOCKET_DISCONNECT;
|
||||
}
|
||||
|
||||
|
||||
@@ -1740,7 +1740,7 @@ libssh2_poll(LIBSSH2_POLLFD * fds, unsigned int nfds, long timeout)
|
||||
*/
|
||||
sysret = poll(sockets, nfds, (int)timeout_remaining);
|
||||
timeout_remaining = 0;
|
||||
#endif /* HAVE_GETTIMEOFDAY */
|
||||
#endif /* HAVE_LIBSSH2_GETTIMEOFDAY */
|
||||
|
||||
if(sysret > 0) {
|
||||
for(i = 0; i < nfds; i++) {
|
||||
|
||||
@@ -68,9 +68,9 @@ endif
|
||||
DB ?= NDEBUG
|
||||
CPPFLAGS += -D$(DB)
|
||||
ifeq ($(DB),NDEBUG)
|
||||
OBJDIR := release
|
||||
OBJ_DIR := release
|
||||
else
|
||||
OBJDIR := debug
|
||||
OBJ_DIR := debug
|
||||
CFLAGS += -g
|
||||
CPPFLAGS += -DLIBSSH2DEBUG
|
||||
endif
|
||||
@@ -143,7 +143,7 @@ AWK := awk
|
||||
ZIP := zip -qzr9
|
||||
|
||||
# Include the version info retrieved from libssh2.h
|
||||
-include $(OBJDIR)/version.inc
|
||||
-include $(OBJ_DIR)/version.inc
|
||||
|
||||
vpath %.c $(PROOT)/src
|
||||
|
||||
@@ -151,7 +151,7 @@ vpath %.c $(PROOT)/src
|
||||
include $(PROOT)/Makefile.inc
|
||||
|
||||
OBJECTS := $(patsubst %.c,%.o,$(CSOURCES))
|
||||
OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS))
|
||||
OBJS := $(addprefix $(OBJ_DIR)/,$(OBJECTS))
|
||||
|
||||
TARGET := libssh2
|
||||
|
||||
@@ -172,29 +172,29 @@ dll: prebuild $(libssh2_dll_LIBRARY)
|
||||
|
||||
lib: prebuild $(TARGET).a
|
||||
|
||||
prebuild: $(OBJDIR) $(OBJDIR)/version.inc
|
||||
prebuild: $(OBJ_DIR) $(OBJ_DIR)/version.inc
|
||||
|
||||
test: $(TARGETS_EXAMPLES)
|
||||
|
||||
%.exe: %.c $(libssh2_DEPENDENCIES)
|
||||
$(CC) -W -Wall $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LIBSSH2_LDFLAGS_BIN) $< -o $@ $(LIBS) $(LIBS_BIN)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
$(OBJ_DIR)/%.o: %.c
|
||||
$(CC) -W -Wall $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
$(libssh2_dll_LIBRARY) $(libssh2_dll_a_LIBRARY): $(OBJS) $(OBJDIR)/$(TARGET).res
|
||||
$(libssh2_dll_LIBRARY) $(libssh2_dll_a_LIBRARY): $(OBJS) $(OBJ_DIR)/$(TARGET).res
|
||||
@$(call DEL, $@)
|
||||
$(CC) $(LDFLAGS) -shared $(LIBSSH2_LDFLAGS_LIB) $^ -o $@ $(LIBS) $(LIBS_LIB) \
|
||||
-Wl,--output-def,$(libssh2_dll_LIBRARY:.dll=.def),--out-implib,$(libssh2_dll_a_LIBRARY)
|
||||
|
||||
$(OBJDIR)/%.res: %.rc
|
||||
$(OBJ_DIR)/%.res: %.rc
|
||||
$(RC) -O coff $(RCFLAGS) -i $< -o $@
|
||||
|
||||
$(TARGET).a: $(OBJS)
|
||||
@$(call DEL, $@)
|
||||
$(AR) rcs $@ $^
|
||||
|
||||
$(OBJDIR)/version.inc: $(PROOT)/get_ver.awk $(PROOT)/include/libssh2.h $(OBJDIR)
|
||||
$(OBJ_DIR)/version.inc: $(PROOT)/get_ver.awk $(PROOT)/include/libssh2.h $(OBJ_DIR)
|
||||
$(AWK) -f $^ > $@
|
||||
|
||||
dist: all $(DISTDIR) $(DISTDIR)/readme.txt
|
||||
@@ -216,16 +216,16 @@ distclean vclean: clean
|
||||
$(call DEL, $(DISTARC))
|
||||
|
||||
objclean: all
|
||||
$(call RMDIR, $(OBJDIR))
|
||||
$(call RMDIR, $(OBJ_DIR))
|
||||
|
||||
testclean: clean
|
||||
$(call DEL, $(TARGETS_EXAMPLES))
|
||||
|
||||
clean:
|
||||
$(call DEL, $(libssh2_dll_LIBRARY) $(libssh2_dll_LIBRARY:.dll=.def) $(TARGET).a $(libssh2_dll_a_LIBRARY))
|
||||
$(call RMDIR, $(OBJDIR))
|
||||
$(call RMDIR, $(OBJ_DIR))
|
||||
|
||||
$(OBJDIR):
|
||||
$(OBJ_DIR):
|
||||
@$(call MKDIR, $@)
|
||||
|
||||
$(DISTDIR):
|
||||
@@ -239,7 +239,7 @@ $(DISTDIR)/readme.txt: GNUmakefile
|
||||
@echo $(DL)any further documentation:$(DL) >> $@
|
||||
@echo $(DL)$(HOMEPAGE)$(DL) >> $@
|
||||
|
||||
help: $(OBJDIR)/version.inc
|
||||
help: $(OBJ_DIR)/version.inc
|
||||
@echo $(DL)===========================================================$(DL)
|
||||
@echo $(DL)OpenSSL path = $(OPENSSL_PATH)$(DL)
|
||||
@echo $(DL)wolfSSL path = $(WOLFSSL_PATH)$(DL)
|
||||
|
||||
Reference in New Issue
Block a user