X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: struct passwd problem : running on XP Date: Tue, 16 Jan 2007 11:37:25 -0000 Message-ID: <032801c73962$b1e19e00$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <20070116102918.GD28312@calimero.vinschen.de> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 16 January 2007 10:29, Corinna Vinschen wrote: > On Jan 16 08:53, DEMARCHE wrote: >> I wanted to have my program independant of >> the Cygwin environment using -mno- cygwin option. "gcc -mno-cygwin -c >> mqutils.c ". My aim was to deploy my program onto Windows Operating system >> wihtout cygwin installed. Heh. Then what on earth is it supposed to do when it tries to look up a password and there's no such thing as /etc/passwd and no such library function as getpwent? >> Here is the result : >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> gcc -mno-cygwin -g -I. -I"/cygdrive/c/Program Files/IBM/WebSphere >> MQ/Tools/c/include" -c mqutils.c See, with -mno-cygwin, you really get what you're asking for: NO cygwin! >> In file included from mqutils.c:34: >> /usr/include/pwd.h:53: error: parse error before "uid_t" >> /usr/include/pwd.h:53: warning: no semicolon at end of struct or union >> /usr/include/pwd.h:54: warning: data definition has no type or storage >> class /usr/include/pwd.h:59: error: parse error before '}' token >> /usr/include/pwd.h:62: warning: parameter names (without types) in >> function declaration /usr/include/pwd.h:66: error: parse error before >> "struct" >> mqutils.c: In function `PutMsg': >> mqutils.c:106: error: dereferencing pointer to incomplete type >> make: *** [mqutils.o] Error 1 >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - So, no /etc/passwd, no getpwent, no struct passwd, no uids or gids, nothing posix-y at all. You have a logical problem in your design here: you want to use cygwin features, yet you want to use them without cygwin.... > Your header files seem to be broken Corinna, you missed the mno-cygwin flag I think? I wouldn't expect to find all these things in mingw headers. There's that bug in the shared 'gcc' driver that still allows cygwin's /usr/include in the default search path with -mno-cygwin, which is why pwd.h is even found, but then all the necessary types (uid_t, gid_t etc) in sys/types.h are different because the correct (mingw) include/sys subdir is chosen. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/