Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - strptime(): (12 Items)
   
strptime()  
Following the instructions, I picked a package and tried to compile it.  In this case it was net/samba.  I want to use 
that as part of my development environment (edit in windows, sharing files from QNX) so it was the first part I needed 
(or maybe the second part - bash was first ;-)

Anyway, other than a few minor tweaks, I made good progress until I ran into their utilites which uses strptime() in a 
couple places.  From the usage, I assume it is the opposite of strftime() which we have. It appears to parse the time 
from a string into a struct *tm.

Anyway, how do we deal with this?  Do we have a way to work around it (have a QNX lib which has the missing functions in
 them?) or do add the function (assuming we can write it) to just the samba source?

Or is it just hiding somewhere and I don't have to do anything except change the link line to grab it out of an existing
 library?

Rick..

Re: strptime()  
Ok, so it is declared in /usr/include/time.h

What do I have to link with to get it?

Rick..

Re: strptime()  
On Tue, Sep 25, 2007 at 07:42:12PM -0400, Rick Duff wrote:
> Ok, so it is declared in /usr/include/time.h
> 
> What do I have to link with to get it?
> 
> Rick..

Try this.  Last I checked this was expected to be part of
the next rev of POSIX.  I mean to put this in libc at some
point (still have to write a regression test :).  PR 9132.

-seanb
Attachment: Text strptime.c 13.15 KB
Re: strptime()  
> Try this.  Last I checked this was expected to be part of
> the next rev of POSIX.  I mean to put this in libc at some
> point (still have to write a regression test :).  PR 9132.

How do you want this handled from a diff point of view - ie. If I want to check my changes back in, how do you want me 
to handle the fact this function is missing?  

I am sure I can hack the change in, but I suspect to make it right in the long term, we need a more elegant solution. ;-
)

Rick..


Re: strptime()  
On Wed, Sep 26, 2007 at 11:11:06AM -0400, Rick Duff wrote:
> > Try this.  Last I checked this was expected to be part of
> > the next rev of POSIX.  I mean to put this in libc at some
> > point (still have to write a regression test :).  PR 9132.
> 
> How do you want this handled from a diff point of view - ie. If I want
> to check my changes back in, how do you want me to handle the fact this
> function is missing?  
> 
> I am sure I can hack the change in, but I suspect to make it right in
> the long term, we need a more elegant solution. ;-)
> 
> Rick..

Can you do something like the latest devel/m4 on the HEAD?
Check it in under files/qnx_strptime.c and copy it in place
as a post_patch target.  You still have to get the samba
makefiles to find it though...

The real fix is to add it to libc but that doesn't help in
the short term.

Regards,

-seanb
RE: strptime()  
 

> -----Original Message-----
> From: Sean Boudreau [mailto:seanb@qnx.com] 
> Sent: September 26, 2007 11:18 AM
> To: general-pkgsrc
> Subject: Re: strptime()
> 
> On Wed, Sep 26, 2007 at 11:11:06AM -0400, Rick Duff wrote:
> > > Try this.  Last I checked this was expected to be part of 
> the next 
> > > rev of POSIX.  I mean to put this in libc at some point 
> (still have 
> > > to write a regression test :).  PR 9132.
> > 
> > How do you want this handled from a diff point of view - 
> ie. If I want 
> > to check my changes back in, how do you want me to handle the fact 
> > this function is missing?
> > 
> > I am sure I can hack the change in, but I suspect to make 
> it right in 
> > the long term, we need a more elegant solution. ;-)
> > 
> > Rick..
> 
> Can you do something like the latest devel/m4 on the HEAD?
> Check it in under files/qnx_strptime.c and copy it in place 
> as a post_patch target.  You still have to get the samba 
> makefiles to find it though...
> 
> The real fix is to add it to libc but that doesn't help in 
> the short term.

We should get the libc patched up and added as well.  It is available
now and if you have a patch for this then we should look at getting
it in.

Thanks,
 Thomas
