1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-30 05:40:06 +00:00

Fix clang compile issue.

This commit is contained in:
Vanilla I. Shu 2011-12-22 01:03:31 +00:00
parent a43ffb9eec
commit 5ad171ccd0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=287835
7 changed files with 77 additions and 45 deletions

View File

@ -0,0 +1,11 @@
--- shell/xQuery.c.orig 2011-12-22 00:24:32.000000000 +0800
+++ shell/xQuery.c 2011-12-22 00:24:43.000000000 +0800
@@ -83,7 +83,7 @@ void packerquery(unsigned int packerid)
printf("\n");
}
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
struct XpkPackerList list;
int i;

View File

@ -0,0 +1,11 @@
--- sted.c.orig 2011-12-22 00:15:01.000000000 +0800
+++ sted.c 2011-12-22 00:15:09.000000000 +0800
@@ -74,7 +74,7 @@ rad *head = NULL; /* The head pointer f
* user. Processes the input and stores it.
**************************************************************************/
-void
+int
main (int argc, char *argv[])
{
int count = 0, count2 = 0, count3 = 0, c, x = 0, y = 0;

View File

@ -0,0 +1,14 @@
--- Complete.c.orig 1996-10-18 13:10:31.000000000 +0800
+++ Complete.c 2011-12-22 00:11:03.000000000 +0800
@@ -241,7 +241,11 @@ FileListAdd(FileList *f, char *s)
static int
CompareStrings(char **a, char **b)
{
+#ifdef __FreeBSD__
+ return strcoll(*a, *b);
+#else
return strcmp(*a, *b);
+#endif
}
static void

View File

@ -0,0 +1,28 @@
--- Main.c.orig 1998-03-20 11:21:09.000000000 +0800
+++ Main.c 2011-12-22 00:11:54.000000000 +0800
@@ -19,6 +19,9 @@
#include <pwd.h>
#include <errno.h>
#include <ctype.h>
+#ifdef __FreeBSD__
+#include <locale.h>
+#endif
#include <signal.h>
#include <setjmp.h>
#include <stdlib.h>
@@ -872,11 +875,14 @@ SigIntMain(/* int sigNum */ void)
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
int opt, result;
OpenOptions openopt;
+#ifdef __FreeBSD__
+ setlocale(LC_ALL, "");
+#endif
Init();
RunStartupScript();

View File

@ -0,0 +1,10 @@
--- Main.h.orig 2011-12-22 00:11:25.000000000 +0800
+++ Main.h 2011-12-22 00:11:41.000000000 +0800
@@ -45,6 +45,6 @@ void CloseTraceLog(void);
void CloseLogs(void);
void StartupMsgs(void);
void Startup(void);
-void main(int, char **);
+int main(int, char **);
void SaveHistory(void);
void LoadHistory(void);

View File

@ -1,42 +0,0 @@
*** Complete.c.bak Fri Oct 18 09:10:31 1996
--- Complete.c Thu Jan 9 15:17:48 1997
***************
*** 241,247 ****
--- 241,251 ----
static int
CompareStrings(char **a, char **b)
{
+ #ifdef __FreeBSD__
+ return strcoll(*a, *b);
+ #else
return strcmp(*a, *b);
+ #endif
}
static void
*** Main.c.bak Fri Oct 18 09:01:58 1996
--- Main.c Thu Jan 9 15:24:22 1997
***************
*** 22,27 ****
--- 22,30 ----
#include <pwd.h>
#include <errno.h>
#include <ctype.h>
+ #ifdef __FreeBSD__
+ #include <locale.h>
+ #endif
#include <signal.h>
#include <setjmp.h>
#include <stdlib.h>
***************
*** 866,871 ****
--- 869,877 ----
int opt, result;
OpenOptions openopt;
+ #ifdef __FreeBSD__
+ setlocale(LC_ALL, "");
+ #endif
Init();
RunStartupScript();

View File

@ -1,6 +1,6 @@
--- configure.bak Sun Jun 8 14:25:04 1997
+++ configure Wed Aug 28 11:40:19 2002
@@ -1766,7 +1766,7 @@
--- configure.orig 1997-06-08 13:25:04.000000000 +0800
+++ configure 2011-12-22 00:11:03.000000000 +0800
@@ -1766,7 +1766,7 @@ else
echo "$ac_t""no" 1>&6
fi