Subject: [libssh2] Macro define error while executing of libssh2 in AIX Unix 4.3/5.1

[libssh2] Macro define error while executing of libssh2 in AIX Unix 4.3/5.1

From: DAO Anh-Viet <>
Date: Tue, 27 Mar 2007 18:30:29 +0200



I'm trying to use and testing a program using libssh2 at the AIX Unix 4.3/5.1 platform.

And I have meet such following problem concerning about the interpretation of Macro define in my complier

of AIX Unix 4.3 and 5.1


1. SFTP system initialization:


At line of sftp.c:464

            if (libssh2_channel_subsystem(channel, "sftp")) {


When the program initialize the SFTP system, it search the subsystem that has a name "sftp" instead of "subsystem",

because of that my program was failed to open sftp connection.

I have try to replace this line by definition of his macro such :

            if (libssh2_channel_process_startup(channel, "subsystem", sizeof("subsystem") - 1, "sftp", strlen("sftp"))) {

It works so well.

So, I have the error of interpretation of macro define in my AIX Unix 4.3/5.1 compiler.

Do you have any idea to solve this problem without replace the defined macros in libssh2 library.


2. Otherwise, when there are so many others macro define in libssh2 library, so in spite of the above correction,

I will meet others problem of macro define such :


s = packet = LIBSSH2_ALLOC(session, packet_len);


Remark: I have generated the Makefile for AIX Unix version 4.3 and CC of following version: VisualAge C++ Professional / C for AIX Compiler, Version 5


Please help me if you have any idea to solve this



Dao Anh-Viet



Email: <>


Take Surveys. Earn Cash. Influence the Future of IT
Join's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash

libssh2-devel mailing list
Received on 2007-03-27