1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-15 23:50:44 +00:00
freebsd-ports/japanese/today/files/patch-ag
Masafumi Max NAKANE 173073fbec Reorganize the patches to:
- Inhibit multiple patch files to change one file.
- Remove PATCH_STRIP definition from the Makefile.
- One patch file for each file to be modified.
1997-09-19 11:57:56 +00:00

46 lines
1013 B
Plaintext

--- misc.c.orig Fri Sep 19 20:27:37 1997
+++ misc.c Fri Sep 19 20:23:43 1997
@@ -11,12 +11,17 @@
*
*/
+#ifdef __FreeBSD__
+ #include <unistd.h>
+#endif
#include "common.h"
#include "main.h"
#include "getfile.h"
#include "kyureki.h"
#include "misc.h"
-
+#ifdef __FreeBSD__
+ #define strnicmp strncasecmp
+#endif
#ifndef INCLUDE_CALENDAR
#define JULIAN 1720994
#define MONTH 30.6001
@@ -1105,7 +1110,11 @@
sprintf(pbuf, "%06d", getpid() >> 4);
pb = pbuf + strlen(pbuf) - 5;
#else /* #if defined(MSDOS) || defined(LSI_C) || defined(unix) */
+#ifndef __FreeBSD__
sprintf(pbuf, "%05d", getpid());
+#else
+ sprintf(pbuf, "%05ld", getpid());
+#endif
pb = pbuf;
#endif
for (i = 0; i < 5; i++) {
@@ -1280,7 +1289,11 @@
buf = malloc(size);
if (buf == NULL) {
errprint("xmalloc", ERR_PANIC, "virtual memory exhausted, program stop.");
+#ifndef __FreeBSD__
terminate_program(TERM_MEMERROR, 0);
+#else
+ terminate_program(TERM_MEMERROR);
+#endif
}
return (buf);
}