git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: Porting to a new platform

From
Joachim Schmitz <jojo@schmitz-digital.de>
Date
Aug 10, 2012, 16:59 UTC
Message-ID
<004301cd7719$86b810b0$94283210$@schmitz-digital.de>
In-Reply-To
<7v1ujelnvm.fsf_-_@alter.siamese.dyndns.org>
Show 12 quoted lines
> From: Junio C Hamano [mailto:gitster@pobox.com]
> Sent: Friday, August 10, 2012 6:21 PM
> To: Joachim Schmitz
> Cc: git@vger.kernel.org; rsbecker@nexbridge.com
> Subject: Porting to a new platform
> 
> "Joachim Schmitz" <jojo@schmitz-digital.de> writes:
> 
> > - HP NonStop is lacking poll(),...
> > - HP NonStop is lacking getrlimit(), fsync(), setitimer()...
> 
> I would check compat/win32 and friends and see what other platforms that
lack
> this and that do, if I were you.

Hmm, in compat/win32/poll.c I found exactly the same code I stole' for my implementation (GNUlib's implementation) so I just managed to reinvent the wheel :-( Thanks anyway for telling me about it.

For getrlimit(RLIMIT_NOFILE, ...), I'm now using sysconf(_SC_OPEN_MAX), does that sound reasonable?

I found no replacement for fsync() and setitimer(), but have my ones since long, so no real need.

Also would compat/pread.c, another API HP NonStop is missing, but I had my own implementation for that since quite a while already (and it looks pretty similar to git's one).

I don't quite understand though why neither compat/pread.c nor compat/win32/poll.c are used automatically after having been proven absent in configure? Ahh, I see, it could be done by adding a HP NonStop specific section in Makefile ("ifeq ($(uname_S),NONSTOP_KERNEL)"), right? I'll have a deeper look and see whether I can come up with something useful to feed back into git.

> > so telling configure to search for c99  should help here.
> 
> In general, the top-level Makefile is designed to be usable without ever
> worrying about "configure" mess.  Just define CC for the platform section
there,

Yes, that's what I did, sort of, I just set CC to c99 prior to executing configure. I've seen other configure though, that explicitly test for C99, so why not this one?

> and optionally add a support to flip the same in configure.ac.  This
applies
> equally to other conditional compilation options you may have to add to
> support your platform.
Bye, Jojo
Previous: Junio C Hamano
Message 8 of 8 in “add test for 'git rebase --keep-empty'”
  1. add test for 'git rebase --keep-empty'Martin von Zweigbergk, Aug 8, 2012
  2. Neil HormanAug 8, 2012
  3. add tests for 'git rebase --keep-empty'Martin von Zweigbergk, Aug 9, 2012
  4. Junio C HamanoAug 9, 2012
  5. Neil HormanAug 10, 2012
  6. Joachim SchmitzAug 10, 2012
  7. Porting to a new platformJunio C Hamano, Aug 10, 2012
  8. Joachim SchmitzAug 10, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.