Re: [Patch] MacOS X support
[email protected] Fri, 3 Feb 2006 15:09:28 -0800
| Newsgroups | gmane.comp.lib.libtai |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-8--360305298
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
> Is it me or you got the patch wrong? (diff a <-> b).
Argh. Yes, you are correct. I'm just not having a good day today.
I've attached a patch that goes in the right direction (or you can
just use "-R" on the original.
David
--Apple-Mail-8--360305298
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="macos-libtai-2.patch"
Content-Disposition: attachment;
filename=macos-libtai-2.patch
diff -r -C5 libtai-0.60/check.c mlibtai-0.60/check.c
*** libtai-0.60/check.c Tue Oct 13 09:52:20 1998
--- mlibtai-0.60/check.c Fri Feb 3 01:23:03 2006
***************
*** 1,6 ****
--- 1,7 ----
#include <stdio.h>
+ #include <stdlib.h>
#include <time.h>
#include "tai.h"
#include "leapsecs.h"
#include "caltime.h"
diff -r -C5 libtai-0.60/easter.c mlibtai-0.60/easter.c
*** libtai-0.60/easter.c Tue Oct 13 09:52:20 1998
--- mlibtai-0.60/easter.c Fri Feb 3 01:23:33 2006
***************
*** 1,6 ****
--- 1,7 ----
#include <stdio.h>
+ #include <stdlib.h>
#include "caldate.h"
char *dayname[7] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" } ;
char out[101];
diff -r -C5 libtai-0.60/leapsecs.c mlibtai-0.60/leapsecs.c
*** libtai-0.60/leapsecs.c Tue Oct 13 09:52:20 1998
--- mlibtai-0.60/leapsecs.c Fri Feb 3 01:22:57 2006
***************
*** 1,6 ****
--- 1,7 ----
#include <stdio.h>
+ #include <stdlib.h>
#include "tai.h"
#include "leapsecs.h"
#include "caldate.h"
/* XXX: breaks tai encapsulation */
diff -r -C5 libtai-0.60/leapsecs_read.c mlibtai-0.60/leapsecs_read.c
*** libtai-0.60/leapsecs_read.c Tue Oct 13 09:52:20 1998
--- mlibtai-0.60/leapsecs_read.c Fri Feb 3 01:22:25 2006
***************
*** 1,9 ****
--- 1,13 ----
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
+ #include <sys/uio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+
extern int errno;
#include "tai.h"
#include "leapsecs.h"
struct tai *leapsecs = 0;
diff -r -C5 libtai-0.60/nowutc.c mlibtai-0.60/nowutc.c
*** libtai-0.60/nowutc.c Tue Oct 13 09:52:20 1998
--- mlibtai-0.60/nowutc.c Fri Feb 3 01:23:11 2006
***************
*** 1,6 ****
--- 1,7 ----
#include <stdio.h>
+ #include <stdlib.h>
#include "leapsecs.h"
#include "tai.h"
#include "taia.h"
#include "caltime.h"
diff -r -C5 libtai-0.60/yearcal.c mlibtai-0.60/yearcal.c
*** libtai-0.60/yearcal.c Tue Oct 13 09:52:20 1998
--- mlibtai-0.60/yearcal.c Fri Feb 3 13:35:48 2006
***************
*** 1,6 ****
--- 1,7 ----
#include <stdio.h>
+ #include <stdlib.h>
#include "caldate.h"
char *montab[] = {
"January"
, "February"
***************
*** 14,24 ****
, "October"
, "November"
, "December"
} ;
! void main(argc,argv)
int argc;
char **argv;
{
int year;
long daystart;
--- 15,25 ----
, "October"
, "November"
, "December"
} ;
! int main(argc, argv)
int argc;
char **argv;
{
int year;
long daystart;
***************
*** 61,67 ****
}
}
printf("\n");
}
! exit(0);
}
--- 62,68 ----
}
}
printf("\n");
}
! return 0;
}
--Apple-Mail-8--360305298--