Flash Gordon said:
[color=blue]
> Richard Heathfield wrote:[color=green]
>> Flash Gordon said:
>>[color=darkred]
>>> **--> That Guy Downstairs <--** wrote:
>>>> What files are needed to be #included to be able to copy files to a new
>>>> directory and be portable?
>>>> ie. use it in Unix (SGI and Linux) or Windows 2000.
>>>> #ifdefs Ok.
>>>>
>>>> using dirent.h on SGI, but it's not working on Windows w/ VS6.0.
>>> The C standard knows nothing about directories, so you can't do this in
>>> standard C which is the topic of this group.[/color]
>>
>> By the same logic, the C standard knows nothing about users, groups, and
>> permissions in NT domains, so I can't write a standard C program to
>> generate ACL scripts for migrating users from one domain to another. And
>> yet I have written just such a program.[/color]
>
> Yes, but a script is a file, and standard C can manipulate files. Based
> on what the OP says (mention of using dirent) he is actually reading the
> directory.[/color]
I'm not arguing that the OP's requirement can be solved portably. I'm only
arguing that C's "ignorance" of a subject does not, /per se/, make that
subject off-topic.
[color=blue]
>[color=green]
>> The "knows nothing" terminology so beloved of comp.lang.c regulars is
>> woefully broken. Oxymoronically, we need a new cliche.[/color]
>
> Well, if you can suggest a better phrase feel free.[/color]
Nothing as terse springs to mind, alas. Unless someone comes up with a
suitable replacement, we may simply have to accept that sometimes the
choice is between "wrong" and "long". Of the two, I prefer "long".
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)