Porting to a new platform

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Porting to a new platform

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:27

"Joachim Schmitz" [off-list ref] 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.
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, 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.

RE: Porting to a new platform

From: Joachim Schmitz <hidden>
Date: 2016-06-15 22:54:27

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" [off-list ref] writes:
quoted
- 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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help