From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Netes Subject: Re: creating common ib_types.h for linux and windows Date: Wed, 21 Sep 2011 16:29:45 +0300 Message-ID: <20110921132945.GA3767@calypso.mtl.com> References: <1828884A29C6694DAF28B7E6B8A8237316E65191@ORSMSX101.amr.corp.intel.com> <1828884A29C6694DAF28B7E6B8A8237316E6526F@ORSMSX101.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Content-Disposition: inline In-Reply-To: <1828884A29C6694DAF28B7E6B8A8237316E6526F-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "Hefty, Sean" Cc: Bart Van Assche , "linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)" , "Hal Rosenstock (hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org)" , "ofw-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org" List-Id: linux-rdma@vger.kernel.org On 14:23 Tue 20 Sep , Hefty, Sean wrote: > > Why to test for __WIN__ instead of _WIN32 (defined both when building > > 32-bit and 64-bit code -- see also > > http://msdn.microsoft.com/en-us/library/b0084kay%28v=vs.80%29.aspx) ? > > I have no idea. This is just what's currently in the code. I can change this portion of the code if we want to use #ifdef's. > Digging into the history, I found this patch that added __WIN__ defined for Windows: http://www.spinics.net/lists/linux-rdma/msg00451.html > > When creating a common header file, this might be a good start: > > https://msinttypes.googlecode.com/svn/trunk/stdint.h > > There are already shared types defined between linux and windows that opensm uses. For the most part, there's no technical reason why windows can't use 99% of the linux ib_types.h as is. My goal is to be able to take the file and drop it into the windows build tree without needing changes. What is your end goal? To have one code base for OpenSM that would be able to be compiled on both Linux and Windows based on __WIN__ definition? > > Btw, as background I tried to pull in the latest ibmad and ibdiags into windows. The build broke because of new defines that had been added to ib_types.h. Eventually we should be able to drop opensm directly into the windows build as well. > > - Sean > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- -- Alex -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html