Re: fchdir() question

2018-08-08 Thread Bruno Haible
Barath Aron wrote: > What system implements a realloc() which does not work > if ptr is null pointer? None, according to our findings [1]. > I looked into the fchdir.c ... new_dirs = (dirs != NULL ? (dir_info_t *) realloc (dirs, new_allocated * sizeof *dirs) : (di

Re: fchdir() question

2018-08-08 Thread Paul Eggert
Barath Aron wrote: What system implements a realloc() which does not work if ptr is null pointer? I think the main problem area here is realloc (NULL, 0), where POSIX does not completely specify the behavior but GNU does. Only very ancient systems have problems with realloc (NULL, x) when x i