Re: Remove sort files

From: Ian Lance Taylor <ian(at)airs(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Remove sort files
Date: 2001-05-24 00:46:43
Message-ID: silmnn8tfw.fsf@daffy.airs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:

> + if (temp_de->d_type == DT_REG)

The d_type field, and the corresponding macros such as DT_REG, are not
portable.

The only portable field in the dirent structure is d_name.

If you want to be really really super portable, you have to think
about supporting direct.h and other header files. See AC_DIR_HEADER
and AC_HEADER_DIRENT in the autoconf documentation. But these days
probably every OS of interest supports dirent.h, which is defined by
POSIX.

Ian

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-05-24 01:14:32 Re: Remove sort files
Previous Message Bruce Momjian 2001-05-24 00:15:00 Re: Remove sort files