[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU enhancement -- $(xargs cmd, list)

From: Reid Madsen
Subject: Re: GNU enhancement -- $(xargs cmd, list)
Date: Mon, 6 Nov 2000 16:56:30 -0600 (CST)

 > Date: Mon, 6 Nov 2000 17:45:45 -0500
 > From: "Paul D. Smith" <address@hidden>
 > %% Reid Madsen <address@hidden> writes:
 >   >> Also, it might be a Good Thing to try to integrate the temporary file
 >   >> with the ^C handling in GNU make so that the temp file was removed even
 >   >> if the user used ^C.  And, any creation of temp files needs to be
 >   >> hardened to avoid DOS, etc. attacks.
 >   rm> I thought of this too.  If you give me some pointers, I'll try to
 >   rm> prototype it.
 > For the latter, there's an open_tmpfile() function in main.c which
 > should do what you want; hopefully the interface is sufficient (see its
 > use in main.c as well).
 > For the former, I don't have any brainstorms; the "current" temp file
 > names will just have to be kept somewhere, I guess.

Okay, I'll prototype with the 'open_tmpfile()' function.

I also thought about using the _POSIX_ARG_MAX and ARG_MAX symbols to determine
when the xargs approach was really needed.  If the command line is within
limits, then

        $(xargs cmd, list)

would expand to:

        cmd list

Do you believe this is doable/portable?


FYI, a quick perusal of our systems shows:

        -------------   -------
Solaris         4096    1MB
HP              4096    2MB
AIX             4096    24576   Pathetic!
OSF             4096    38912   Pathetic!
NT              4096    14500   Pathetic ** 2 !

Gotta love those 2-4 byte per arg limits on AIX, OSF, and NT.

Reid Madsen                             address@hidden                      
Senior Member, Tech. Staff              (972) 536-3261 (Desk)
I2 Technologies                         (214) 850-9613 (Cellular)
Making incrementally (without 'clean') since May 18, 2000.
Long live incremental make!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]