Hi, there.

On 22 Feb 2003, Mij wrote:
>well
>to all:
>previous inherent thread was going to nothing, so
>i'll open a new one.
>1.0.23 gives problems compile time. Small things:
>src/auth/bincimap-uidpwd.cc:
>andreas used linux' get_current_dir_name(). Fix with
>this patch

This is the patch you're looking for. If you followed the thread you would 
see that we removed the #include <errno> and the switch after checking the 
return code for getcwd.

The next releases will have been compiled by me on our supported
platforms, so you will hopefully not see problems like this again (knock 
on wood). :)

Andy

diff -u -r1.5 bincimap-uidpwd.cc
--- src/auth/bincimap-uidpwd.cc 16 Feb 2003 18:10:43 -0000      1.5
+++ src/auth/bincimap-uidpwd.cc 22 Feb 2003 08:10:05 -0000
@@ -36,15 +36,19 @@
 #include <config.h>
 #endif

-#define _GNU_SOURCE
-
 #include <unistd.h>
 #include <iostream>

 using namespace std;

+const int CWDBUFFERSIZE = 4096;
+
 int main(void)
 {
+  char *cwd = new char[CWDBUFFERSIZE];
+  if (getcwd(cwd, CWDBUFFERSIZE) == NULL)
+      return 111;
+
   cout << getuid() << "." << getgid() << endl;
-  cout << get_current_dir_name() << endl;
+  cout << cwd << endl;
 }

Reply via email to