Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and getcwd

2017-04-24 Thread Ben Pfaff
mailto:ovs-dev- > > boun...@openvswitch.org] On Behalf Of Alin Serdean > > Sent: Wednesday, April 19, 2017 8:03 AM > > To: Ben Pfaff > > Cc: d...@openvswitch.org > > Subject: Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and > > getcwd > > &g

Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and getcwd

2017-04-24 Thread Alin Serdean
n. > > > -Original Message- > > From: Ben Pfaff [mailto:b...@ovn.org] > > Sent: Wednesday, April 19, 2017 7:55 AM > > To: Alin Serdean > > Cc: Sairam Venugopal ; d...@openvswitch.org > > Subject: Re: [ovs-dev] [PATCH 02/10] windows: add definition of g

Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and getcwd

2017-04-18 Thread Alin Serdean
dnesday, April 19, 2017 7:55 AM > To: Alin Serdean > Cc: Sairam Venugopal ; d...@openvswitch.org > Subject: Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and > getcwd > > I don't know how much risk there is. If the values actually returned in > practi

Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and getcwd

2017-04-18 Thread Ben Pfaff
y, April 15, 2017 6:27 AM > > To: Sairam Venugopal > > Cc: Alin Serdean ; > > d...@openvswitch.org > > Subject: Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and > > getcwd > > > > If GetCurrentProcessId() is a reasonable substitute for getpid

Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and getcwd

2017-04-18 Thread Alin Serdean
as we already have for `string.h`. What do you think? Thanks, Alin. > -Original Message- > From: Ben Pfaff [mailto:b...@ovn.org] > Sent: Saturday, April 15, 2017 6:27 AM > To: Sairam Venugopal > Cc: Alin Serdean ; > d...@openvswitch.org > Subject: Re: [ovs-dev]

Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and getcwd

2017-04-14 Thread Ben Pfaff
If GetCurrentProcessId() is a reasonable substitute for getpid(), but the return type is different, then I would suggest an inline function, like this: static inline pid_t getpid(void) { return GetCurrentProcessId(); } Thanks, Ben. On Tue, Mar 07, 2017 at 09:07:55AM +, Sairam Venugopal

Re: [ovs-dev] [PATCH 02/10] windows: add definition of getpid and getcwd

2017-03-07 Thread Sairam Venugopal
Shouldn’t we cast the DWORD to unsigned int for the GetCurrentProcessId? On 2/5/17, 8:41 PM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Serdean" wrote: >getcwd - is used in lib/util.c. getcwd is deprecated on Windows but has >_getcwd which is defined in : >https://urldefense.proofpo

[ovs-dev] [PATCH 02/10] windows: add definition of getpid and getcwd

2017-02-05 Thread Alin Serdean
getcwd - is used in lib/util.c. getcwd is deprecated on Windows but has _getcwd which is defined in : https://msdn.microsoft.com/en-us/library/sf98bd4y(v=vs.120).aspx getpid - is used in several files (i.e. lib/vlog.c). getpid is also and deprecated and _getpid should be used: https://msdn.microso