Re: [libgpiod][PATCH 2/3] libgpiosim: new library for controlling the gpio-sim module

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

 



On Thu, Apr 29, 2021 at 08:00:14PM +0300, Andy Shevchenko wrote:
> On Thu, Apr 29, 2021 at 03:07:49PM +0200, Bartosz Golaszewski wrote:
> > On Thu, Apr 29, 2021 at 1:23 PM Andy Shevchenko
> > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > > On Thu, Apr 29, 2021 at 11:47:33AM +0200, Bartosz Golaszewski wrote:

...

> > > > +/* We don't have mkdtempat()... :( */
> > >
> > > But we have tmpnam() / tmpnam_r(), why to reinvent it below?
> > >
> > 
> > Because of this:
> > 
> > $man tmpnam_r
> > ...
> > The created pathname has a directory prefix P_tmpdir.
> > ...
> > 
> > And this:
> > 
> > ./stdio.h:120:# define P_tmpdir "/tmp"
> 
> Still you may advance the pointer by the length of P_tmpdir + 1.

There is also tempnam().

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux