* [PATCH] Port to 12 other Platforms.
@ 2008-06-08 15:28 Boyd Lynn Gerber
2008-06-08 15:46 ` Jakub Narebski
0 siblings, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 15:28 UTC (permalink / raw)
To: Git List
This patch adds support to compile git on 12 additional platforms.
They are based on UNIX Systems Labs (USL)/Novell and SYS V
based OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4, OpenServer 6.0.X and
SCO pre OSR 5 OS's to build and run git.
Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
---
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
---
Makefile
Add changes for System V, UnixWare, SCO OS's
---
git-compat-util.h
__USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
compiler and/or some SysV based OS's.
__M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
of the SCO OS's. It is used just like Apple and BSD, both of these
shouldn't have _XOPEN_SOURCE defined.
diff --git a/Makefile b/Makefile
index cce5a6e..026de2f 100644
--- a/Makefile
+++ b/Makefile
@@ -564,6 +564,45 @@ endif
ifeq ($(uname_S),GNU/kFreeBSD)
NO_STRLCPY = YesPlease
endif
+ifeq ($(uname_S),UnixWare)
+ CC=cc
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/local/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ BASIC_CFLAGS += -Kthread
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ INSTALL = ginstall
+ TAR = gtar
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+endif
+ifeq ($(uname_S),SCO_SV)
+ ifeq ($(uname_R),3.2)
+ CFLAGS = -O2
+ endif
+ ifeq ($(uname_R),5)
+ CC=cc
+ BASIC_CFLAGS += -Kthread
+ endif
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+ INSTALL = ginstall
+ TAR = gtar
+endif
ifeq ($(uname_S),Darwin)
NEEDS_SSL_WITH_CRYPTO = YesPlease
NEEDS_LIBICONV = YesPlease
diff --git a/git-compat-util.h b/git-compat-util.h
index 01c4045..c04e8ba 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -39,7 +39,7 @@
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
--
1.5.2.4
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH] Port to 12 other Platforms.
2008-06-08 15:28 [PATCH] Port to 12 other Platforms Boyd Lynn Gerber
@ 2008-06-08 15:46 ` Jakub Narebski
2008-06-08 16:04 ` Boyd Lynn Gerber
0 siblings, 1 reply; 16+ messages in thread
From: Jakub Narebski @ 2008-06-08 15:46 UTC (permalink / raw)
To: Boyd Lynn Gerber; +Cc: Git List
Boyd Lynn Gerber <gerberb@zenez.com> writes:
> This patch adds support to compile git on 12 additional platforms.
> They are based on UNIX Systems Labs (USL)/Novell and SYS V
> based OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4, OpenServer 6.0.X and
> SCO pre OSR 5 OS's to build and run git.
>
> Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
> ---
[...]
> git-compat-util.h
>
> __USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
> compiler and/or some SysV based OS's.
>
> __M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
> of the SCO OS's. It is used just like Apple and BSD, both of these
> shouldn't have _XOPEN_SOURCE defined.
Above info is neither in commit message, not in comment in some file.
It would be nice to have it in somewhere, and not only in mailing list
archives.
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Port to 12 other Platforms.
2008-06-08 15:46 ` Jakub Narebski
@ 2008-06-08 16:04 ` Boyd Lynn Gerber
2008-06-08 16:21 ` Matthieu Moy
2008-06-08 18:52 ` [PATCH] Port to 12 other Platforms Junio C Hamano
0 siblings, 2 replies; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 16:04 UTC (permalink / raw)
To: Jakub Narebski; +Cc: Git List
On Sun, 8 Jun 2008, Jakub Narebski wrote:
> Boyd Lynn Gerber <gerberb@zenez.com> writes:
>
> > This patch adds support to compile git on 12 additional platforms.
> > They are based on UNIX Systems Labs (USL)/Novell and SYS V
> > based OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4, OpenServer 6.0.X and
> > SCO pre OSR 5 OS's to build and run git.
> >
> > Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
> > ---
> [...]
> > git-compat-util.h
> >
> > __USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
> > compiler and/or some SysV based OS's.
> >
> > __M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
> > of the SCO OS's. It is used just like Apple and BSD, both of these
> > shouldn't have _XOPEN_SOURCE defined.
>
> Above info is neither in commit message, not in comment in some file.
> It would be nice to have it in somewhere, and not only in mailing list
> archives.
This was from my own copy of the master archive. It is my proposal. I
thought you had to get an OK from this list before you do a push to the
main archive. Am I missing something? I am new to this list and the
proper methods for submitting patches. I thought I was following the
guidelines from
http://repo.or.cz/w/git.git?a=blob_plain;f=Documentation/SubmittingPatches;hb=HEAD
What am I missing?
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Port to 12 other Platforms.
2008-06-08 16:04 ` Boyd Lynn Gerber
@ 2008-06-08 16:21 ` Matthieu Moy
2008-06-08 16:33 ` Boyd Lynn Gerber
2008-06-08 18:52 ` [PATCH] Port to 12 other Platforms Junio C Hamano
1 sibling, 1 reply; 16+ messages in thread
From: Matthieu Moy @ 2008-06-08 16:21 UTC (permalink / raw)
To: Boyd Lynn Gerber; +Cc: Jakub Narebski, Git List
Boyd Lynn Gerber <gerberb@zenez.com> writes:
> This was from my own copy of the master archive. It is my proposal. I
> thought you had to get an OK from this list before you do a push to the
> main archive.
You won't do a push, the maintainer will apply the patch if it seems
OK.
> What am I missing?
The format used to send patches. git format-patch and git send-email
would do that for you, but in particular : what comes after « --- »
and before the patch itself is ignored by the tools, just an
informative message for people reading your email. What comes before
this « --- » is the commit message.
--
Matthieu
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Port to 12 other Platforms.
2008-06-08 16:21 ` Matthieu Moy
@ 2008-06-08 16:33 ` Boyd Lynn Gerber
2008-06-08 17:19 ` Jakub Narebski
0 siblings, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 16:33 UTC (permalink / raw)
To: Matthieu Moy; +Cc: Jakub Narebski, Git List
On Sun, 8 Jun 2008, Matthieu Moy wrote:
> Boyd Lynn Gerber <gerberb@zenez.com> writes:
> > This was from my own copy of the master archive. It is my proposal. I
> > thought you had to get an OK from this list before you do a push to the
> > main archive.
>
> You won't do a push, the maintainer will apply the patch if it seems
> OK.
Thanks, I understand better now.
> > What am I missing?
>
> The format used to send patches. git format-patch and git send-email
> would do that for you, but in particular : what comes after « --- »
> and before the patch itself is ignored by the tools, just an
> informative message for people reading your email. What comes before
> this « --- » is the commit message.
I moved the message from above my commiter message because I was told to
add comments after the --- with the file being modified. The reasons for
the modifications. I used git format-patch -p -M -B origin to generate
this email. All I did was read the contents into the email I create for
posting. This was the advice I was given on IRC as the best method to
create/send the patch. When on IRC I was omitting the -p and was not
getting the .patch file. After reading the docs over and over I finally
noticed I was missing the -p. Once I added it I got the patch file and
then I emailed it to the list.
Thanks,
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Port to 12 other Platforms.
2008-06-08 16:33 ` Boyd Lynn Gerber
@ 2008-06-08 17:19 ` Jakub Narebski
2008-06-08 17:58 ` [PATCH] Port to 12 other Platforms. (Comments) Boyd Lynn Gerber
0 siblings, 1 reply; 16+ messages in thread
From: Jakub Narebski @ 2008-06-08 17:19 UTC (permalink / raw)
To: Boyd Lynn Gerber; +Cc: Matthieu Moy, Git List
On Sun, 8 Jun 2008, Boyd Lynn Gerber wrote:
> On Sun, 8 Jun 2008, Matthieu Moy wrote:
>> Boyd Lynn Gerber <gerberb@zenez.com> writes:
>>>
>>> This was from my own copy of the master archive. It is my proposal. I
>>> thought you had to get an OK from this list before you do a push to the
>>> main archive.
>>
>> You won't do a push, the maintainer will apply the patch if it seems
>> OK.
>
> Thanks, I understand better now.
By the way, if you want to send large series of patches, and you have
your git repository published somewhere (repo.or.cz, gitorious, github,
freedektop, kernel.org), sometimes pull request is used. As you
usually use git-format-patch (perhaps together with git-send-email)
when sending patches, you can use output of git-request-pull there.
Just FYI, you can safely ignore above.
>>> What am I missing?
>>
>> The format used to send patches. git format-patch and git send-email
>> would do that for you, but in particular : what comes after « --- »
>> and before the patch itself is ignored by the tools, just an
>> informative message for people reading your email. What comes before
>> this « --- » is the commit message.
>
> I moved the message from above my commiter message because I was told to
> add comments after the --- with the file being modified. The reasons for
> the modifications. I used git format-patch -p -M -B origin to generate
> this email. All I did was read the contents into the email I create for
> posting. This was the advice I was given on IRC as the best method to
> create/send the patch. When on IRC I was omitting the -p and was not
> getting the .patch file. After reading the docs over and over I finally
> noticed I was missing the -p. Once I added it I got the patch file and
> then I emailed it to the list.
Strange. While in git-diff family of commands '-p' means generate
diff in patchset format:
-p Generate patch (see section on generating patches).
it has different meaning (oops) in git-format-patch:
-p Generate patches without diffstat.
(What is probably a bug in git-format-patch it doesn't add "---\n"
separator between commit message and patch itself).
Everything between "---\n" after commit message (usually ending in
Signed-off-by) and the diffstat and patch is a transient comment,
which won't get included in commit message, and wouldn't be anywhere
in the repository, neither in contents not in commits.
What you put there is information which shouldn't be in commit message,
like for example difference from previous version of patch, sometimes
explanation behind _why_ of this patch; you put there to which branch
this patch applies, if it is not 'master' (por example if it requires
material from 'next') or if given patch depends on earlier patch NOT
in the series.
IMVVVHO you should put verbatim copy of certificate of origin there,
but put the comment about which operating systems needs which defines,
or use which defines, and why either in commit message, in comment in
some file, or both.
HTH (Hope That Helps).
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] Port to 12 other Platforms. (Comments)
2008-06-08 17:19 ` Jakub Narebski
@ 2008-06-08 17:58 ` Boyd Lynn Gerber
2008-06-08 18:01 ` Boyd Lynn Gerber
0 siblings, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 17:58 UTC (permalink / raw)
To: Jakub Narebski; +Cc: Matthieu Moy, Git List
On Sun, 8 Jun 2008, Jakub Narebski wrote:
> On Sun, 8 Jun 2008, Boyd Lynn Gerber wrote:
> > On Sun, 8 Jun 2008, Matthieu Moy wrote:
> >> Boyd Lynn Gerber <gerberb@zenez.com> writes:
> >>> This was from my own copy of the master archive. It is my proposal. I
> >>> thought you had to get an OK from this list before you do a push to the
> >>> main archive.
> >>
> >> You won't do a push, the maintainer will apply the patch if it seems
> >> OK.
> > Thanks, I understand better now.
>
> By the way, if you want to send large series of patches, and you have
> your git repository published somewhere (repo.or.cz, gitorious, github,
> freedektop, kernel.org), sometimes pull request is used. As you
> usually use git-format-patch (perhaps together with git-send-email)
> when sending patches, you can use output of git-request-pull there.
>
> Just FYI, you can safely ignore above.
I have setup a repo on www.zenez.com.
I just did a git clone give://www.zenez.com/git git.
I am trying to get various communities to use git. So I want all there
changes to go to my master repo. I am trying to get those that still
support/work on SCO OS's to embrase the Open Source Software (OSS)
concepts and give back to the OSS community inspite of the SCO Group and
what they are doing. I am a firm believer of OSS Concepts. I still have
to support many SCO Systems. My clients applicatios only run on them.
But I want as much as I can to promote the OSS Concepts and have them
become a major part of the business I support.
Because of all the anti SCO I want them to have a safe place to use and
provide good services for them. Saddly, I do this because of my own
experience with retrobuction from fanatics. I have had over 650 GB over
written with "DIE SCO" I was away for a week and when I came back I had
had a break-in on one system and that was the result. I have had DOS
attacks and many others. So I am trying to be a bridge between the to
communities and other communites to promote the true spirt of Open Source.
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Port to 12 other Platforms.
2008-06-08 16:04 ` Boyd Lynn Gerber
2008-06-08 16:21 ` Matthieu Moy
@ 2008-06-08 18:52 ` Junio C Hamano
2008-06-08 19:31 ` Boyd Lynn Gerber
2008-06-08 20:47 ` Boyd Lynn Gerber
1 sibling, 2 replies; 16+ messages in thread
From: Junio C Hamano @ 2008-06-08 18:52 UTC (permalink / raw)
To: Boyd Lynn Gerber; +Cc: Jakub Narebski, Git List
Boyd Lynn Gerber <gerberb@zenez.com> writes:
> On Sun, 8 Jun 2008, Jakub Narebski wrote:
>> Boyd Lynn Gerber <gerberb@zenez.com> writes:
>>
>> > This patch adds support to compile git on 12 additional platforms.
>> > They are based on UNIX Systems Labs (USL)/Novell and SYS V
>> > based OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4, OpenServer 6.0.X and
>> > SCO pre OSR 5 OS's to build and run git.
>> >
>> > Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
>> > ---
>> [...]
>> > git-compat-util.h
>> >
>> > __USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
>> > compiler and/or some SysV based OS's.
>> >
>> > __M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
>> > of the SCO OS's. It is used just like Apple and BSD, both of these
>> > shouldn't have _XOPEN_SOURCE defined.
>>
>> Above info is neither in commit message, not in comment in some file.
>> It would be nice to have it in somewhere, and not only in mailing list
>> archives.
>
> This was from my own copy of the master archive. It is my proposal. I
> thought you had to get an OK from this list before you do a push to the
> main archive. Am I missing something? I am new to this list and the
> proper methods for submitting patches. I thought I was following the
> guidelines from
>
> http://repo.or.cz/w/git.git?a=blob_plain;f=Documentation/SubmittingPatches;hb=HEAD
>
> What am I missing?
It might appear that many people somehow hate your patch and ganging up on
it, and if so I apologize for them and I assure you that they do not mean
ill.
There seem to be some confusion either in the SubmittingPatches document
or the way some suggestions have been given in the recent postings by
people, so let's clear it up first.
There are four different kinds of information you would want to convey
when you send patches to the list. This is just a convention around here,
but the tool is built to support that convention, so you can consider it
the suggested BCP in any git managed projects that employ e-mail based
workflow.
* What the patch is about, a short and sweet summary. This should be
something that can be used to identify the change and it should be easy
to tell what it is about when viewed in "git log --pretty=oneline" or
in "git shortlog" output. This goes to Subject: line.
* Justification for the patch. When anybody views with "git show" the
change after it gets committed, "how" the patch changes can be seen,
but what cannot be easily seen is "why", and the commit message is the
place to describe it. This takes various forms, depending on the
nature of the patch:
* For a fix, describe how the status-quo is broken, what the desired
behaviour should be, and discuss and defend why you chose this
specific approach to fix among other possible avenues. E.g. "If you
use this and that option together, the command does this, which is
not correct. It should do that instead. For that, we introduce
helper function X and Y use them in each codepaths. We could instead
use a single helper that does X or Y depending on an option but these
two codepaths are likely to evolve into doing even more different
things, and using separate functions would be cleaner."
* For an enhancement, describe in what situation the new feature is
useful, defend why that use case is worth supporting, state how
awkward (or perhaps impossible) to do the same thing is with the
current set of features, and discuss and defend why you chose this
specific approach to fix the awkwardness among other possibilities.
E.g. "This adds a new feature X that works like this. When you have
Y and want to arrive at Z, with the current set of commands you would
need to do W, but...".
The point is to help people, who later wonder why the change was made
and on what basis the author thought the change was necessary and/or
sufficient back then when the change was made, understand the context.
This comes at the beginning of the e-mail message, and is concluded by
S-o-b line(s).
* Supporting material that makes it easy to understand the particular
iteration of the patch in the context of review discussion, things like
"Compared to the previous round, I changed this and that, thanks to
comments from X and Y." Because only the final iteration will get
committed in the final history, it does not make sense to include such
information in the commit message. This comes after the commit log
message, and a single three-dash line is used to separate this part
from the commit log message.
* The change itself, aka "patch". This comes at the end of the message.
Let's look at the pieces you have after --- (the first one is the only one
that counts).
Makefile
Add changes for System V, UnixWare, SCO OS's
This is something poeple can find out and guess by looking at the patch
itself, and is unnecessary, not even as supporting material.
__USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
compiler and/or some SysV based OS's.
__M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
of the SCO OS's. It is used just like Apple and BSD, both of these
shouldn't have _XOPEN_SOURCE defined.
These are valuable clues to anybody who is unfamiliar with (and/or do not
have an easy access to) these systems. When people later want to touch
git-compat-util.h around the place where !defined(__USLC__) is used, they
would run "git blame" (or perhaps "git log -S__USLC__") to find your
commit that modified this line, and by looking at the commit log message
why you added these symbols on the #if line. It would help protect your
changes from begin broken by them if you help them understand why these
are there, and the above two paragraphs should definitely go to the commit
log message. They are not mere supporting material for this review cycle
alone.
"..., both of these shouldn't have" however could even be more helpful if
it was stated like "On these platforms, defining _XOPEN_SOURCE hides
definitions of X, Y and Z that we use, which is not what we want.", for
people who would want to know what specific breakage the change addresses.
It would change "Ok, somebody with SCO systems says this patch fixes
things for him" to "I see, if _XOPEN_SOURCE over there makes *that*
function unavailable, then we definitely shouldn't have _XOPEN_SOURCE
defined at this point of the header file". IOW, it makes "Ok, I trust the
guy's judgement, even though the details are fuzzy to me" into "Ok, I
agree with his judgement".
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] Port to 12 other Platforms.
2008-06-08 18:52 ` [PATCH] Port to 12 other Platforms Junio C Hamano
@ 2008-06-08 19:31 ` Boyd Lynn Gerber
2008-06-08 20:47 ` Boyd Lynn Gerber
1 sibling, 0 replies; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 19:31 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jakub Narebski, Git List
On Sun, 8 Jun 2008, Junio C Hamano wrote:
> Boyd Lynn Gerber <gerberb@zenez.com> writes:
> > On Sun, 8 Jun 2008, Jakub Narebski wrote:
> > This was from my own copy of the master archive. It is my proposal. I
> > thought you had to get an OK from this list before you do a push to the
> > main archive. Am I missing something? I am new to this list and the
> > proper methods for submitting patches. I thought I was following the
> > guidelines from
> >
> > http://repo.or.cz/w/git.git?a=blob_plain;f=Documentation/SubmittingPatches;hb=HEAD
> >
> > What am I missing?
>
> It might appear that many people somehow hate your patch and ganging up
> on it, and if so I apologize for them and I assure you that they do not
> mean ill.
This list has been very good. The problem comes from other lists and
personal assualts on my domain.
> There seem to be some confusion either in the SubmittingPatches document
> or the way some suggestions have been given in the recent postings by
> people, so let's clear it up first.
Yes, I was a bit confused but the docs/email/IRC. I really apperciate the
message below. I really want to comply with the rules of this list and
make sure my changes make it into the master/core source.
...
> * For an enhancement, describe in what situation the new feature is
> useful, defend why that use case is worth supporting, state how
> awkward (or perhaps impossible) to do the same thing is with the
> current set of features, and discuss and defend why you chose this
> specific approach to fix the awkwardness among other possibilities.
> E.g. "This adds a new feature X that works like this. When you have
> Y and want to arrive at Z, with the current set of commands you would
> need to do W, but...".
>
> The point is to help people, who later wonder why the change was made
> and on what basis the author thought the change was necessary and/or
> sufficient back then when the change was made, understand the context.
>
> This comes at the beginning of the e-mail message, and is concluded by
> S-o-b line(s).
I agree. I am not sure on some things but I will ask more later.
> * Supporting material that makes it easy to understand the particular
> iteration of the patch in the context of review discussion, things like
> "Compared to the previous round, I changed this and that, thanks to
> comments from X and Y." Because only the final iteration will get
> committed in the final history, it does not make sense to include such
> information in the commit message. This comes after the commit log
> message, and a single three-dash line is used to separate this part
> from the commit log message.
>
> * The change itself, aka "patch". This comes at the end of the message.
...
> __USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
> compiler and/or some SysV based OS's.
>
> __M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
> of the SCO OS's. It is used just like Apple and BSD, both of these
> shouldn't have _XOPEN_SOURCE defined.
>
> These are valuable clues to anybody who is unfamiliar with (and/or do
> not have an easy access to) these systems. When people later want to
> touch git-compat-util.h around the place where !defined(__USLC__) is
> used, they would run "git blame" (or perhaps "git log -S__USLC__") to
> find your commit that modified this line, and by looking at the commit
> log message why you added these symbols on the #if line. It would help
> protect your changes from begin broken by them if you help them
> understand why these are there, and the above two paragraphs should
> definitely go to the commit log message. They are not mere supporting
> material for this review cycle alone.
I will have to find all this information. It took me 2 months in my
personal time to find and fix them. I will have to get back on this
below.
> "..., both of these shouldn't have" however could even be more helpful
> if it was stated like "On these platforms, defining _XOPEN_SOURCE hides
> definitions of X, Y and Z that we use, which is not what we want.", for
> people who would want to know what specific breakage the change
> addresses.
>
> It would change "Ok, somebody with SCO systems says this patch fixes
> things for him" to "I see, if _XOPEN_SOURCE over there makes *that*
> function unavailable, then we definitely shouldn't have _XOPEN_SOURCE
> defined at this point of the header file". IOW, it makes "Ok, I trust
> the guy's judgement, even though the details are fuzzy to me" into "Ok,
> I agree with his judgement".
Thanks, more later when time permits.
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Port to 12 other Platforms.
2008-06-08 18:52 ` [PATCH] Port to 12 other Platforms Junio C Hamano
2008-06-08 19:31 ` Boyd Lynn Gerber
@ 2008-06-08 20:47 ` Boyd Lynn Gerber
2008-06-08 21:19 ` Junio C Hamano
1 sibling, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 20:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jakub Narebski, Git List
On Sun, 8 Jun 2008, Junio C Hamano wrote:
> * Justification for the patch. When anybody views with "git show" the
> change after it gets committed, "how" the patch changes can be seen,
> but what cannot be easily seen is "why", and the commit message is the
> place to describe it. This takes various forms, depending on the
> nature of the patch:
>
> * For a fix, describe how the status-quo is broken, what the desired
> behaviour should be, and discuss and defend why you chose this
> specific approach to fix among other possible avenues. E.g. "If you
> use this and that option together, the command does this, which is
> not correct. It should do that instead. For that, we introduce
> helper function X and Y use them in each codepaths. We could instead
> use a single helper that does X or Y depending on an option but these
> two codepaths are likely to evolve into doing even more different
> things, and using separate functions would be cleaner."
>
> * For an enhancement, describe in what situation the new feature is
> useful, defend why that use case is worth supporting, state how
> awkward (or perhaps impossible) to do the same thing is with the
> current set of features, and discuss and defend why you chose this
> specific approach to fix the awkwardness among other possibilities.
> E.g. "This adds a new feature X that works like this. When you have
> Y and want to arrive at Z, with the current set of commands you would
> need to do W, but...".
...
> "..., both of these shouldn't have" however could even be more helpful if
> it was stated like "On these platforms, defining _XOPEN_SOURCE hides
> definitions of X, Y and Z that we use, which is not what we want.", for
> people who would want to know what specific breakage the change addresses.
>
> It would change "Ok, somebody with SCO systems says this patch fixes
> things for him" to "I see, if _XOPEN_SOURCE over there makes *that*
> function unavailable, then we definitely shouldn't have _XOPEN_SOURCE
> defined at this point of the header file". IOW, it makes "Ok, I trust the
> guy's judgement, even though the details are fuzzy to me" into "Ok, I
> agree with his judgement".
So the patch should be
From: Boyd Lynn Gerber <gerberb@zenez.com>
Date: Sun, 8 Jun 2008 11:41:46 -0600
[PATCH] Port to 12 other Platforms.
This patch adds support to compile and run git on 12 additional platforms.
The platforms are based on UNIX Systems Labs (USL)/Novell/SYS V code base.
The most common are Novell UnixWare 2.X.X, SCO UnixWare 7.X.X,
OpenServer 5.0.X, OpenServer 6.0.X, and SCO pre OSR 5 platforms.
This is from
# 1 "/usr/include/netinet/tcp_f.h"
The problem is that git source has blocked some typedefs
by excluding certain <sys/types.h> content.
Looking at the the various platform header, I see around line 450
#if defined(_KERNEL) || !defined(_POSIX_SOURCE) \
&& !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
The git source is covering the u_short typedef line and other typedefs
are also covered in the platforms. They all lead back to the above
which comes from
git-compat-util.h
about line 66. I had to make the following changes
#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
The _XOPEN_SOURCE hides many typedefs.
__USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
compiler and/or some SysV based OS's.
__M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
of the SCO OS's. It is used just like Apple and BSD, both of these
shouldn't have _XOPEN_SOURCE defined.
This is with suggestions and modifications from
Daniel Barkalow <barkalow@iabervon.org>
Junio C Hamano <gitster@pobox.com>
Thomas Harning <harningt@gmail.com>
Jeremy Maitin-Shepard <jbms@cmu.edu>
Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
---
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
---
git-compat-util.h
__USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
compiler and/or some SysV based OS's.
__M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
of the SCO OS's. It is used just like Apple and BSD, both of these
shouldn't have _XOPEN_SOURCE defined.
diff --git a/Makefile b/Makefile
index cce5a6e..026de2f 100644
--- a/Makefile
+++ b/Makefile
@@ -564,6 +564,45 @@ endif
ifeq ($(uname_S),GNU/kFreeBSD)
NO_STRLCPY = YesPlease
endif
+ifeq ($(uname_S),UnixWare)
+ CC=cc
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/local/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ BASIC_CFLAGS += -Kthread
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ INSTALL = ginstall
+ TAR = gtar
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+endif
+ifeq ($(uname_S),SCO_SV)
+ ifeq ($(uname_R),3.2)
+ CFLAGS = -O2
+ endif
+ ifeq ($(uname_R),5)
+ CC=cc
+ BASIC_CFLAGS += -Kthread
+ endif
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+ INSTALL = ginstall
+ TAR = gtar
+endif
ifeq ($(uname_S),Darwin)
NEEDS_SSL_WITH_CRYPTO = YesPlease
NEEDS_LIBICONV = YesPlease
diff --git a/git-compat-util.h b/git-compat-util.h
index 01c4045..c04e8ba 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -39,7 +39,7 @@
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
--
1.5.2.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH] Port to 12 other Platforms.
2008-06-08 20:47 ` Boyd Lynn Gerber
@ 2008-06-08 21:19 ` Junio C Hamano
2008-06-08 21:36 ` [PATCH] version 0001 " Boyd Lynn Gerber
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Junio C Hamano @ 2008-06-08 21:19 UTC (permalink / raw)
To: Boyd Lynn Gerber; +Cc: Jakub Narebski, Git List
Boyd Lynn Gerber <gerberb@zenez.com> writes:
> So the patch should be
> ...
Thanks.
I'll apply, but I'd reword the part on _XOPEN_SOURCE like this:
Looking at the the various platform headers, I see around line 450:
#if defined(_KERNEL) || !defined(_POSIX_SOURCE) \
&& !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
which hides u_short and other typedefs that other header files on these
platforms depend on. With _XOPEN_SOURCE defined, sources that include
system header files that depend on the typedefs such as u_short cannot be
compiled on these platforms.
Honestly, I'd have to say that such platform header files are buggy ;-)
If they want to use u_short and other custom types for their internal use,
that is understandable and perfectly fine, and if they want to hide these
names when _POSIX or _XOPEN is defined because you are not supposed to
contaminate the namespace, that is also sensible, but at the same time you
(not you, Boyd, but whoever developed the system header files) should have
taken an alternate measure (perhaps by using __u_short or something) not
to break the features they declare in the other header files of their own.
And not defining _XOPEN nor _POSIX would be a reasonable workaround to
the problem on such systems.
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH] version 0001 Port to 12 other Platforms.
2008-06-08 21:19 ` Junio C Hamano
@ 2008-06-08 21:36 ` Boyd Lynn Gerber
2008-06-08 21:37 ` [PATCH] progress.c: avoid use of dynamic-sized array Boyd Lynn Gerber
2008-06-08 21:49 ` [PATCH] Port to 12 other Platforms Boyd Lynn Gerber
2 siblings, 0 replies; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 21:36 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jakub Narebski, Git List
This patch adds support to compile and run git on 12 additional platforms.
The platforms are based on UNIX Systems Labs (USL)/Novell/SYS V code base.
The most common are Novell UnixWare 2.X.X, SCO UnixWare 7.X.X,
OpenServer 5.0.X, OpenServer 6.0.X, and SCO pre OSR 5 platforms.
This is from
The problem is that git source has blocked some typedefs
by excluding certain <sys/types.h> content.
Looking at the the various platform header, I see around line 450
&& !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
which hides u_short and other typedefs that other header files on these
platforms dependon. With _XOPEN_SOURCE defined, sources that include
system header files that depend on the typedefs such as u_short cannot
be compiled on these platforms.
They all lead back to about line 66 in git-compat-util.h
I had to make the following changes
ned(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 fo
r S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
The _XOPEN_SOURCE hides many typedefs.
__USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
compiler and/or some SysV based OS's.
__M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
of the SCO OS's. It is used just like Apple and BSD, both of these
shouldn't have _XOPEN_SOURCE defined.
This is with suggestions and modifications from
Daniel Barkalow <barkalow@iabervon.org>
Junio C Hamano <gitster@pobox.com>
Thomas Harning <harningt@gmail.com>
Jeremy Maitin-Shepard <jbms@cmu.edu>
Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
---
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
---
git-compat-util.h
__USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
compiler and/or some SysV based OS's.
__M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
of the SCO OS's. It is used just like Apple and BSD, both of these
shouldn't have _XOPEN_SOURCE defined.
diff --git a/Makefile b/Makefile
index cce5a6e..026de2f 100644
--- a/Makefile
+++ b/Makefile
@@ -564,6 +564,45 @@ endif
ifeq ($(uname_S),GNU/kFreeBSD)
NO_STRLCPY = YesPlease
endif
+ifeq ($(uname_S),UnixWare)
+ CC=cc
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/local/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ BASIC_CFLAGS += -Kthread
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ INSTALL = ginstall
+ TAR = gtar
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+endif
+ifeq ($(uname_S),SCO_SV)
+ ifeq ($(uname_R),3.2)
+ CFLAGS = -O2
+ endif
+ ifeq ($(uname_R),5)
+ CC=cc
+ BASIC_CFLAGS += -Kthread
+ endif
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+ INSTALL = ginstall
+ TAR = gtar
+endif
ifeq ($(uname_S),Darwin)
NEEDS_SSL_WITH_CRYPTO = YesPlease
NEEDS_LIBICONV = YesPlease
diff --git a/git-compat-util.h b/git-compat-util.h
index 01c4045..c04e8ba 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -39,7 +39,7 @@
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
--
1.5.2.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH] progress.c: avoid use of dynamic-sized array
2008-06-08 21:19 ` Junio C Hamano
2008-06-08 21:36 ` [PATCH] version 0001 " Boyd Lynn Gerber
@ 2008-06-08 21:37 ` Boyd Lynn Gerber
2008-06-08 21:49 ` [PATCH] Port to 12 other Platforms Boyd Lynn Gerber
2 siblings, 0 replies; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 21:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jakub Narebski, Git List
Dynamically sized arrays are gcc and C99 construct. Using them hurts
portability to older compilers, although using them is nice in this case
it is not desirable. This patch removes the only use of the construct
in stop_progress_msg(); the function is about writing out a single line
of a message, and the existing callers of this function feed messages
of only bounded size anyway, so use of dynamic array is simply overkill.
This is with suggestions from
Daniel Barkalow <barkalow@iabervon.org>
Junio C Hamano <gitster@pobox.com>
Thomas Harning <harningt@gmail.com>
Jeremy Maitin-Shepard <jbms@cmu.edu>
Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
---
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
---
progress.c
Changes for older OS's that do not support the current methods for
allocation of memory.
diff --git a/progress.c b/progress.c
index d19f80c..55a8687 100644
--- a/progress.c
+++ b/progress.c
@@ -241,16 +241,21 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
*p_progress = NULL;
if (progress->last_value != -1) {
/* Force the last update */
- char buf[strlen(msg) + 5];
+ char buf[128], *bufp;
+ size_t len = strlen(msg) + 5;
struct throughput *tp = progress->throughput;
+
+ bufp = (len < sizeof(buf)) ? buf : xmalloc(len + 1);
if (tp) {
unsigned int rate = !tp->avg_misecs ? 0 :
tp->avg_bytes / tp->avg_misecs;
throughput_string(tp, tp->curr_total, rate);
}
progress_update = 1;
- sprintf(buf, ", %s.\n", msg);
- display(progress, progress->last_value, buf);
+ sprintf(bufp, ", %s.\n", msg);
+ display(progress, progress->last_value, bufp);
+ if (buf != bufp)
+ free(bufp);
}
clear_progress_signal();
free(progress->throughput);
--
1.5.2.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH] Port to 12 other Platforms.
2008-06-08 21:19 ` Junio C Hamano
2008-06-08 21:36 ` [PATCH] version 0001 " Boyd Lynn Gerber
2008-06-08 21:37 ` [PATCH] progress.c: avoid use of dynamic-sized array Boyd Lynn Gerber
@ 2008-06-08 21:49 ` Boyd Lynn Gerber
2 siblings, 0 replies; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 21:49 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jakub Narebski, Git List
On Sun, 8 Jun 2008, Junio C Hamano wrote:
> Honestly, I'd have to say that such platform header files are buggy ;-)
I agree, but getting various things changed is near impossible.
Especially since they are either in a retired or unmaintained state.
Although a few are still release updated products, they refuse to change
them citeing backword compatibility.
> If they want to use u_short and other custom types for their internal use,
> that is understandable and perfectly fine, and if they want to hide these
> names when _POSIX or _XOPEN is defined because you are not supposed to
> contaminate the namespace, that is also sensible, but at the same time you
> (not you, Boyd, but whoever developed the system header files) should have
> taken an alternate measure (perhaps by using __u_short or something) not
> to break the features they declare in the other header files of their own.
I agree +1
> And not defining _XOPEN nor _POSIX would be a reasonable workaround to
> the problem on such systems.
Agreed.
Thanks,
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] This patch is to allow 12 different OS's to compile and run git.
@ 2008-06-06 19:34 Boyd Lynn Gerber
2008-06-06 19:39 ` Jeremy Maitin-Shepard
0 siblings, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-06 19:34 UTC (permalink / raw)
To: Git List
This patch has patches to
Makefile
git-compat-util.h
progress.c
This patch allows some older OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4,
and OpenServer 6.0.X to build and run git.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
diff --git a/Makefile b/Makefile
index cce5a6e..6df008a 100644
--- a/Makefile
+++ b/Makefile
@@ -165,6 +165,20 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
# CFLAGS and LDFLAGS are for the users to override from the command line.
CFLAGS = -g -O2 -Wall
+ifeq ($(uname_S),SCO_SV)
+ ifeq ($(uname_R),3.2)
+# CFLAGS = -g -O2
+ CFLAGS = -g
+ endif
+ ifeq ($(uname_R),5)
+ CFLAGS = -g -O2 -Wall
+# CFLAGS = -g -O2
+ endif
+endif
+ifeq ($(uname_S),UnixWare)
+ CFLAGS = -g -O2 -Wall
+# CFLAGS = -g -O2
+endif
LDFLAGS =
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
@@ -207,7 +221,8 @@ GITWEB_SITE_FOOTER =
export prefix bindir gitexecdir sharedir template_dir htmldir sysconfdir
-CC = gcc
+#CC = gcc
+CC = "cc"
AR = ar
RM = rm -f
TAR = tar
@@ -564,6 +579,42 @@ endif
ifeq ($(uname_S),GNU/kFreeBSD)
NO_STRLCPY = YesPlease
endif
+ifeq ($(uname_S),UnixWare)
+ NEEDS_SOCKET = YesPlease
+# NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/local/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+# BASIC_CFLAGS += -E -H
+ BASIC_CFLAGS += -Kalloca -Kthread
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ INSTALL = ginstall
+ TAR = gtar
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+endif
+ifeq ($(uname_S),SCO_SV)
+ NEEDS_SOCKET = YesPlease
+# NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/bin/bash
+ NO_IPV6 = YesPlease
+# NO_HSTRERROR = YesPlease
+# BASIC_CFLAGS += -E -H
+ ifeq ($(uname_R),5)
+ BASIC_CFLAGS += -Kalloca -Kthread
+ endif
+# BASIC_CFLAGS += -I/usr/local/include
+# BASIC_LDFLAGS += -L/usr/local/lib
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+ INSTALL = ginstall
+ TAR = gtar
+endif
ifeq ($(uname_S),Darwin)
NEEDS_SSL_WITH_CRYPTO = YesPlease
NEEDS_LIBICONV = YesPlease
diff --git a/git-compat-util.h b/git-compat-util.h
index 01c4045..b57041c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -39,7 +39,7 @@
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__ ) && !defined(__USLC__) && !defined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
@@ -89,6 +89,10 @@
#include <grp.h>
#define _ALL_SOURCE 1
#endif
+#if defined(__USLC__)
+#undef _XOPEN_SOURCE
+#include <grp.h>
+#endif
#ifndef NO_ICONV
#include <iconv.h>
@@ -206,12 +210,15 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
#endif
#ifdef FREAD_READS_DIRECTORIES
+#if !defined (__USLC__)
#ifdef fopen
#undef fopen
#endif
#define fopen(a,b) git_fopen(a,b)
extern FILE *git_fopen(const char*, const char*);
#endif
+#endif
+#endif
#ifdef SNPRINTF_RETURNS_BOGUS
#define snprintf git_snprintf
diff --git a/progress.c b/progress.c
index d19f80c..11a0841 100644
--- a/progress.c
+++ b/progress.c
@@ -241,7 +241,8 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
*p_progress = NULL;
if (progress->last_value != -1) {
/* Force the last update */
- char buf[strlen(msg) + 5];
+ /* char buf[strlen(msg) + 5]; */
+ char *buf = malloc (strlen(msg) + 5 );
struct throughput *tp = progress->throughput;
if (tp) {
unsigned int rate = !tp->avg_misecs ? 0 :
--
1.5.2.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH] This patch is to allow 12 different OS's to compile and run git.
2008-06-06 19:34 [PATCH] This patch is to allow 12 different OS's to compile and run git Boyd Lynn Gerber
@ 2008-06-06 19:39 ` Jeremy Maitin-Shepard
2008-06-06 20:02 ` Boyd Lynn Gerber
0 siblings, 1 reply; 16+ messages in thread
From: Jeremy Maitin-Shepard @ 2008-06-06 19:39 UTC (permalink / raw)
To: Boyd Lynn Gerber; +Cc: Git List
Boyd Lynn Gerber <gerberb@zenez.com> writes:
[snip]
> diff --git a/progress.c b/progress.c
> index d19f80c..11a0841 100644
> --- a/progress.c
> +++ b/progress.c
> @@ -241,7 +241,8 @@ void stop_progress_msg(struct progress **p_progress, const
> char *msg)
> *p_progress = NULL;
> if (progress->last_value != -1) {
> /* Force the last update */
> - char buf[strlen(msg) + 5];
> + /* char buf[strlen(msg) + 5]; */
> + char *buf = malloc (strlen(msg) + 5 );
This change will result in the allocated memory being leaked, which is
probably not correct. Perhaps change it to alloca instead.
--
Jeremy Maitin-Shepard
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] This patch is to allow 12 different OS's to compile and run git.
2008-06-06 19:39 ` Jeremy Maitin-Shepard
@ 2008-06-06 20:02 ` Boyd Lynn Gerber
2008-06-06 23:08 ` Junio C Hamano
0 siblings, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-06 20:02 UTC (permalink / raw)
To: Thomas Harning, Jeremy Maitin-Shepard; +Cc: Git List
On Fri, 6 Jun 2008, Jeremy Maitin-Shepard wrote:
> This change will result in the allocated memory being leaked, which is
> probably not correct. Perhaps change it to alloca instead.
OK below is a new version with the suggestions.
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
---------------------------------New-Submittal-------------------------
From 554045d534dfa89f01fc6b0a819c73ad660f02fb Fri Jun 6 14:01:55 MDT 2008
From: Boyd Lynn Gerber <gerberb@zenez.com>
Date: Fri, 6 Jun 2008 13:58:04 -0600
Subject: [PATCH] This patch is to allow 12 different OS's to compile and run git.
This patch has patches to
Makefile
git-compat-util.h
progress.c
This patch allows some older OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4,
and OpenServer 6.0.X to build and run git.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
diff --git a/Makefile b/Makefile
index cce5a6e..6df008a 100644
--- a/Makefile
+++ b/Makefile
@@ -165,6 +165,20 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
# CFLAGS and LDFLAGS are for the users to override from the command line.
CFLAGS = -g -O2 -Wall
+ifeq ($(uname_S),SCO_SV)
+ ifeq ($(uname_R),3.2)
+# CFLAGS = -g -O2
+ CFLAGS = -g
+ endif
+ ifeq ($(uname_R),5)
+ CFLAGS = -g -O2 -Wall
+# CFLAGS = -g -O2
+ endif
+endif
+ifeq ($(uname_S),UnixWare)
+ CFLAGS = -g -O2 -Wall
+# CFLAGS = -g -O2
+endif
LDFLAGS =
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
@@ -207,7 +221,8 @@ GITWEB_SITE_FOOTER =
export prefix bindir gitexecdir sharedir template_dir htmldir sysconfdir
-CC = gcc
+#CC = gcc
+CC = "cc"
AR = ar
RM = rm -f
TAR = tar
@@ -564,6 +579,42 @@ endif
ifeq ($(uname_S),GNU/kFreeBSD)
NO_STRLCPY = YesPlease
endif
+ifeq ($(uname_S),UnixWare)
+ NEEDS_SOCKET = YesPlease
+# NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/local/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+# BASIC_CFLAGS += -E -H
+ BASIC_CFLAGS += -Kalloca -Kthread
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ INSTALL = ginstall
+ TAR = gtar
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+endif
+ifeq ($(uname_S),SCO_SV)
+ NEEDS_SOCKET = YesPlease
+# NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/bin/bash
+ NO_IPV6 = YesPlease
+# NO_HSTRERROR = YesPlease
+# BASIC_CFLAGS += -E -H
+ ifeq ($(uname_R),5)
+ BASIC_CFLAGS += -Kalloca -Kthread
+ endif
+# BASIC_CFLAGS += -I/usr/local/include
+# BASIC_LDFLAGS += -L/usr/local/lib
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+ INSTALL = ginstall
+ TAR = gtar
+endif
ifeq ($(uname_S),Darwin)
NEEDS_SSL_WITH_CRYPTO = YesPlease
NEEDS_LIBICONV = YesPlease
diff --git a/git-compat-util.h b/git-compat-util.h
index 01c4045..f27aea3 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -39,7 +39,8 @@
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !de
+fined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
diff --git a/progress.c b/progress.c
index d19f80c..295c4e3 100644
--- a/progress.c
+++ b/progress.c
@@ -241,7 +241,8 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
*p_progress = NULL;
if (progress->last_value != -1) {
/* Force the last update */
- char buf[strlen(msg) + 5];
+ /* char buf[strlen(msg) + 5]; */
+ char *buf = alloca (strlen(msg) + 5 );
struct throughput *tp = progress->throughput;
if (tp) {
unsigned int rate = !tp->avg_misecs ? 0 :
--
1.5.2.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH] This patch is to allow 12 different OS's to compile and run git.
2008-06-06 20:02 ` Boyd Lynn Gerber
@ 2008-06-06 23:08 ` Junio C Hamano
2008-06-06 23:23 ` Boyd Lynn Gerber
0 siblings, 1 reply; 16+ messages in thread
From: Junio C Hamano @ 2008-06-06 23:08 UTC (permalink / raw)
To: Boyd Lynn Gerber; +Cc: Thomas Harning, Jeremy Maitin-Shepard, Git List
Boyd Lynn Gerber <gerberb@zenez.com> writes:
> diff --git a/progress.c b/progress.c
> index d19f80c..295c4e3 100644
> --- a/progress.c
> +++ b/progress.c
> @@ -241,7 +241,8 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
> *p_progress = NULL;
> if (progress->last_value != -1) {
> /* Force the last update */
> - char buf[strlen(msg) + 5];
> + /* char buf[strlen(msg) + 5]; */
> + char *buf = alloca (strlen(msg) + 5 );
> struct throughput *tp = progress->throughput;
> if (tp) {
> unsigned int rate = !tp->avg_misecs ? 0 :
I do not know the situation over there these days, but I have a distant
but bitter memory of having to deal with AIX X-<. It insisted that
inclusion of <alloca.h> to be the very first thing in the source before
anything else. I would want to keep alloca() out of the codebase without
very good reason. Not that I care much about portability to AIX, but not
having to worry about alloca() unless necessary is a good thing.
I do not think progress_msg() is a good reason to even worrying about a
dynamically sized array. The function is designed to spit out a single
line of message (so the incoming msg is expected to be shorter than 80
chars or so). If you "git grep stop_progress_msg", you will see that
there are only two callers of this function, one in progress.c itself that
says "done", and the other one in index-pack.c that gives a string
formatted into 48-byte buffer.
So we can be lazy and say:
char buf[128];
...
snprintf(buf, sizeof(buf), ", %s.\n", msg)
and be done with it.
If you really wanted to be safe and anal, you could do something like
this, which would be just as efficient and much more straightforward:
progress.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/progress.c b/progress.c
index d19f80c..55a8687 100644
--- a/progress.c
+++ b/progress.c
@@ -241,16 +241,21 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
*p_progress = NULL;
if (progress->last_value != -1) {
/* Force the last update */
- char buf[strlen(msg) + 5];
+ char buf[128], *bufp;
+ size_t len = strlen(msg) + 5;
struct throughput *tp = progress->throughput;
+
+ bufp = (len < sizeof(buf)) ? buf : xmalloc(len + 1);
if (tp) {
unsigned int rate = !tp->avg_misecs ? 0 :
tp->avg_bytes / tp->avg_misecs;
throughput_string(tp, tp->curr_total, rate);
}
progress_update = 1;
- sprintf(buf, ", %s.\n", msg);
- display(progress, progress->last_value, buf);
+ sprintf(bufp, ", %s.\n", msg);
+ display(progress, progress->last_value, bufp);
+ if (buf != bufp)
+ free(bufp);
}
clear_progress_signal();
free(progress->throughput);
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH] This patch is to allow 12 different OS's to compile and run git.
2008-06-06 23:08 ` Junio C Hamano
@ 2008-06-06 23:23 ` Boyd Lynn Gerber
2008-06-07 0:38 ` [PATCH] 0002 " Boyd Lynn Gerber
0 siblings, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-06 23:23 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Thomas Harning, Jeremy Maitin-Shepard, Git List
On Fri, 6 Jun 2008, Junio C Hamano wrote:
> Boyd Lynn Gerber <gerberb@zenez.com> writes:
> > diff --git a/progress.c b/progress.c
> > index d19f80c..295c4e3 100644
> > --- a/progress.c
> > +++ b/progress.c
> > @@ -241,7 +241,8 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
> > *p_progress = NULL;
> > if (progress->last_value != -1) {
> > /* Force the last update */
> > - char buf[strlen(msg) + 5];
> > + /* char buf[strlen(msg) + 5]; */
> > + char *buf = alloca (strlen(msg) + 5 );
> > struct throughput *tp = progress->throughput;
> > if (tp) {
> > unsigned int rate = !tp->avg_misecs ? 0 :
>
> I do not know the situation over there these days, but I have a distant
> but bitter memory of having to deal with AIX X-<. It insisted that
> inclusion of <alloca.h> to be the very first thing in the source before
> anything else. I would want to keep alloca() out of the codebase without
> very good reason. Not that I care much about portability to AIX, but not
> having to worry about alloca() unless necessary is a good thing.
You hit the nail on the head, AIX and any Novell derived Compiler code
requires it. Also the SCO OS's
> I do not think progress_msg() is a good reason to even worrying about a
> dynamically sized array. The function is designed to spit out a single
> line of message (so the incoming msg is expected to be shorter than 80
> chars or so). If you "git grep stop_progress_msg", you will see that
> there are only two callers of this function, one in progress.c itself that
> says "done", and the other one in index-pack.c that gives a string
> formatted into 48-byte buffer.
>
> So we can be lazy and say:
>
> char buf[128];
> ...
> snprintf(buf, sizeof(buf), ", %s.\n", msg)
>
> and be done with it.
I like the idea.
> If you really wanted to be safe and anal, you could do something like
> this, which would be just as efficient and much more straightforward:
>
> progress.c | 11 ++++++++---
> 1 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/progress.c b/progress.c
> index d19f80c..55a8687 100644
> --- a/progress.c
> +++ b/progress.c
> @@ -241,16 +241,21 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
> *p_progress = NULL;
> if (progress->last_value != -1) {
> /* Force the last update */
> - char buf[strlen(msg) + 5];
> + char buf[128], *bufp;
> + size_t len = strlen(msg) + 5;
> struct throughput *tp = progress->throughput;
> +
> + bufp = (len < sizeof(buf)) ? buf : xmalloc(len + 1);
> if (tp) {
> unsigned int rate = !tp->avg_misecs ? 0 :
> tp->avg_bytes / tp->avg_misecs;
> throughput_string(tp, tp->curr_total, rate);
> }
> progress_update = 1;
> - sprintf(buf, ", %s.\n", msg);
> - display(progress, progress->last_value, buf);
> + sprintf(bufp, ", %s.\n", msg);
> + display(progress, progress->last_value, bufp);
> + if (buf != bufp)
> + free(bufp);
> }
> clear_progress_signal();
> free(progress->throughput);
>
>
Thanks for the suggestions. I am making changes based on all the feed
back. I will remove all the debug junk from the final patch. I am
putting options in and out a lot at the moment. Trying to make sure I do
not break anything on the 12 OS's. It is a real pain testing all the
changes on them to make sure I did not break anything.
Thanks,
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] 0002 This patch is to allow 12 different OS's to compile and run git.
2008-06-06 23:23 ` Boyd Lynn Gerber
@ 2008-06-07 0:38 ` Boyd Lynn Gerber
2008-06-07 0:47 ` Daniel Barkalow
0 siblings, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-07 0:38 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Thomas Harning, Jeremy Maitin-Shepard, Git List
>From db0574a7f89bb90b6ce02cd44053f8cec2c454cc
This patch has patches to
Makefile
git-compat-util.h
progress.c
This patch allows some older OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4,
and OpenServer 6.0.X to build and run git. Applied suggestions from list.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
diff --git a/Makefile b/Makefile
index cce5a6e..a0456c8 100644
--- a/Makefile
+++ b/Makefile
@@ -165,6 +165,28 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
# CFLAGS and LDFLAGS are for the users to override from the command line.
CFLAGS = -g -O2 -Wall
+ifeq ($(uname_S),SCO_SV)
+ ifeq ($(uname_R),3.2)
+# Change to -O2 for released version
+# CFLAGS = -O2
+# Debug Version
+ CFLAGS = -g
+ endif
+# For System V based OS's
+ ifeq ($(uname_R),5)
+# For System V based OS's and shared libraries
+ CFLAGS = -g -O2 -Wall
+# Use for Static version
+# CFLAGS = -g -O2
+ endif
+endif
+# For all UnixWare Versions.
+ifeq ($(uname_S),UnixWare)
+# For System V based OS's and shared libraries
+ CFLAGS = -g -O2 -Wall
+# Use for Static version
+# CFLAGS = -g -O2
+endif
LDFLAGS =
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
@@ -564,6 +586,42 @@ endif
ifeq ($(uname_S),GNU/kFreeBSD)
NO_STRLCPY = YesPlease
endif
+ifeq ($(uname_S),UnixWare)
+ CC=cc
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/local/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ BASIC_CFLAGS += -Kalloca -Kthread
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ INSTALL = ginstall
+ TAR = gtar
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+endif
+ifeq ($(uname_S),SCO_SV)
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ ifeq ($(uname_R),5)
+ CC=cc
+ BASIC_CFLAGS += -Kalloca -Kthread
+ endif
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+ INSTALL = ginstall
+ TAR = gtar
+endif
ifeq ($(uname_S),Darwin)
NEEDS_SSL_WITH_CRYPTO = YesPlease
NEEDS_LIBICONV = YesPlease
diff --git a/git-compat-util.h b/git-compat-util.h
index 01c4045..b3cd7b3 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -39,7 +39,12 @@
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+/* Added for __USLC__ for any Novell devrived Compiler and Some Sys V
+ Added _M_UNIX for any XENIX/SCO UNIX/OpenServer less than or equal
+ OpenServer 5.0.7 This is do avoided compiler hell like the other
+ OS's __APPLE__ and __FreeBSD__ */
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !de
+fined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
diff --git a/progress.c b/progress.c
index d19f80c..55a8687 100644
--- a/progress.c
+++ b/progress.c
@@ -241,16 +241,21 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
*p_progress = NULL;
if (progress->last_value != -1) {
/* Force the last update */
- char buf[strlen(msg) + 5];
+ char buf[128], *bufp;
+ size_t len = strlen(msg) + 5;
struct throughput *tp = progress->throughput;
+
+ bufp = (len < sizeof(buf)) ? buf : xmalloc(len + 1);
if (tp) {
unsigned int rate = !tp->avg_misecs ? 0 :
tp->avg_bytes / tp->avg_misecs;
throughput_string(tp, tp->curr_total, rate);
}
progress_update = 1;
- sprintf(buf, ", %s.\n", msg);
- display(progress, progress->last_value, buf);
+ sprintf(bufp, ", %s.\n", msg);
+ display(progress, progress->last_value, bufp);
+ if (buf != bufp)
+ free(bufp);
}
clear_progress_signal();
free(progress->throughput);
--
1.5.2.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH] 0002 This patch is to allow 12 different OS's to compile and run git.
2008-06-07 0:38 ` [PATCH] 0002 " Boyd Lynn Gerber
@ 2008-06-07 0:47 ` Daniel Barkalow
2008-06-07 1:25 ` [PATCH] 0003 " Boyd Lynn Gerber
0 siblings, 1 reply; 16+ messages in thread
From: Daniel Barkalow @ 2008-06-07 0:47 UTC (permalink / raw)
To: Boyd Lynn Gerber
Cc: Junio C Hamano, Thomas Harning, Jeremy Maitin-Shepard, Git List
On Fri, 6 Jun 2008, Boyd Lynn Gerber wrote:
> From db0574a7f89bb90b6ce02cd44053f8cec2c454cc
>
> This patch has patches to
>
> Makefile
> git-compat-util.h
> progress.c
>
> This patch allows some older OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4,
> and OpenServer 6.0.X to build and run git. Applied suggestions from list.
>
> Developer's Certificate of Origin 1.1
>
> By making a contribution to this project, I certify that:
>
> (a) The contribution was created in whole or in part by me and I
> have the right to submit it under the open source license
> indicated in the file; or
>
> (b) The contribution is based upon previous work that, to the best
> of my knowledge, is covered under an appropriate open source
> license and I have the right under that license to submit that
> work with modifications, whether created in whole or in part
> by me, under the same open source license (unless I am
> permitted to submit under a different license), as indicated
> in the file; or
>
> (c) The contribution was provided directly to me by some other
> person who certified (a), (b) or (c) and I have not modified
> it.
>
> (d) I understand and agree that this project and the contribution
> are public and that a record of the contribution (including all
> personal information I submit with it, including my sign-off) is
> maintained indefinitely and may be redistributed consistent with
> this project or the open source license(s) involved.
>
> Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
>
> --
> Boyd Gerber <gerberb@zenez.com>
> ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
>
> diff --git a/Makefile b/Makefile
> index cce5a6e..a0456c8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -165,6 +165,28 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
> # CFLAGS and LDFLAGS are for the users to override from the command line.
>
> CFLAGS = -g -O2 -Wall
> +ifeq ($(uname_S),SCO_SV)
> + ifeq ($(uname_R),3.2)
> +# Change to -O2 for released version
> +# CFLAGS = -O2
> +# Debug Version
> + CFLAGS = -g
> + endif
> +# For System V based OS's
> + ifeq ($(uname_R),5)
> +# For System V based OS's and shared libraries
> + CFLAGS = -g -O2 -Wall
You don't need this, because CFLAGS is already -g -O2 -Wall, since we set
it above and couldn't have changed it.
> +# Use for Static version
> +# CFLAGS = -g -O2
Static libraries don't support -Wall?
> + endif
> +endif
> +# For all UnixWare Versions.
> +ifeq ($(uname_S),UnixWare)
> +# For System V based OS's and shared libraries
> + CFLAGS = -g -O2 -Wall
Again, this just sets it to what it must already be.
You might want to test something the person doing the build can put
somewhere, rather than commenting out the lines you're not using.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] 0003 This patch is to allow 12 different OS's to compile and run git.
2008-06-07 0:47 ` Daniel Barkalow
@ 2008-06-07 1:25 ` Boyd Lynn Gerber
2008-06-07 2:12 ` Junio C Hamano
0 siblings, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-07 1:25 UTC (permalink / raw)
To: Daniel Barkalow
Cc: Junio C Hamano, Thomas Harning, Jeremy Maitin-Shepard, Git List
On Fri, 6 Jun 2008, Daniel Barkalow wrote:
> On Fri, 6 Jun 2008, Boyd Lynn Gerber wrote:
>
> > From db0574a7f89bb90b6ce02cd44053f8cec2c454cc
> >
> > This patch has patches to
> >
> > Makefile
> > git-compat-util.h
> > progress.c
> >
> > This patch allows some older OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4,
> > and OpenServer 6.0.X to build and run git. Applied suggestions from list.
> >
> > Developer's Certificate of Origin 1.1
> >
> > By making a contribution to this project, I certify that:
> >
> > (a) The contribution was created in whole or in part by me and I
> > have the right to submit it under the open source license
> > indicated in the file; or
> >
> > (b) The contribution is based upon previous work that, to the best
> > of my knowledge, is covered under an appropriate open source
> > license and I have the right under that license to submit that
> > work with modifications, whether created in whole or in part
> > by me, under the same open source license (unless I am
> > permitted to submit under a different license), as indicated
> > in the file; or
> >
> > (c) The contribution was provided directly to me by some other
> > person who certified (a), (b) or (c) and I have not modified
> > it.
> >
> > (d) I understand and agree that this project and the contribution
> > are public and that a record of the contribution (including all
> > personal information I submit with it, including my sign-off) is
> > maintained indefinitely and may be redistributed consistent with
> > this project or the open source license(s) involved.
> >
> > Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
> >
> > --
> > Boyd Gerber <gerberb@zenez.com>
> > ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
OK made changes you recommended.
diff --git a/Makefile b/Makefile
index cce5a6e..000bf1f 100644
--- a/Makefile
+++ b/Makefile
@@ -165,6 +165,11 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
# CFLAGS and LDFLAGS are for the users to override from the command line.
CFLAGS = -g -O2 -Wall
+ifeq ($(uname_S),SCO_SV)
+ ifeq ($(uname_R),3.2)
+ CFLAGS = -O2
+ endif
+endif
LDFLAGS =
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
@@ -564,6 +569,42 @@ endif
ifeq ($(uname_S),GNU/kFreeBSD)
NO_STRLCPY = YesPlease
endif
+ifeq ($(uname_S),UnixWare)
+ CC=cc
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/local/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ BASIC_CFLAGS += -Kalloca -Kthread
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ INSTALL = ginstall
+ TAR = gtar
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+endif
+ifeq ($(uname_S),SCO_SV)
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ ifeq ($(uname_R),5)
+ CC=cc
+ BASIC_CFLAGS += -Kalloca -Kthread
+ endif
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+ INSTALL = ginstall
+ TAR = gtar
+endif
ifeq ($(uname_S),Darwin)
NEEDS_SSL_WITH_CRYPTO = YesPlease
NEEDS_LIBICONV = YesPlease
diff --git a/git-compat-util.h b/git-compat-util.h
index 01c4045..b3cd7b3 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -39,7 +39,12 @@
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+/* Added for __USLC__ for any Novell devrived Compiler and Some Sys V
+ Added _M_UNIX for any XENIX/SCO UNIX/OpenServer less than or equal
+ OpenServer 5.0.7 This is do avoided compiler hell like the other
+ OS's __APPLE__ and __FreeBSD__ */
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !de
+fined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
diff --git a/progress.c b/progress.c
index d19f80c..55a8687 100644
--- a/progress.c
+++ b/progress.c
@@ -241,16 +241,21 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
*p_progress = NULL;
if (progress->last_value != -1) {
/* Force the last update */
- char buf[strlen(msg) + 5];
+ char buf[128], *bufp;
+ size_t len = strlen(msg) + 5;
struct throughput *tp = progress->throughput;
+
+ bufp = (len < sizeof(buf)) ? buf : xmalloc(len + 1);
if (tp) {
unsigned int rate = !tp->avg_misecs ? 0 :
tp->avg_bytes / tp->avg_misecs;
throughput_string(tp, tp->curr_total, rate);
}
progress_update = 1;
- sprintf(buf, ", %s.\n", msg);
- display(progress, progress->last_value, buf);
+ sprintf(bufp, ", %s.\n", msg);
+ display(progress, progress->last_value, bufp);
+ if (buf != bufp)
+ free(bufp);
}
clear_progress_signal();
free(progress->throughput);
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH] 0003 This patch is to allow 12 different OS's to compile and run git.
2008-06-07 1:25 ` [PATCH] 0003 " Boyd Lynn Gerber
@ 2008-06-07 2:12 ` Junio C Hamano
2008-06-07 2:40 ` Boyd Lynn Gerber
0 siblings, 1 reply; 16+ messages in thread
From: Junio C Hamano @ 2008-06-07 2:12 UTC (permalink / raw)
To: Boyd Lynn Gerber
Cc: Daniel Barkalow, Thomas Harning, Jeremy Maitin-Shepard, Git List
Boyd Lynn Gerber <gerberb@zenez.com> writes:
> On Fri, 6 Jun 2008, Daniel Barkalow wrote:
>
>> On Fri, 6 Jun 2008, Boyd Lynn Gerber wrote:
>>
>> > From db0574a7f89bb90b6ce02cd44053f8cec2c454cc
>> >
>> > This patch has patches to
>> >
>> > Makefile
>> > git-compat-util.h
>> > progress.c
>> >
>> > This patch allows some older OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4,
>> > and OpenServer 6.0.X to build and run git. Applied suggestions from list.
>> >
>> > Developer's Certificate of Origin 1.1
>> >
>> > By making a contribution to this project, I certify that:
>> >
>> > (a) The contribution was created in whole or in part by me and I
>> > have the right to submit it under the open source license
>> > indicated in the file; or
>> >
>> > (b) The contribution is based upon previous work that, to the best
>> > of my knowledge, is covered under an appropriate open source
>> > license and I have the right under that license to submit that
>> > work with modifications, whether created in whole or in part
>> > by me, under the same open source license (unless I am
>> > permitted to submit under a different license), as indicated
>> > in the file; or
>> >
>> > (c) The contribution was provided directly to me by some other
>> > person who certified (a), (b) or (c) and I have not modified
>> > it.
>> >
>> > (d) I understand and agree that this project and the contribution
>> > are public and that a record of the contribution (including all
>> > personal information I submit with it, including my sign-off) is
>> > maintained indefinitely and may be redistributed consistent with
>> > this project or the open source license(s) involved.
>> >
>> > Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
>> >
>> > --
>> > Boyd Gerber <gerberb@zenez.com>
>> > ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
>
> OK made changes you recommended.
I guess the patch text itself seems to be getting reasonable, and perhaps
the next few rounds would be to fix the commit log message ;-)
> diff --git a/Makefile b/Makefile
> index cce5a6e..000bf1f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -165,6 +165,11 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
> # CFLAGS and LDFLAGS are for the users to override from the command line.
>
> CFLAGS = -g -O2 -Wall
> +ifeq ($(uname_S),SCO_SV)
> + ifeq ($(uname_R),3.2)
> + CFLAGS = -O2
> + endif
> +endif
What makes SCO_SV so special that this platform specific tweak does not
live in "Platform specific tweaks" section like others?
CFLAGS is for the user to oerride from the command line, and I do not very
much like any tweaks in Makefile. I'd suggest dropping this hunk.
> @@ -564,6 +569,42 @@ endif
> ifeq ($(uname_S),GNU/kFreeBSD)
> NO_STRLCPY = YesPlease
> endif
> +ifeq ($(uname_S),UnixWare)
> + CC=cc
s/=/ = /; you have similar one elsewhere.
> + NEEDS_SOCKET = YesPlease
> + NEEDS_NSL = YesPlease
> + NEEDS_SSL_WITH_CRYPTO = YesPlease
> + NEEDS_LIBICONV = YesPlease
> + SHELL_PATH = /usr/local/bin/bash
> + NO_IPV6 = YesPlease
> + NO_HSTRERROR = YesPlease
> + BASIC_CFLAGS += -Kalloca -Kthread
I am only guessing what -Kalloca is, but is it for alloca(3), and if so do
you still need it?
> diff --git a/git-compat-util.h b/git-compat-util.h
> index 01c4045..b3cd7b3 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -39,7 +39,12 @@
> /* Approximation of the length of the decimal representation of this type. */
> #define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
>
> -#if !defined(__APPLE__) && !defined(__FreeBSD__)
> +/* Added for __USLC__ for any Novell devrived Compiler and Some Sys V
> + Added _M_UNIX for any XENIX/SCO UNIX/OpenServer less than or equal
> + OpenServer 5.0.7 This is do avoided compiler hell like the other
> + OS's __APPLE__ and __FreeBSD__ */
We generally do not do changelog inside the code comment.
> +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !de
> +fined(_M_UNIX)
Linewrapped patch? It is very curious that you have + in front of "fined(_M_UNIX)".
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] 0003 This patch is to allow 12 different OS's to compile and run git.
2008-06-07 2:12 ` Junio C Hamano
@ 2008-06-07 2:40 ` Boyd Lynn Gerber
2008-06-07 3:40 ` Daniel Barkalow
0 siblings, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-07 2:40 UTC (permalink / raw)
To: Junio C Hamano
Cc: Daniel Barkalow, Thomas Harning, Jeremy Maitin-Shepard, Git List
On Fri, 6 Jun 2008, Junio C Hamano wrote:
> Boyd Lynn Gerber <gerberb@zenez.com> writes:
> I guess the patch text itself seems to be getting reasonable, and perhaps
> the next few rounds would be to fix the commit log message ;-)
I have it the same, without all the >> as I first posted, but I agree.
that it needs some tweaking.
> > diff --git a/Makefile b/Makefile
> > index cce5a6e..000bf1f 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -165,6 +165,11 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
> > # CFLAGS and LDFLAGS are for the users to override from the command line.
> >
> > CFLAGS = -g -O2 -Wall
> > +ifeq ($(uname_S),SCO_SV)
> > + ifeq ($(uname_R),3.2)
> > + CFLAGS = -O2
> > + endif
> > +endif
>
> What makes SCO_SV so special that this platform specific tweak does not
> live in "Platform specific tweaks" section like others?
>
> CFLAGS is for the user to oerride from the command line, and I do not very
> much like any tweaks in Makefile. I'd suggest dropping this hunk.
>
> > @@ -564,6 +569,42 @@ endif
> > ifeq ($(uname_S),GNU/kFreeBSD)
> > NO_STRLCPY = YesPlease
> > endif
> > +ifeq ($(uname_S),UnixWare)
> > + CC=cc
>
> s/=/ = /; you have similar one elsewhere.
I only have the one section now. I will look at it some more.
> > + NEEDS_SOCKET = YesPlease
> > + NEEDS_NSL = YesPlease
> > + NEEDS_SSL_WITH_CRYPTO = YesPlease
> > + NEEDS_LIBICONV = YesPlease
> > + SHELL_PATH = /usr/local/bin/bash
> > + NO_IPV6 = YesPlease
> > + NO_HSTRERROR = YesPlease
> > + BASIC_CFLAGS += -Kalloca -Kthread
>
> I am only guessing what -Kalloca is, but is it for alloca(3), and if so do
> you still need it?
I will make tests without it on the next run. It takes about 3 hours for
me to get the patches to all the system review them and then run
everything. Some of the machines are really slow.
> > diff --git a/git-compat-util.h b/git-compat-util.h
> > index 01c4045..b3cd7b3 100644
> > --- a/git-compat-util.h
> > +++ b/git-compat-util.h
> > @@ -39,7 +39,12 @@
> > /* Approximation of the length of the decimal representation of this type. */
> > #define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
> >
> > -#if !defined(__APPLE__) && !defined(__FreeBSD__)
> > +/* Added for __USLC__ for any Novell devrived Compiler and Some Sys V
> > + Added _M_UNIX for any XENIX/SCO UNIX/OpenServer less than or equal
> > + OpenServer 5.0.7 This is do avoided compiler hell like the other
> > + OS's __APPLE__ and __FreeBSD__ */
>
> We generally do not do changelog inside the code comment.
Where do you put your change log stuff, to explain why you made the
change. Maybe it is a bit left over from doing things for MySQL AB.
> > +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !de
> > +fined(_M_UNIX)
>
> Linewrapped patch? It is very curious that you have + in front of "fined(_M_UNIX)".
It is not line wrapped in my file. I do the following after reverting
every and strarting with a clean slate.
cp -p .new/* .
git add Makefile git-compat-util.h progress.c
git diff --cached
git commit -s
git format-patch -p -M -B origin
The last command above is creating the line wrapped because the line is so
long. I do not know enough to force the tools to not do that line wrap.
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] 0003 This patch is to allow 12 different OS's to compile and run git.
2008-06-07 2:40 ` Boyd Lynn Gerber
@ 2008-06-07 3:40 ` Daniel Barkalow
2008-06-08 3:46 ` Boyd Lynn Gerber
0 siblings, 1 reply; 16+ messages in thread
From: Daniel Barkalow @ 2008-06-07 3:40 UTC (permalink / raw)
To: Boyd Lynn Gerber
Cc: Junio C Hamano, Thomas Harning, Jeremy Maitin-Shepard, Git List
On Fri, 6 Jun 2008, Boyd Lynn Gerber wrote:
> On Fri, 6 Jun 2008, Junio C Hamano wrote:
> > Boyd Lynn Gerber <gerberb@zenez.com> writes:
> > I guess the patch text itself seems to be getting reasonable, and perhaps
> > the next few rounds would be to fix the commit log message ;-)
>
> I have it the same, without all the >> as I first posted, but I agree.
> that it needs some tweaking.
>
> > > diff --git a/Makefile b/Makefile
> > > index cce5a6e..000bf1f 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -165,6 +165,11 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
> > > # CFLAGS and LDFLAGS are for the users to override from the command line.
> > >
> > > CFLAGS = -g -O2 -Wall
> > > +ifeq ($(uname_S),SCO_SV)
> > > + ifeq ($(uname_R),3.2)
> > > + CFLAGS = -O2
> > > + endif
> > > +endif
> >
> > What makes SCO_SV so special that this platform specific tweak does not
> > live in "Platform specific tweaks" section like others?
> >
> > CFLAGS is for the user to oerride from the command line, and I do not very
> > much like any tweaks in Makefile. I'd suggest dropping this hunk.
> >
> > > @@ -564,6 +569,42 @@ endif
> > > ifeq ($(uname_S),GNU/kFreeBSD)
> > > NO_STRLCPY = YesPlease
> > > endif
> > > +ifeq ($(uname_S),UnixWare)
> > > + CC=cc
> >
> > s/=/ = /; you have similar one elsewhere.
>
> I only have the one section now. I will look at it some more.
>
> > > + NEEDS_SOCKET = YesPlease
> > > + NEEDS_NSL = YesPlease
> > > + NEEDS_SSL_WITH_CRYPTO = YesPlease
> > > + NEEDS_LIBICONV = YesPlease
> > > + SHELL_PATH = /usr/local/bin/bash
> > > + NO_IPV6 = YesPlease
> > > + NO_HSTRERROR = YesPlease
> > > + BASIC_CFLAGS += -Kalloca -Kthread
> >
> > I am only guessing what -Kalloca is, but is it for alloca(3), and if so do
> > you still need it?
>
> I will make tests without it on the next run. It takes about 3 hours for
> me to get the patches to all the system review them and then run
> everything. Some of the machines are really slow.
>
> > > diff --git a/git-compat-util.h b/git-compat-util.h
> > > index 01c4045..b3cd7b3 100644
> > > --- a/git-compat-util.h
> > > +++ b/git-compat-util.h
> > > @@ -39,7 +39,12 @@
> > > /* Approximation of the length of the decimal representation of this type. */
> > > #define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
> > >
> > > -#if !defined(__APPLE__) && !defined(__FreeBSD__)
> > > +/* Added for __USLC__ for any Novell devrived Compiler and Some Sys V
> > > + Added _M_UNIX for any XENIX/SCO UNIX/OpenServer less than or equal
> > > + OpenServer 5.0.7 This is do avoided compiler hell like the other
> > > + OS's __APPLE__ and __FreeBSD__ */
> >
> > We generally do not do changelog inside the code comment.
>
> Where do you put your change log stuff, to explain why you made the
> change. Maybe it is a bit left over from doing things for MySQL AB.
In the commit message. That is, if your commit message goes:
Allow more systems to build git
__USLC__ indicates a Novell-derived compiler or some SysV
__M_UNIX indicates XENIX/SCO UNIX/OpenServer before 5.0.7
Like Apple and BSD, both of these shouldn't have _XOPEN_SOURCE defined
then an interested user can use "git blame" on the file, and then read
that info in the commit message for the commit that introduced those
lines.
Also on the commit message: you should put the list of affected files
after a line with just "---", so it appears in the patch but not in the
commit; if we want to find out what the commit affects, we can use "git
log --stat" and find out for sure. The explanation of the sign-off can
probably go after the "---", too, although the "Signed-off-by" line should
be above it.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] 0003 This patch is to allow 12 different OS's to compile and run git.
2008-06-07 3:40 ` Daniel Barkalow
@ 2008-06-08 3:46 ` Boyd Lynn Gerber
2008-06-08 7:45 ` Junio C Hamano
0 siblings, 1 reply; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 3:46 UTC (permalink / raw)
To: Daniel Barkalow
Cc: Junio C Hamano, Thomas Harning, Jeremy Maitin-Shepard, Git List
On Fri, 6 Jun 2008, Daniel Barkalow wrote:
> On Fri, 6 Jun 2008, Boyd Lynn Gerber wrote:
> > On Fri, 6 Jun 2008, Junio C Hamano wrote:
> > > Boyd Lynn Gerber <gerberb@zenez.com> writes:
> > > > diff --git a/git-compat-util.h b/git-compat-util.h
> > > > index 01c4045..b3cd7b3 100644
> > > > --- a/git-compat-util.h
> > > > +++ b/git-compat-util.h
> > > > @@ -39,7 +39,12 @@
> > > > /* Approximation of the length of the decimal representation of this type. */
> > > > #define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
> > > >
> > > > -#if !defined(__APPLE__) && !defined(__FreeBSD__)
> > > > +/* Added for __USLC__ for any Novell devrived Compiler and Some Sys V
> > > > + Added _M_UNIX for any XENIX/SCO UNIX/OpenServer less than or equal
> > > > + OpenServer 5.0.7 This is do avoided compiler hell like the other
> > > > + OS's __APPLE__ and __FreeBSD__ */
> > >
> > > We generally do not do changelog inside the code comment.
> >
> > Where do you put your change log stuff, to explain why you made the
> > change. Maybe it is a bit left over from doing things for MySQL AB.
>
> In the commit message. That is, if your commit message goes:
>
> Allow more systems to build git
>
> __USLC__ indicates a Novell-derived compiler or some SysV
> __M_UNIX indicates XENIX/SCO UNIX/OpenServer before 5.0.7
> Like Apple and BSD, both of these shouldn't have _XOPEN_SOURCE defined
>
> then an interested user can use "git blame" on the file, and then read
> that info in the commit message for the commit that introduced those
> lines.
>
> Also on the commit message: you should put the list of affected files
> after a line with just "---", so it appears in the patch but not in the
> commit; if we want to find out what the commit affects, we can use "git
> log --stat" and find out for sure. The explanation of the sign-off can
> probably go after the "---", too, although the "Signed-off-by" line should
> be above it.
So I should have
---
Makefile
Add changes for System V, UnixWare, SCO OS's
---
git-compat-util.h
__USLC__ indicates UNIX System Labs Corperation (USLC), or a
Novell-derived compiler and/or some SysV based OS's.
__M_UNIX indicates XENIX/SCO UNIX/OpenServer before 5.0.7 and prior
release of and SCO OS. It is used just like Apple and BSD, both of these
shouldn't have _XOPEN_SOURCE defined.
---
progress.c
Changes for older OS's that do not support the current methods for
allocation of memory.
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] 0003 This patch is to allow 12 different OS's to compile and run git.
2008-06-08 3:46 ` Boyd Lynn Gerber
@ 2008-06-08 7:45 ` Junio C Hamano
2008-06-08 17:07 ` [PATCH] Port to 12 other Platforms Boyd Lynn Gerber
0 siblings, 1 reply; 16+ messages in thread
From: Junio C Hamano @ 2008-06-08 7:45 UTC (permalink / raw)
To: Boyd Lynn Gerber
Cc: Daniel Barkalow, Thomas Harning, Jeremy Maitin-Shepard, Git List
Boyd Lynn Gerber <gerberb@zenez.com> writes:
> So I should have
> ... (deleted)
More like this:
From: Boyd Lynn Gerber <gerberb@zenez.com>
Subject: [PATCH] Port to other 12 platforms
Date: Sat, 7 Jun 2008 21:46:48 -0600
To: git@vger.kernel.org
Cc: gitster@pobox.com
This adds support to compile git on 12 platforms (<<whichever one you
ported including UnixWare, SCO,... are listed here.>>).
__USLC__ indicates UNIX System Labs Corperation (USLC), or a
Novell-derived compiler and/or some SysV based OS's. __M_UNIX indicates
XENIX/SCO UNIX/OpenServer before 5.0.7 and prior release of and SCO OS.
Like Apple and BSD, both of these do not want _XOPEN_SOURCE defined to
allow use of <<the symbols that is hidden if you have _XOPEN_SOURCE
defined>>.
Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
---
<< "git diff --stat -p" output for the patch here >>
without removal of dynamic-sized array from progress.c, which is not really
part of specific port to these 12 platforms, but is a more generic
"portability fix", which might read like this:
From: Boyd Lynn Gerber <gerberb@zenez.com>
Subject: [PATCH] progress.c: avoid use of dynamic-sized array
Date: Sat, 7 Jun 2008 21:46:48 -0600
To: git@vger.kernel.org
Cc: gitster@pobox.com
Dynamically sized arrays are gcc and C99 construct. It sometimes is
nice to use them but hurts portability to older compilers. This
removes the only use of the construct in stop_progress_msg(); the
function is about writing out a single line of message, and the
existing callers of this function feed messages of only bounded size
anyway, so use of dynamic array is simply overkill.
Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
---
<< "git diff --stat -p" output for the patch here >>
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH] Port to 12 other Platforms.
2008-06-08 7:45 ` Junio C Hamano
@ 2008-06-08 17:07 ` Boyd Lynn Gerber
0 siblings, 0 replies; 16+ messages in thread
From: Boyd Lynn Gerber @ 2008-06-08 17:07 UTC (permalink / raw)
To: Junio C Hamano
Cc: Daniel Barkalow, Thomas Harning, Jeremy Maitin-Shepard, Git List
This patch adds support to compile git on 12 additional platforms.
The platforms are based on UNIX Systems Labs (USL)/Novell/SYS V code base.
This patch also adds support for Novell UnixWare 2.x.x, UnixWare 7.1.4 and
older, OpenServer 5.0.7 and older OpenServer 6.0.X, and
SCO pre OSR 5 platforms to build and run git.
This is with suggestions and modifications from
Daniel Barkalow <barkalow@iabervon.org>
Junio C Hamano <gitster@pobox.com>
Thomas Harning <harningt@gmail.com>
Jeremy Maitin-Shepard <jbms@cmu.edu>
Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com>
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
---
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
---
Makefile
Add changes for System V, UnixWare, SCO OS's
---
git-compat-util.h
__USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived
compiler and/or some SysV based OS's.
__M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases
of the SCO OS's. It is used just like Apple and BSD, both of these
shouldn't have _XOPEN_SOURCE defined.
diff --git a/Makefile b/Makefile
index cce5a6e..026de2f 100644
--- a/Makefile
+++ b/Makefile
@@ -564,6 +564,45 @@ endif
ifeq ($(uname_S),GNU/kFreeBSD)
NO_STRLCPY = YesPlease
endif
+ifeq ($(uname_S),UnixWare)
+ CC=cc
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/local/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ BASIC_CFLAGS += -Kthread
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ INSTALL = ginstall
+ TAR = gtar
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+endif
+ifeq ($(uname_S),SCO_SV)
+ ifeq ($(uname_R),3.2)
+ CFLAGS = -O2
+ endif
+ ifeq ($(uname_R),5)
+ CC=cc
+ BASIC_CFLAGS += -Kthread
+ endif
+ NEEDS_SOCKET = YesPlease
+ NEEDS_NSL = YesPlease
+ NEEDS_SSL_WITH_CRYPTO = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ SHELL_PATH = /usr/bin/bash
+ NO_IPV6 = YesPlease
+ NO_HSTRERROR = YesPlease
+ BASIC_CFLAGS += -I/usr/local/include
+ BASIC_LDFLAGS += -L/usr/local/lib
+ NO_STRCASESTR = YesPlease
+ NO_MEMMEM = YesPlease
+ INSTALL = ginstall
+ TAR = gtar
+endif
ifeq ($(uname_S),Darwin)
NEEDS_SSL_WITH_CRYPTO = YesPlease
NEEDS_LIBICONV = YesPlease
diff --git a/git-compat-util.h b/git-compat-util.h
index 01c4045..c04e8ba 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -39,7 +39,7 @@
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
--
1.5.2.4
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-06-08 21:50 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-08 15:28 [PATCH] Port to 12 other Platforms Boyd Lynn Gerber
2008-06-08 15:46 ` Jakub Narebski
2008-06-08 16:04 ` Boyd Lynn Gerber
2008-06-08 16:21 ` Matthieu Moy
2008-06-08 16:33 ` Boyd Lynn Gerber
2008-06-08 17:19 ` Jakub Narebski
2008-06-08 17:58 ` [PATCH] Port to 12 other Platforms. (Comments) Boyd Lynn Gerber
2008-06-08 18:01 ` Boyd Lynn Gerber
2008-06-08 18:52 ` [PATCH] Port to 12 other Platforms Junio C Hamano
2008-06-08 19:31 ` Boyd Lynn Gerber
2008-06-08 20:47 ` Boyd Lynn Gerber
2008-06-08 21:19 ` Junio C Hamano
2008-06-08 21:36 ` [PATCH] version 0001 " Boyd Lynn Gerber
2008-06-08 21:37 ` [PATCH] progress.c: avoid use of dynamic-sized array Boyd Lynn Gerber
2008-06-08 21:49 ` [PATCH] Port to 12 other Platforms Boyd Lynn Gerber
-- strict thread matches above, loose matches on Subject: below --
2008-06-06 19:34 [PATCH] This patch is to allow 12 different OS's to compile and run git Boyd Lynn Gerber
2008-06-06 19:39 ` Jeremy Maitin-Shepard
2008-06-06 20:02 ` Boyd Lynn Gerber
2008-06-06 23:08 ` Junio C Hamano
2008-06-06 23:23 ` Boyd Lynn Gerber
2008-06-07 0:38 ` [PATCH] 0002 " Boyd Lynn Gerber
2008-06-07 0:47 ` Daniel Barkalow
2008-06-07 1:25 ` [PATCH] 0003 " Boyd Lynn Gerber
2008-06-07 2:12 ` Junio C Hamano
2008-06-07 2:40 ` Boyd Lynn Gerber
2008-06-07 3:40 ` Daniel Barkalow
2008-06-08 3:46 ` Boyd Lynn Gerber
2008-06-08 7:45 ` Junio C Hamano
2008-06-08 17:07 ` [PATCH] Port to 12 other Platforms Boyd Lynn Gerber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).