Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bfile/bfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif

Expand Down
4 changes: 2 additions & 2 deletions bfile/mfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#include <sys/types.h>
#include <fcntl.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down Expand Up @@ -438,7 +438,7 @@ int mf_close(MFile mf)
{
if (mf->files[i].fd >= 0)
{
#ifndef WIN32
#ifndef _WIN32
if (mf->wr)
fsync(mf->files[i].fd);
#endif
Expand Down
2 changes: 1 addition & 1 deletion bfile/mfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <idzebra/version.h>
#include <idzebra/util.h>

#ifdef WIN32
#ifdef _WIN32

/* 64-bit access .. */
typedef __int64 mfile_off_t;
Expand Down
2 changes: 1 addition & 1 deletion dfa/agrep.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <sys/stat.h>
#include <fcntl.h>

#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down
2 changes: 1 addition & 1 deletion include/direntz.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

*/

#ifdef WIN32
#ifdef _WIN32
/* make WIN32 version of dirent */
#include <windows.h>

Expand Down
2 changes: 1 addition & 1 deletion include/idzebra/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ YAZ_BEGIN_CDECL
* number of occurrences etc. It is a "large" integer and is usually
* 64-bit on newer architectures.
*/
#ifdef WIN32
#ifdef _WIN32
typedef __int64 zint;
#define ZINT_FORMAT0 "I64d"
#else
Expand Down
4 changes: 2 additions & 2 deletions include/zebra-lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef ZEBRA_LOCK_H
#define ZEBRA_LOCK_H

#ifdef WIN32
#ifdef _WIN32
#include <windows.h>
#endif
#if YAZ_POSIX_THREADS
Expand All @@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
YAZ_BEGIN_CDECL

typedef struct {
#ifdef WIN32
#ifdef _WIN32
CRITICAL_SECTION mutex;
#else
# if YAZ_POSIX_THREADS
Expand Down
2 changes: 1 addition & 1 deletion index/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
int zebra_file_stat(const char *file_name, struct stat *buf,
int follow_links)
{
#ifndef WIN32
#ifndef _WIN32
if (!follow_links)
return lstat(file_name, buf);
#endif
Expand Down
2 changes: 1 addition & 1 deletion index/extract.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down
2 changes: 1 addition & 1 deletion index/kdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down
2 changes: 1 addition & 1 deletion index/kinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <config.h>
#endif
#include <fcntl.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down
2 changes: 1 addition & 1 deletion index/rank1.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#include <stdio.h>
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down
2 changes: 1 addition & 1 deletion index/ranksimilarity.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdio.h>
#include <assert.h>
#include <limits.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down
2 changes: 1 addition & 1 deletion index/rankstatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdio.h>
#include <assert.h>
#include <limits.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down
2 changes: 1 addition & 1 deletion index/retrieve.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <assert.h>

#include <fcntl.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#include <process.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion index/rpnscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#include <stdio.h>
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down
2 changes: 1 addition & 1 deletion index/rpnsearch.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#include <stdio.h>
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down
2 changes: 1 addition & 1 deletion index/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <assert.h>

#include <fcntl.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#include <process.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion index/update_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdio.h>
#include <assert.h>
#include <sys/types.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#define S_ISREG(x) (x & _S_IFREG)
#define S_ISDIR(x) (x & _S_IFDIR)
Expand Down
2 changes: 1 addition & 1 deletion index/update_path.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdio.h>
#include <assert.h>
#include <sys/types.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#define S_ISREG(x) (x & _S_IFREG)
#define S_ISDIR(x) (x & _S_IFDIR)
Expand Down
4 changes: 2 additions & 2 deletions index/zebraapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <assert.h>
#include <stdio.h>
#include <limits.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#include <process.h>
#include <direct.h>
Expand Down Expand Up @@ -75,7 +75,7 @@ static int zebra_chdir(ZebraService zs)
if (!dir)
return 0;
yaz_log(YLOG_DEBUG, "chdir %s", dir);
#ifdef WIN32
#ifdef _WIN32
r = _chdir(dir);
#else
r = chdir(dir);
Expand Down
6 changes: 3 additions & 3 deletions index/zebraidx.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down Expand Up @@ -64,13 +64,13 @@ int main(int argc, char **argv)
Res default_res = res_open(0, 0);

int trans_started = 0;
#ifndef WIN32
#ifndef _WIN32
char nbuf[100];
#endif
ZebraService zs = 0;
ZebraHandle zh = 0;

#ifdef WIN32
#ifdef _WIN32
#else
yaz_snprintf(nbuf, sizeof(nbuf), "%s(%ld)", *argv, (long) getpid());
yaz_log_init_prefix(nbuf);
Expand Down
8 changes: 4 additions & 4 deletions index/zebrasrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#include <process.h>
#include <sys/locking.h>
Expand Down Expand Up @@ -809,7 +809,7 @@ static void bend_start(struct statserv_options_block *sob)
yaz_log(YLOG_FATAL, "Failed to read config `%s'", sob->configname);
exit(1);
}
#ifdef WIN32
#ifdef _WIN32

#else
if (!sob->inetd && !sob->background)
Expand Down Expand Up @@ -860,7 +860,7 @@ static void bend_start(struct statserv_options_block *sob)

static void bend_stop(struct statserv_options_block *sob)
{
#ifdef WIN32
#ifdef _WIN32

#else
if (!sob->inetd && !sob->background && sob->handle)
Expand All @@ -886,7 +886,7 @@ int main(int argc, char **argv)
strcpy(sob->configname, "zebra.cfg");
sob->bend_start = bend_start;
sob->bend_stop = bend_stop;
#ifdef WIN32
#ifdef _WIN32
strcpy(sob->service_name, "zebrasrv");
strcpy(sob->service_display_name, "Zebra Server");
#endif
Expand Down
2 changes: 1 addition & 1 deletion index/zsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#include <stdio.h>
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h>
Expand Down
2 changes: 1 addition & 1 deletion rset/rstemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#if HAVE_UNISTD_H
Expand Down
4 changes: 2 additions & 2 deletions util/dirent.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#include <ctype.h>
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#endif
#include <string.h>
#include <stdlib.h>

#include <direntz.h>

#ifdef WIN32
#ifdef _WIN32

struct DIR {
HANDLE handle;
Expand Down
Loading
Loading