On Fri, Feb 18, 2005 at 06:42:12PM -0800, Barry deFreese wrote:
> +dnl Check for get_current_dir_name for GNU System
> +AC_CHECK_FUNCS(get_current_dir_name)
> +

I suggest not mentioning the GNU system here. This is not a hack wich
would warrant explaining why it got put there.

> +#include "config.h"

The other source files do this like
#include "../../config.h"            /* HAVE_SNPRINTF */
so I suggest you stick with that.

> -    char oldcwd[PATH_MAX];
> +    #ifdef HAVE_GET_CURRENT_DIR_NAME
> +      char *oldcwd = get_current_dir_name ();
> +    #else
> +      char oldcwd[PATH_MAX];
> +    #endif

Don't indent preprocessor macros, just put them at column 1. (It's ok to
indent a block of preprocessor macros on its own, though, I believe)

Do it like this:

        
#ifdef HAVE_GET_CURRENT_DIR_NAME
  char *oldcwd = get_current_dir_name ();
#else
  char oldcwd[PATH_MAX];
#endif

> -    if (getcwd(oldcwd, PATH_MAX) == NULL)
> +    #ifndef HAVE_GET_CURRENT_DIR_NAME
> +      if (getcwd(oldcwd, PATH_MAX) == NULL)
>         return;
> +    #endif

Same here. The indentation level of the 'if (getcwd(oldcwd, PATH_MAX) ==
NULL)' statement should not change.

Anyway, those are just style issues, but they might make it easier to
get the patch integrated upstream.


cheers,

Michael

-- 
Michael Banck
Debian Developer
[EMAIL PROTECTED]
http://www.advogato.org/person/mbanck/diary.html


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to