djgpp-killer-20060801
[openafs.git] / src / WINNT / client_osi / osilog.c
index 7466b66..ed6fa7d 100644 (file)
 #include <afs/param.h>
 #include <afs/stds.h>
 
-#ifndef DJGPP
 #include <windows.h>
 #include <rpc.h>
-#endif /* !DJGPP */
 #include <malloc.h>
 #include "osi.h"
-#ifndef DJGPP
 #include "dbrpc.h"
-#endif /* !DJGPP */
 #include <stdio.h>
 #include <assert.h>
 #include <WINNT\afsreg.h>
@@ -47,9 +43,7 @@ DWORD osi_TraceOption=0;
 
 osi_fdOps_t osi_logFDOps = {
        osi_LogFDCreate,
-#ifndef DJGPP
         osi_LogFDGetInfo,
-#endif
         osi_LogFDClose
 };
 
@@ -63,7 +57,6 @@ osi_log_t *osi_LogCreate(char *namep, long size)
         LARGE_INTEGER bigTemp;
         LARGE_INTEGER bigJunk;
        
-#ifndef DJGPP
        if (osi_Once(&osi_logOnce)) {
                QueryPerformanceFrequency(&bigFreq);
                 if (bigFreq.LowPart == 0 && bigFreq.HighPart == 0)
@@ -85,7 +78,6 @@ osi_log_t *osi_LogCreate(char *namep, long size)
                /* done with init */
                osi_EndOnce(&osi_logOnce);
         }
-#endif /* !DJGPP */
 
         logp = malloc(sizeof(osi_log_t));
         memset(logp, 0, sizeof(osi_log_t));
@@ -112,7 +104,6 @@ osi_log_t *osi_LogCreate(char *namep, long size)
        strcpy(tbuffer, "log:");
         strcat(tbuffer, namep);
        typep = osi_RegisterFDType(tbuffer, &osi_logFDOps, logp);
-#ifndef DJGPP
        if (typep) {
                /* add formatting info */
                osi_AddFDFormatInfo(typep, OSI_DBRPC_REGIONINT, 0,
@@ -120,7 +111,6 @@ osi_log_t *osi_LogCreate(char *namep, long size)
                osi_AddFDFormatInfo(typep, OSI_DBRPC_REGIONSTRING, 1,
                        "Time (mics)", 0);
        }
-#endif
        
         return logp;
 }
@@ -199,15 +189,11 @@ void osi_LogAdd(osi_log_t *logp, char *formatp, size_t p0, size_t p1, size_t p2,
         lep->tid = thrd_Current();
 
        /* get the time, using the high res timer if available */
-#ifndef DJGPP
         if (osi_logFreq) {
                QueryPerformanceCounter(&bigTime);
                lep->micros = (bigTime.LowPart / osi_logFreq) * osi_logTixToMicros;
         }
         else lep->micros = GetCurrentTime() * 1000;
-#else
-        lep->micros = gettime_us();
-#endif /* !DJGPP */                
 
         lep->formatp = formatp;
         lep->parms[0] = p0;
@@ -257,12 +243,8 @@ void osi_LogPrint(osi_log_t *logp, FILE_HANDLE handle)
                        lep->micros / 1000000,
                        lep->micros % 1000000,
                        lep->tid, msg);
-#ifndef DJGPP
                if (!WriteFile(handle, wholemsg, strlen(wholemsg),
                                &ioCount, NULL))
-#else /* DJGPP */
-                if ((ioCount = fwrite(wholemsg, 1, strlen(wholemsg), handle)) == 0)
-#endif /* !DJGPP */
                        break;
        }
 
@@ -311,7 +293,6 @@ long osi_LogFDCreate(osi_fdType_t *typep, osi_fd_t **outpp)
         return 0;
 }
 
-#ifndef DJGPP
 long osi_LogFDGetInfo(osi_fd_t *ifd, osi_remGetInfoParms_t *outp)
 {
        osi_logFD_t *lfdp;
@@ -349,7 +330,6 @@ long osi_LogFDGetInfo(osi_fd_t *ifd, osi_remGetInfoParms_t *outp)
        thrd_LeaveCrit(&logp->cs);
         return 0;
 }
-#endif /* !DJGPP */
 
 long osi_LogFDClose(osi_fd_t *ifdp)
 {