Re: strptime()  
On Wed, Sep 26, 2007 at 11:20:30AM -0400, Thomas Fletcher wrote:
>  
> 
> > -----Original Message-----
> > From: Sean Boudreau [mailto:seanb@qnx.com] 
> > Sent: September 26, 2007 11:18 AM
> > To: general-pkgsrc
> > Subject: Re: strptime()
> > 
> > On Wed, Sep 26, 2007 at 11:11:06AM -0400, Rick Duff wrote:
> > > > Try this.  Last I checked this was expected to be part of 
> > the next 
> > > > rev of POSIX.  I mean to put this in libc at some point 
> > (still have 
> > > > to write a regression test :).  PR 9132.
> > > 
> > > How do you want this handled from a diff point of view - 
> > ie. If I want 
> > > to check my changes back in, how do you want me to handle the fact 
> > > this function is missing?
> > > 
> > > I am sure I can hack the change in, but I suspect to make 
> > it right in 
> > > the long term, we need a more elegant solution. ;-)
> > > 
> > > Rick..
> > 
> > Can you do something like the latest devel/m4 on the HEAD?
> > Check it in under files/qnx_strptime.c and copy it in place 
> > as a post_patch target.  You still have to get the samba 
> > makefiles to find it though...
> > 
> > The real fix is to add it to libc but that doesn't help in 
> > the short term.
> 
> We should get the libc patched up and added as well.  It is available
> now and if you have a patch for this then we should look at getting
> it in.

Add libc to pkgsrc_qnxutil-0.8.tar.gz?  I guess we'd have to
add libc.a only to the archive if we wan't others to be able
to run the resulting binary package.

-seanb
RE: strptime()  
 

> -----Original Message-----
> From: Sean Boudreau [mailto:seanb@qnx.com] 
> Sent: September 26, 2007 11:30 AM
> To: general-pkgsrc
> Subject: Re: strptime()
> 
> On Wed, Sep 26, 2007 at 11:20:30AM -0400, Thomas Fletcher wrote:
>  
> > We should get the libc patched up and added as well.  It is 
> available 
> > now and if you have a patch for this then we should look at 
> getting it 
> > in.
> 
> Add libc to pkgsrc_qnxutil-0.8.tar.gz?  I guess we'd have to 
> add libc.a only to the archive if we wan't others to be able 
> to run the resulting binary package.

No ... In parallel I was suggesting we get strptime into libc =;-)

Thanks,
 Thomas
Re: strptime()  
On Wed, Sep 26, 2007 at 11:37:30AM -0400, Thomas Fletcher wrote:
>  
> 
> > -----Original Message-----
> > From: Sean Boudreau [mailto:seanb@qnx.com] 
> > Sent: September 26, 2007 11:30 AM
> > To: general-pkgsrc
> > Subject: Re: strptime()
> > 
> > On Wed, Sep 26, 2007 at 11:20:30AM -0400, Thomas Fletcher wrote:
> >  
> > > We should get the libc patched up and added as well.  It is 
> > available 
> > > now and if you have a patch for this then we should look at 
> > getting it 
> > > in.
> > 
> > Add libc to pkgsrc_qnxutil-0.8.tar.gz?  I guess we'd have to 
> > add libc.a only to the archive if we wan't others to be able 
> > to run the resulting binary package.
> 
> No ... In parallel I was suggesting we get strptime into libc =;-)
> 

Right, get it in libc on the HEAD.  But then add the a
libc.a with it to pkgsrc_qnxutil-0.8.tar.gz?

-seanb
Re: strptime()  
I will give it a try and see what happens.  If I get this working, can I get commiter privs so I can check it back in?

Rick..

Re: strptime()  
On Wed, Sep 26, 2007 at 11:20:51AM -0400, Rick Duff wrote:
> I will give it a try and see what happens.  If I get this working, can I
> get commiter privs so I can check it back in?

Looking into how to flip the commit bit.

-seanb
Re: strptime()  
On Wed, Sep 26, 2007 at 11:20:51AM -0400, Rick Duff wrote:
> I will give it a try and see what happens.  If I get this working, can I
> get commiter privs so I can check it back in?
> 
> Rick..

You should now have commit privs.

-seanb