Cleanup BAIL_* and GOTO_* macros to be less cluttered.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 06 Jul 2017 11:51:41 -0400
changeset 1402 c5a5dadb901d
parent 1401 ea83e65d4a35
child 1403 268fa0053d9f
Cleanup BAIL_* and GOTO_* macros to be less cluttered. This also fixes really aggressive compiler warnings about the "if (!ERRPASS)" construct producing unreachable code.
src/archiver_dir.c
src/archiver_grp.c
src/archiver_hog.c
src/archiver_iso9660.c
src/archiver_lzma.c
src/archiver_mvl.c
src/archiver_qpak.c
src/archiver_slb.c
src/archiver_unpacked.c
src/archiver_vdf.c
src/archiver_wad.c
src/archiver_zip.c
src/physfs.c
src/physfs_byteorder.c
src/physfs_internal.h
src/platform_beos.cpp
src/platform_macosx.c
src/platform_os2.c
src/platform_posix.c
src/platform_unix.c
src/platform_windows.c
src/platform_winrt.cpp
--- a/src/archiver_dir.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_dir.c	Thu Jul 06 11:51:41 2017 -0400
@@ -15,7 +15,7 @@
 
 static char *cvtToDependent(const char *prepend, const char *path, char *buf)
 {
-    BAIL_IF_MACRO(buf == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(buf == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     sprintf(buf, "%s%s", prepend ? prepend : "", path);
 
     if (__PHYSFS_platformDirSeparator != '/')
@@ -45,12 +45,12 @@
     const size_t seplen = 1;
 
     assert(io == NULL);  /* shouldn't create an Io for these. */
-    BAIL_IF_MACRO(!__PHYSFS_platformStat(name, &st), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_platformStat(name, &st), NULL);
     if (st.filetype != PHYSFS_FILETYPE_DIRECTORY)
-        BAIL_MACRO(PHYSFS_ERR_UNSUPPORTED, NULL);
+        BAIL(PHYSFS_ERR_UNSUPPORTED, NULL);
 
     retval = allocator.Malloc(namelen + seplen + 1);
-    BAIL_IF_MACRO(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     strcpy(retval, name);
 
@@ -86,7 +86,7 @@
     char *f = NULL;
 
     CVT_TO_DEPENDENT(f, opaque, name);
-    BAIL_IF_MACRO(!f, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!f, NULL);
 
     io = __PHYSFS_createNativeIo(f, mode);
     if (io == NULL)
@@ -127,7 +127,7 @@
     char *f;
 
     CVT_TO_DEPENDENT(f, opaque, name);
-    BAIL_IF_MACRO(!f, ERRPASS, 0);
+    BAIL_IF_ERRPASS(!f, 0);
     retval = __PHYSFS_platformDelete(f);
     __PHYSFS_smallFree(f);
     return retval;
@@ -140,7 +140,7 @@
     char *f;
 
     CVT_TO_DEPENDENT(f, opaque, name);
-    BAIL_IF_MACRO(!f, ERRPASS, 0);
+    BAIL_IF_ERRPASS(!f, 0);
     retval = __PHYSFS_platformMkDir(f);
     __PHYSFS_smallFree(f);
     return retval;
@@ -159,7 +159,7 @@
     char *d;
 
     CVT_TO_DEPENDENT(d, opaque, name);
-    BAIL_IF_MACRO(!d, ERRPASS, 0);
+    BAIL_IF_ERRPASS(!d, 0);
     retval = __PHYSFS_platformStat(d, stat);
     __PHYSFS_smallFree(d);
     return retval;
--- a/src/archiver_grp.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_grp.c	Thu Jul 06 11:51:41 2017 -0400
@@ -37,14 +37,14 @@
     char *ptr = NULL;
 
     entries = (UNPKentry *) allocator.Malloc(sizeof (UNPKentry) * fileCount);
-    BAIL_IF_MACRO(entries == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(entries == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     location += (16 * fileCount);
 
     for (entry = entries; fileCount > 0; fileCount--, entry++)
     {
-        GOTO_IF_MACRO(!__PHYSFS_readAll(io, &entry->name, 12), ERRPASS, failed);
-        GOTO_IF_MACRO(!__PHYSFS_readAll(io, &entry->size, 4), ERRPASS, failed);
+        GOTO_IF_ERRPASS(!__PHYSFS_readAll(io, &entry->name, 12), failed);
+        GOTO_IF_ERRPASS(!__PHYSFS_readAll(io, &entry->size, 4), failed);
         entry->name[12] = '\0';  /* name isn't null-terminated in file. */
         if ((ptr = strchr(entry->name, ' ')) != NULL)
             *ptr = '\0';  /* trim extra spaces. */
@@ -70,17 +70,17 @@
 
     assert(io != NULL);  /* shouldn't ever happen. */
 
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, buf, sizeof (buf)), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, buf, sizeof (buf)), NULL);
     if (memcmp(buf, "KenSilverman", sizeof (buf)) != 0)
-        BAIL_MACRO(PHYSFS_ERR_UNSUPPORTED, NULL);
+        BAIL(PHYSFS_ERR_UNSUPPORTED, NULL);
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &count, sizeof(count)), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &count, sizeof(count)), NULL);
     count = PHYSFS_swapULE32(count);
 
     entries = grpLoadEntries(io, count);
-    BAIL_IF_MACRO(!entries, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!entries, NULL);
     return UNPK_openArchive(io, entries, count);
 } /* GRP_openArchive */
 
--- a/src/archiver_hog.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_hog.c	Thu Jul 06 11:51:41 2017 -0400
@@ -48,13 +48,13 @@
     {
         entCount++;
         ptr = allocator.Realloc(ptr, sizeof (UNPKentry) * entCount);
-        GOTO_IF_MACRO(ptr == NULL, PHYSFS_ERR_OUT_OF_MEMORY, failed);
+        GOTO_IF(ptr == NULL, PHYSFS_ERR_OUT_OF_MEMORY, failed);
         entries = (UNPKentry *) ptr;
         entry = &entries[entCount-1];
 
-        GOTO_IF_MACRO(!__PHYSFS_readAll(io, &entry->name, 13), ERRPASS, failed);
+        GOTO_IF_ERRPASS(!__PHYSFS_readAll(io, &entry->name, 13), failed);
         pos += 13;
-        GOTO_IF_MACRO(!__PHYSFS_readAll(io, &size, 4), ERRPASS, failed);
+        GOTO_IF_ERRPASS(!__PHYSFS_readAll(io, &size, 4), failed);
         pos += 4;
 
         entry->size = PHYSFS_swapULE32(size);
@@ -62,7 +62,7 @@
         pos += size;
 
         /* skip over entry */
-        GOTO_IF_MACRO(!io->seek(io, pos), ERRPASS, failed);
+        GOTO_IF_ERRPASS(!io->seek(io, pos), failed);
     } /* while */
 
     *_entCount = entCount;
@@ -81,12 +81,12 @@
     UNPKentry *entries = NULL;
 
     assert(io != NULL);  /* shouldn't ever happen. */
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, buf, 3), ERRPASS, NULL);
-    BAIL_IF_MACRO(memcmp(buf, "DHF", 3) != 0, PHYSFS_ERR_UNSUPPORTED, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, buf, 3), NULL);
+    BAIL_IF(memcmp(buf, "DHF", 3) != 0, PHYSFS_ERR_UNSUPPORTED, NULL);
 
     entries = hogLoadEntries(io, &count);
-    BAIL_IF_MACRO(!entries, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!entries, NULL);
     return UNPK_openArchive(io, entries, count);
 } /* HOG_openArchive */
 
--- a/src/archiver_iso9660.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_iso9660.c	Thu Jul 06 11:51:41 2017 -0400
@@ -292,8 +292,8 @@
         for(;pos < descriptor->filenamelen; pos++)
             if (descriptor->filename[pos] == ';')
                 lastfound = pos;
-        BAIL_IF_MACRO(lastfound < 1, PHYSFS_ERR_NOT_FOUND /* !!! FIXME: PHYSFS_ERR_BAD_FILENAME */, -1);
-        BAIL_IF_MACRO(lastfound == (descriptor->filenamelen -1), PHYSFS_ERR_NOT_FOUND /* !!! PHYSFS_ERR_BAD_FILENAME */, -1);
+        BAIL_IF(lastfound < 1, PHYSFS_ERR_NOT_FOUND /* !!! FIXME: PHYSFS_ERR_BAD_FILENAME */, -1);
+        BAIL_IF(lastfound == (descriptor->filenamelen -1), PHYSFS_ERR_NOT_FOUND /* !!! PHYSFS_ERR_BAD_FILENAME */, -1);
         strncpy(filename, descriptor->filename, lastfound);
         if (filename[lastfound - 1] == '.')
             filename[lastfound - 1] = '\0'; /* consume trailing ., as done in all implementations */
@@ -346,9 +346,9 @@
                          void *buffer, PHYSFS_uint64 len)
 {
     int rc = -1;
-    BAIL_IF_MACRO(!__PHYSFS_platformGrabMutex(handle->mutex), ERRPASS, -1);
+    BAIL_IF_ERRPASS(!__PHYSFS_platformGrabMutex(handle->mutex), -1);
     if (where != handle->currpos)
-        GOTO_IF_MACRO(!handle->io->seek(handle->io,where), ERRPASS, unlockme);
+        GOTO_IF_ERRPASS(!handle->io->seek(handle->io,where), unlockme);
     rc = handle->io->read(handle->io, buffer, len);
     if (rc == -1)
     {
@@ -369,16 +369,16 @@
 {
     PHYSFS_sint64 rc = iso_readimage(handle, where, descriptor,
                                      sizeof (descriptor->recordlen));
-    BAIL_IF_MACRO(rc == -1, ERRPASS, -1);
-    BAIL_IF_MACRO(rc != 1, PHYSFS_ERR_CORRUPT, -1);
+    BAIL_IF_ERRPASS(rc == -1, -1);
+    BAIL_IF(rc != 1, PHYSFS_ERR_CORRUPT, -1);
 
     if (descriptor->recordlen == 0)
         return 0; /* fill bytes at the end of a sector */
 
     rc = iso_readimage(handle, where + 1, &descriptor->extattributelen,
             descriptor->recordlen - sizeof(descriptor->recordlen));
-    BAIL_IF_MACRO(rc == -1, ERRPASS, -1);
-    BAIL_IF_MACRO(rc != 1, PHYSFS_ERR_CORRUPT, -1);
+    BAIL_IF_ERRPASS(rc == -1, -1);
+    BAIL_IF(rc != 1, PHYSFS_ERR_CORRUPT, -1);
 
     return 0;
 } /* iso_readfiledescriptor */
@@ -416,7 +416,7 @@
     iso_extractsubpath(mypath, &subpath);
     while (1)
     {
-        BAIL_IF_MACRO(iso_readfiledescriptor(handle, readpos, descriptor), ERRPASS, -1);
+        BAIL_IF_ERRPASS(iso_readfiledescriptor(handle, readpos, descriptor), -1);
 
         /* recordlen = 0 -> no more entries or fill entry */
         if (!descriptor->recordlen)
@@ -435,9 +435,7 @@
                 || descriptor->filename[0] == 1))
             continue; /* special ones, ignore */
 
-        BAIL_IF_MACRO(
-            iso_extractfilename(handle, descriptor, filename, &version),
-            ERRPASS, -1);
+        BAIL_IF_ERRPASS(iso_extractfilename(handle, descriptor, filename, &version), -1);
 
         if (strcmp(filename, mypath) == 0)
         {
@@ -479,7 +477,7 @@
 
 static PHYSFS_Io *ISO9660_duplicate(PHYSFS_Io *_io)
 {
-    BAIL_MACRO(PHYSFS_ERR_UNSUPPORTED, NULL);  /* !!! FIXME: write me. */
+    BAIL(PHYSFS_ERR_UNSUPPORTED, NULL);  /* !!! FIXME: write me. */
 } /* ISO9660_duplicate */
 
 
@@ -500,7 +498,7 @@
 
 static PHYSFS_sint64 ISO9660_write(PHYSFS_Io *io, const void *b, PHYSFS_uint64 l)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, -1);
+    BAIL(PHYSFS_ERR_READ_ONLY, -1);
 } /* ISO9660_write */
 
 
@@ -550,37 +548,37 @@
 
     assert(io != NULL);  /* shouldn't ever happen. */
 
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
 
     /* Skip system area to magic number in Volume descriptor */
-    BAIL_IF_MACRO(!io->seek(io, 32769), ERRPASS, NULL);
-    BAIL_IF_MACRO(io->read(io, magicnumber, 5) != 5, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!io->seek(io, 32769), NULL);
+    BAIL_IF_ERRPASS(io->read(io, magicnumber, 5) != 5, NULL);
     if (memcmp(magicnumber, "CD001", 6) != 0)
-        BAIL_MACRO(PHYSFS_ERR_UNSUPPORTED, NULL);
+        BAIL(PHYSFS_ERR_UNSUPPORTED, NULL);
 
     handle = allocator.Malloc(sizeof(ISO9660Handle));
-    GOTO_IF_MACRO(!handle, PHYSFS_ERR_OUT_OF_MEMORY, errorcleanup);
+    GOTO_IF(!handle, PHYSFS_ERR_OUT_OF_MEMORY, errorcleanup);
     handle->path = 0;
     handle->mutex= 0;
     handle->io = NULL;
 
     handle->path = allocator.Malloc(strlen(filename) + 1);
-    GOTO_IF_MACRO(!handle->path, PHYSFS_ERR_OUT_OF_MEMORY, errorcleanup);
+    GOTO_IF(!handle->path, PHYSFS_ERR_OUT_OF_MEMORY, errorcleanup);
     strcpy(handle->path, filename);
 
     handle->mutex = __PHYSFS_platformCreateMutex();
-    GOTO_IF_MACRO(!handle->mutex, ERRPASS, errorcleanup);
+    GOTO_IF_ERRPASS(!handle->mutex, errorcleanup);
 
     handle->io = io;
 
     /* seek Primary Volume Descriptor */
-    GOTO_IF_MACRO(!io->seek(io, 32768), PHYSFS_ERR_IO, errorcleanup);
+    GOTO_IF_ERRPASS(!io->seek(io, 32768), errorcleanup);
 
     while (1)
     {
         ISO9660VolumeDescriptor descriptor;
-        GOTO_IF_MACRO(io->read(io, &descriptor, sizeof(ISO9660VolumeDescriptor)) != sizeof(ISO9660VolumeDescriptor), PHYSFS_ERR_IO, errorcleanup);
-        GOTO_IF_MACRO(strncmp(descriptor.identifier, "CD001", 5) != 0, PHYSFS_ERR_UNSUPPORTED, errorcleanup);
+        GOTO_IF_ERRPASS(io->read(io, &descriptor, sizeof(ISO9660VolumeDescriptor)) != sizeof(ISO9660VolumeDescriptor), errorcleanup);
+        GOTO_IF(strncmp(descriptor.identifier, "CD001", 5) != 0, PHYSFS_ERR_UNSUPPORTED, errorcleanup);
 
         if (descriptor.type == 255)
         {
@@ -588,7 +586,7 @@
             if (founddescriptor)
                 return handle; /* ok, we've found one volume descriptor */
             else
-                GOTO_MACRO(PHYSFS_ERR_CORRUPT, errorcleanup);
+                GOTO(PHYSFS_ERR_CORRUPT, errorcleanup);
         } /* if */
         if (descriptor.type == 1 && !founddescriptor)
         {
@@ -622,7 +620,7 @@
         } /* if */
     } /* while */
 
-    GOTO_MACRO(PHYSFS_ERR_CORRUPT, errorcleanup);  /* not found. */
+    GOTO(PHYSFS_ERR_CORRUPT, errorcleanup);  /* not found. */
 
 errorcleanup:
     if (handle)
@@ -672,8 +670,8 @@
 
 static int iso_file_seek_mem(ISO9660FileHandle *fhandle, PHYSFS_sint64 offset)
 {
-    BAIL_IF_MACRO(offset < 0, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(offset >= fhandle->filesize, PHYSFS_ERR_PAST_EOF, 0);
+    BAIL_IF(offset < 0, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(offset >= fhandle->filesize, PHYSFS_ERR_PAST_EOF, 0);
 
     fhandle->currpos = offset;
     return 0;
@@ -698,10 +696,10 @@
         len = bytesleft;
 
     rc = filehandle->io->read(filehandle->io, buffer, len);
-    BAIL_IF_MACRO(rc == -1, ERRPASS, -1);
+    BAIL_IF_ERRPASS(rc == -1, -1);
 
     filehandle->currpos += rc; /* i trust my internal book keeping */
-    BAIL_IF_MACRO(rc < len, PHYSFS_ERR_CORRUPT, -1);
+    BAIL_IF(rc < len, PHYSFS_ERR_CORRUPT, -1);
     return rc;
 } /* iso_file_read_foreign */
 
@@ -711,11 +709,11 @@
 {
     PHYSFS_sint64 pos;
 
-    BAIL_IF_MACRO(offset < 0, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(offset >= fhandle->filesize, PHYSFS_ERR_PAST_EOF, 0);
+    BAIL_IF(offset < 0, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(offset >= fhandle->filesize, PHYSFS_ERR_PAST_EOF, 0);
 
     pos = fhandle->startblock * 2048 + offset;
-    BAIL_IF_MACRO(!fhandle->io->seek(fhandle->io, pos), ERRPASS, -1);
+    BAIL_IF_ERRPASS(!fhandle->io->seek(fhandle->io, pos), -1);
 
     fhandle->currpos = offset;
     return 0;
@@ -733,11 +731,11 @@
 {
     int rc;
     fhandle->cacheddata = allocator.Malloc(fhandle->filesize);
-    BAIL_IF_MACRO(!fhandle->cacheddata, PHYSFS_ERR_OUT_OF_MEMORY, -1);
+    BAIL_IF(!fhandle->cacheddata, PHYSFS_ERR_OUT_OF_MEMORY, -1);
     rc = iso_readimage(handle, fhandle->startblock * 2048,
                            fhandle->cacheddata, fhandle->filesize);
-    GOTO_IF_MACRO(rc < 0, ERRPASS, freemem);
-    GOTO_IF_MACRO(rc == 0, PHYSFS_ERR_CORRUPT, freemem);
+    GOTO_IF_ERRPASS(rc < 0, freemem);
+    GOTO_IF(rc == 0, PHYSFS_ERR_CORRUPT, freemem);
 
     fhandle->read = iso_file_read_mem;
     fhandle->seek = iso_file_seek_mem;
@@ -753,20 +751,19 @@
 static int iso_file_open_foreign(ISO9660Handle *handle,
                                  ISO9660FileHandle *fhandle)
 {
-    int rc;
     fhandle->io = __PHYSFS_createNativeIo(handle->path, 'r');
-    BAIL_IF_MACRO(!fhandle->io, ERRPASS, -1);
-    rc = fhandle->io->seek(fhandle->io, fhandle->startblock * 2048);
-    GOTO_IF_MACRO(!rc, ERRPASS, closefile);
+    BAIL_IF_ERRPASS(!fhandle->io, -1);
+
+    if (!fhandle->io->seek(fhandle->io, fhandle->startblock * 2048))
+    {
+        fhandle->io->destroy(fhandle->io);
+        return -1;
+    } /* if */
 
     fhandle->read = iso_file_read_foreign;
     fhandle->seek = iso_file_seek_foreign;
     fhandle->close = iso_file_close_foreign;
     return 0;
-
-closefile:
-    fhandle->io->destroy(fhandle->io);
-    return -1;
 } /* iso_file_open_foreign */
 
 
@@ -779,15 +776,15 @@
     int rc;
 
     fhandle = allocator.Malloc(sizeof(ISO9660FileHandle));
-    BAIL_IF_MACRO(fhandle == 0, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(fhandle == 0, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     fhandle->cacheddata = 0;
 
     retval = allocator.Malloc(sizeof(PHYSFS_Io));
-    GOTO_IF_MACRO(retval == 0, PHYSFS_ERR_OUT_OF_MEMORY, errorhandling);
+    GOTO_IF(retval == 0, PHYSFS_ERR_OUT_OF_MEMORY, errorhandling);
 
     /* find file descriptor */
     rc = iso_find_dir_entry(handle, filename, &descriptor);
-    GOTO_IF_MACRO(rc, ERRPASS, errorhandling);
+    GOTO_IF_ERRPASS(rc, errorhandling);
 
     fhandle->startblock = descriptor.extentpos + descriptor.extattributelen;
     fhandle->filesize = descriptor.datalen;
@@ -800,7 +797,7 @@
         rc = iso_file_open_mem(handle, fhandle);
     else
         rc = iso_file_open_foreign(handle, fhandle);
-    GOTO_IF_MACRO(rc, ERRPASS, errorhandling);
+    GOTO_IF_ERRPASS(rc, errorhandling);
 
     memcpy(retval, &ISO9660_Io, sizeof (PHYSFS_Io));
     retval->opaque = fhandle;
@@ -837,8 +834,8 @@
     else
     {
         printf("pfad %s\n",dname);
-        BAIL_IF_MACRO(iso_find_dir_entry(handle,dname, &descriptor), ERRPASS,);
-        BAIL_IF_MACRO(!descriptor.flags.directory, ERRPASS,);
+        BAIL_IF_ERRPASS(iso_find_dir_entry(handle,dname, &descriptor),);
+        BAIL_IF_ERRPASS(!descriptor.flags.directory,);
 
         readpos = descriptor.extentpos * 2048;
         end_of_dir = readpos + descriptor.datalen;
@@ -846,7 +843,7 @@
 
     while (1)
     {
-        BAIL_IF_MACRO(iso_readfiledescriptor(handle, readpos, &descriptor), ERRPASS, );
+        BAIL_IF_ERRPASS(iso_readfiledescriptor(handle, readpos, &descriptor), );
 
         /* recordlen = 0 -> no more entries or fill entry */
         if (!descriptor.recordlen)
@@ -877,15 +874,15 @@
     ISO9660Handle *handle = (ISO9660Handle*) opaque;
     ISO9660FileDescriptor descriptor;
     ISO9660ExtAttributeRec extattr;
-    BAIL_IF_MACRO(iso_find_dir_entry(handle, name, &descriptor), ERRPASS, -1);
+    BAIL_IF_ERRPASS(iso_find_dir_entry(handle, name, &descriptor), -1);
 
     stat->readonly = 1;
 
     /* try to get extended info */
     if (descriptor.extattributelen)
     {
-        BAIL_IF_MACRO(iso_read_ext_attributes(handle,
-                descriptor.extentpos, &extattr), ERRPASS, -1);
+        BAIL_IF_ERRPASS(iso_read_ext_attributes(handle,
+                descriptor.extentpos, &extattr), -1);
         stat->createtime = iso_volume_mktime(&extattr.create_time);
         stat->modtime = iso_volume_mktime(&extattr.mod_time);
         stat->accesstime = iso_volume_mktime(&extattr.mod_time);
@@ -918,25 +915,25 @@
 
 static PHYSFS_Io *ISO9660_openWrite(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL(PHYSFS_ERR_READ_ONLY, NULL);
 } /* ISO9660_openWrite */
 
 
 static PHYSFS_Io *ISO9660_openAppend(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL(PHYSFS_ERR_READ_ONLY, NULL);
 } /* ISO9660_openAppend */
 
 
 static int ISO9660_remove(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
+    BAIL(PHYSFS_ERR_READ_ONLY, 0);
 } /* ISO9660_remove */
 
 
 static int ISO9660_mkdir(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
+    BAIL(PHYSFS_ERR_READ_ONLY, 0);
 } /* ISO9660_mkdir */
 
 
--- a/src/archiver_lzma.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_lzma.c	Thu Jul 06 11:51:41 2017 -0400
@@ -205,7 +205,7 @@
 {
     LZMAfile *file = bsearch(name, archive->files, archive->db.Database.NumFiles, sizeof(*archive->files), lzma_file_cmp_stdlib); /* FIXME: Should become __PHYSFS_search!!! */
 
-    BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_NOT_FOUND, NULL);
+    BAIL_IF(file == NULL, PHYSFS_ERR_NOT_FOUND, NULL);
 
     return file;
 } /* lzma_find_file */
@@ -324,8 +324,10 @@
     const size_t remainingSize = file->item->Size - file->position;
     size_t fileSize = 0;
 
-    BAIL_IF_MACRO(wantedSize == 0, ERRPASS, 0); /* quick rejection. */
-    BAIL_IF_MACRO(remainingSize == 0, PHYSFS_ERR_PAST_EOF, 0);
+    if (wantedSize == 0)
+        return 0;  /* quick rejection. */
+
+    BAIL_IF(remainingSize == 0, PHYSFS_ERR_PAST_EOF, 0);
 
     if (wantedSize > remainingSize)
         wantedSize = remainingSize;
@@ -364,7 +366,7 @@
 
 static PHYSFS_sint64 LZMA_write(PHYSFS_Io *io, const void *b, PHYSFS_uint64 len)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, -1);
+    BAIL(PHYSFS_ERR_READ_ONLY, -1);
 } /* LZMA_write */
 
 
@@ -379,7 +381,7 @@
 {
     LZMAfile *file = (LZMAfile *) io->opaque;
 
-    BAIL_IF_MACRO(offset > file->item->Size, PHYSFS_ERR_PAST_EOF, 0);
+    BAIL_IF(offset > file->item->Size, PHYSFS_ERR_PAST_EOF, 0);
 
     file->position = offset; /* We only use a virtual position... */
 
@@ -398,7 +400,7 @@
 {
     /* !!! FIXME: this archiver needs to be reworked to allow multiple
      * !!! FIXME:  opens before we worry about duplication. */
-    BAIL_MACRO(PHYSFS_ERR_UNSUPPORTED, NULL);
+    BAIL(PHYSFS_ERR_UNSUPPORTED, NULL);
 } /* LZMA_duplicate */
 
 
@@ -447,15 +449,15 @@
 
     assert(io != NULL);  /* shouldn't ever happen. */
 
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
 
     if (io->read(io, sig, k7zSignatureSize) != k7zSignatureSize)
         return 0;
-    BAIL_IF_MACRO(!TestSignatureCandidate(sig), PHYSFS_ERR_UNSUPPORTED, NULL);
-    BAIL_IF_MACRO(!io->seek(io, 0), ERRPASS, NULL);
+    BAIL_IF(!TestSignatureCandidate(sig), PHYSFS_ERR_UNSUPPORTED, NULL);
+    BAIL_IF_ERRPASS(!io->seek(io, 0), NULL);
 
     archive = (LZMAarchive *) allocator.Malloc(sizeof (LZMAarchive));
-    BAIL_IF_MACRO(archive == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(archive == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     lzma_archive_init(archive);
     archive->stream.io = io;
@@ -478,7 +480,7 @@
     {
         SzArDbExFree(&archive->db, SzFreePhysicsFS);
         lzma_archive_exit(archive);
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     }
 
     /*
@@ -493,7 +495,7 @@
     {
         SzArDbExFree(&archive->db, SzFreePhysicsFS);
         lzma_archive_exit(archive);
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     }
 
     /*
@@ -506,7 +508,7 @@
     {
         SzArDbExFree(&archive->db, SzFreePhysicsFS);
         lzma_archive_exit(archive);
-        BAIL_MACRO(PHYSFS_ERR_OTHER_ERROR, NULL);
+        BAIL(PHYSFS_ERR_OTHER_ERROR, NULL);
     }
 
     return archive;
@@ -551,7 +553,7 @@
             file = archive->files;
         }
 
-    BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_NOT_FOUND, );
+    BAIL_IF(file == NULL, PHYSFS_ERR_NOT_FOUND, );
 
     while (file < lastFile)
     {
@@ -581,14 +583,14 @@
     LZMAfile *file = lzma_find_file(archive, name);
     PHYSFS_Io *io = NULL;
 
-    BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_NOT_FOUND, NULL);
-    BAIL_IF_MACRO(file->folder == NULL, PHYSFS_ERR_NOT_A_FILE, NULL);
+    BAIL_IF(file == NULL, PHYSFS_ERR_NOT_FOUND, NULL);
+    BAIL_IF(file->folder == NULL, PHYSFS_ERR_NOT_A_FILE, NULL);
 
     file->position = 0;
     file->folder->references++; /* Increase refcount for automatic cleanup... */
 
     io = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io));
-    BAIL_IF_MACRO(io == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(io == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     memcpy(io, &LZMA_Io, sizeof (*io));
     io->opaque = file;
 
@@ -598,13 +600,13 @@
 
 static PHYSFS_Io *LZMA_openWrite(void *opaque, const char *filename)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL(PHYSFS_ERR_READ_ONLY, NULL);
 } /* LZMA_openWrite */
 
 
 static PHYSFS_Io *LZMA_openAppend(void *opaque, const char *filename)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL(PHYSFS_ERR_READ_ONLY, NULL);
 } /* LZMA_openAppend */
 
 
@@ -628,13 +630,13 @@
 
 static int LZMA_remove(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
+    BAIL(PHYSFS_ERR_READ_ONLY, 0);
 } /* LZMA_remove */
 
 
 static int LZMA_mkdir(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
+    BAIL(PHYSFS_ERR_READ_ONLY, 0);
 } /* LZMA_mkdir */
 
 static int LZMA_stat(void *opaque, const char *filename, PHYSFS_Stat *stat)
--- a/src/archiver_mvl.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_mvl.c	Thu Jul 06 11:51:41 2017 -0400
@@ -39,7 +39,7 @@
     UNPKentry *entry = NULL;
 
     entries = (UNPKentry *) allocator.Malloc(sizeof (UNPKentry) * fileCount);
-    BAIL_IF_MACRO(entries == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(entries == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     location += (17 * fileCount);
 
@@ -67,10 +67,10 @@
     UNPKentry *entries = NULL;
 
     assert(io != NULL);  /* shouldn't ever happen. */
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, buf, 4), ERRPASS, NULL);
-    BAIL_IF_MACRO(memcmp(buf, "DMVL", 4) != 0, PHYSFS_ERR_UNSUPPORTED, NULL);
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &count, sizeof(count)), ERRPASS, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, buf, 4), NULL);
+    BAIL_IF(memcmp(buf, "DMVL", 4) != 0, PHYSFS_ERR_UNSUPPORTED, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &count, sizeof(count)), NULL);
 
     count = PHYSFS_swapULE32(count);
     entries = mvlLoadEntries(io, count);
--- a/src/archiver_qpak.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_qpak.c	Thu Jul 06 11:51:41 2017 -0400
@@ -42,7 +42,7 @@
     UNPKentry *entry = NULL;
 
     entries = (UNPKentry *) allocator.Malloc(sizeof (UNPKentry) * fileCount);
-    BAIL_IF_MACRO(entries == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(entries == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     for (entry = entries; fileCount > 0; fileCount--, entry++)
     {
@@ -70,26 +70,26 @@
 
     assert(io != NULL);  /* shouldn't ever happen. */
 
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &val, 4), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &val, 4), NULL);
     if (PHYSFS_swapULE32(val) != QPAK_SIG)
-        BAIL_MACRO(PHYSFS_ERR_UNSUPPORTED, NULL);
+        BAIL(PHYSFS_ERR_UNSUPPORTED, NULL);
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &val, 4), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &val, 4), NULL);
     pos = PHYSFS_swapULE32(val);  /* directory table offset. */
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &val, 4), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &val, 4), NULL);
     count = PHYSFS_swapULE32(val);
 
     /* corrupted archive? */
-    BAIL_IF_MACRO((count % 64) != 0, PHYSFS_ERR_CORRUPT, NULL);
+    BAIL_IF((count % 64) != 0, PHYSFS_ERR_CORRUPT, NULL);
     count /= 64;
 
-    BAIL_IF_MACRO(!io->seek(io, pos), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!io->seek(io, pos), NULL);
 
     entries = qpakLoadEntries(io, count);
-    BAIL_IF_MACRO(!entries, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!entries, NULL);
     return UNPK_openArchive(io, entries, count);
 } /* QPAK_openArchive */
 
--- a/src/archiver_slb.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_slb.c	Thu Jul 06 11:51:41 2017 -0400
@@ -26,7 +26,7 @@
     UNPKentry *entry = NULL;
 
     entries = (UNPKentry *) allocator.Malloc(sizeof (UNPKentry) * fileCount);
-    BAIL_IF_MACRO(entries == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(entries == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     for (entry = entries; fileCount > 0; fileCount--, entry++)
     {
@@ -34,11 +34,11 @@
 
         /* don't include the '\' in the beginning */
         char backslash;
-        GOTO_IF_MACRO(!__PHYSFS_readAll(io, &backslash, 1), ERRPASS, failed);
-        GOTO_IF_MACRO(backslash != '\\', ERRPASS, failed);
+        GOTO_IF_ERRPASS(!__PHYSFS_readAll(io, &backslash, 1), failed);
+        GOTO_IF_ERRPASS(backslash != '\\', failed);
 
         /* read the rest of the buffer, 63 bytes */
-        GOTO_IF_MACRO(!__PHYSFS_readAll(io, &entry->name, 63), ERRPASS, failed);
+        GOTO_IF_ERRPASS(!__PHYSFS_readAll(io, &entry->name, 63), failed);
         entry->name[63] = '\0'; /* in case the name lacks the null terminator */
 
         /* convert backslashes */
@@ -48,11 +48,10 @@
                 *ptr = '/';
         } /* for */
 
-        GOTO_IF_MACRO(!__PHYSFS_readAll(io, &entry->startPos, 4),
-                      ERRPASS, failed);
+        GOTO_IF_ERRPASS(!__PHYSFS_readAll(io, &entry->startPos, 4), failed);
         entry->startPos = PHYSFS_swapULE32(entry->startPos);
 
-        GOTO_IF_MACRO(!__PHYSFS_readAll(io, &entry->size, 4), ERRPASS, failed);
+        GOTO_IF_ERRPASS(!__PHYSFS_readAll(io, &entry->size, 4), failed);
         entry->size = PHYSFS_swapULE32(entry->size);
     } /* for */
     
@@ -74,26 +73,24 @@
 
     assert(io != NULL);  /* shouldn't ever happen. */
 
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &version, sizeof(version)),
-                  ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &version, sizeof(version)), NULL);
     version = PHYSFS_swapULE32(version);
-    BAIL_IF_MACRO(version != 0, ERRPASS, NULL);
+    BAIL_IF(version != 0, PHYSFS_ERR_UNSUPPORTED, NULL);
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &count, sizeof(count)), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &count, sizeof(count)), NULL);
     count = PHYSFS_swapULE32(count);
 
     /* offset of the table of contents */
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &tocPos, sizeof(tocPos)),
-                  ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &tocPos, sizeof(tocPos)), NULL);
     tocPos = PHYSFS_swapULE32(tocPos);
     
     /* seek to the table of contents */
-    BAIL_IF_MACRO(!io->seek(io, tocPos), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!io->seek(io, tocPos), NULL);
 
     entries = slbLoadEntries(io, count);
-    BAIL_IF_MACRO(!entries, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!entries, NULL);
 
     return UNPK_openArchive(io, entries, count);
 } /* SLB_openArchive */
--- a/src/archiver_unpacked.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_unpacked.c	Thu Jul 06 11:51:41 2017 -0400
@@ -63,7 +63,7 @@
 
 static PHYSFS_sint64 UNPK_write(PHYSFS_Io *io, const void *b, PHYSFS_uint64 len)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, -1);
+    BAIL(PHYSFS_ERR_READ_ONLY, -1);
 } /* UNPK_write */
 
 
@@ -79,7 +79,7 @@
     const UNPKentry *entry = finfo->entry;
     int rc;
 
-    BAIL_IF_MACRO(offset >= entry->size, PHYSFS_ERR_PAST_EOF, 0);
+    BAIL_IF(offset >= entry->size, PHYSFS_ERR_PAST_EOF, 0);
     rc = finfo->io->seek(finfo->io, entry->startPos + offset);
     if (rc)
         finfo->curPos = (PHYSFS_uint32) offset;
@@ -101,8 +101,8 @@
     PHYSFS_Io *io = NULL;
     PHYSFS_Io *retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io));
     UNPKfileinfo *finfo = (UNPKfileinfo *) allocator.Malloc(sizeof (UNPKfileinfo));
-    GOTO_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_duplicate_failed);
-    GOTO_IF_MACRO(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_duplicate_failed);
+    GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_duplicate_failed);
+    GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_duplicate_failed);
 
     io = origfinfo->io->duplicate(origfinfo->io);
     if (!io) goto UNPK_duplicate_failed;
@@ -340,7 +340,7 @@
     if (isDir != NULL)
         *isDir = 0;
 
-    BAIL_MACRO(PHYSFS_ERR_NOT_FOUND, NULL);
+    BAIL(PHYSFS_ERR_NOT_FOUND, NULL);
 } /* findEntry */
 
 
@@ -352,17 +352,17 @@
     int isdir = 0;
     UNPKentry *entry = findEntry(info, name, &isdir);
 
-    GOTO_IF_MACRO(isdir, PHYSFS_ERR_NOT_A_FILE, UNPK_openRead_failed);
-    GOTO_IF_MACRO(!entry, ERRPASS, UNPK_openRead_failed);
+    GOTO_IF(isdir, PHYSFS_ERR_NOT_A_FILE, UNPK_openRead_failed);
+    GOTO_IF_ERRPASS(!entry, UNPK_openRead_failed);
 
     retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io));
-    GOTO_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_openRead_failed);
+    GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_openRead_failed);
 
     finfo = (UNPKfileinfo *) allocator.Malloc(sizeof (UNPKfileinfo));
-    GOTO_IF_MACRO(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_openRead_failed);
+    GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_openRead_failed);
 
     finfo->io = info->io->duplicate(info->io);
-    GOTO_IF_MACRO(!finfo->io, ERRPASS, UNPK_openRead_failed);
+    GOTO_IF_ERRPASS(!finfo->io, UNPK_openRead_failed);
 
     if (!finfo->io->seek(finfo->io, entry->startPos))
         goto UNPK_openRead_failed;
@@ -391,25 +391,25 @@
 
 PHYSFS_Io *UNPK_openWrite(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL(PHYSFS_ERR_READ_ONLY, NULL);
 } /* UNPK_openWrite */
 
 
 PHYSFS_Io *UNPK_openAppend(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL(PHYSFS_ERR_READ_ONLY, NULL);
 } /* UNPK_openAppend */
 
 
 int UNPK_remove(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
+    BAIL(PHYSFS_ERR_READ_ONLY, 0);
 } /* UNPK_remove */
 
 
 int UNPK_mkdir(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
+    BAIL(PHYSFS_ERR_READ_ONLY, 0);
 } /* UNPK_mkdir */
 
 
@@ -449,7 +449,7 @@
     if (info == NULL)
     {
         allocator.Free(e);
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     } /* if */
 
     __PHYSFS_sort(e, (size_t) num, entryCmp, entrySwap);
--- a/src/archiver_vdf.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_vdf.c	Thu Jul 06 11:51:41 2017 -0400
@@ -154,7 +154,7 @@
 
 static PHYSFS_sint64 VDF_write(PHYSFS_Io *io, const void *b, PHYSFS_uint64 len)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, -1);
+    BAIL(PHYSFS_ERR_READ_ONLY, -1);
 } /* VDF_write */
 
 
@@ -170,7 +170,7 @@
     const VdfEntryInfo *entry = finfo->entry;
     int rc;
 
-    BAIL_IF_MACRO(offset >= entry->size, PHYSFS_ERR_PAST_EOF, 0);
+    BAIL_IF(offset >= entry->size, PHYSFS_ERR_PAST_EOF, 0);
     rc = finfo->io->seek(finfo->io, entry->jump + offset);
     if (rc)
         finfo->curPos = (PHYSFS_uint32)offset;
@@ -192,8 +192,8 @@
     PHYSFS_Io *io = NULL;
     PHYSFS_Io *retval = (PHYSFS_Io *)allocator.Malloc(sizeof(PHYSFS_Io));
     VdfFileinfo *finfo = (VdfFileinfo *)allocator.Malloc(sizeof(VdfFileinfo));
-    GOTO_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, VDF_duplicate_failed);
-    GOTO_IF_MACRO(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, VDF_duplicate_failed);
+    GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, VDF_duplicate_failed);
+    GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, VDF_duplicate_failed);
 
     io = origfinfo->io->duplicate(origfinfo->io);
     if (!io) goto VDF_duplicate_failed;
@@ -322,10 +322,10 @@
 static VdfRecord *vdfLoadRecord(PHYSFS_Io *io, VdfHeader header)
 {
     VdfRecord *record = (VdfRecord*)allocator.Malloc(sizeof(VdfRecord));
-    BAIL_IF_MACRO(!record, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!record, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     VdfEntryInfo *entries = (VdfEntryInfo *)allocator.Malloc(sizeof(VdfEntryInfo) * header.numEntries);
-    GOTO_IF_MACRO(!entries, PHYSFS_ERR_OUT_OF_MEMORY, failed);
+    GOTO_IF(!entries, PHYSFS_ERR_OUT_OF_MEMORY, failed);
 
     if (!__PHYSFS_readAll(io, entries, sizeof(VdfEntryInfo) * header.numEntries)) goto failed;
 
@@ -416,8 +416,8 @@
     VdfRecord *record = NULL;
     assert(io != NULL); /* shouldn't ever happen. */
 
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &header, sizeof(VdfHeader)), ERRPASS, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &header, sizeof(VdfHeader)), NULL);
 
     header.numEntries = PHYSFS_swapULE32(header.numEntries);
     header.numFiles = PHYSFS_swapULE32(header.numFiles);
@@ -426,16 +426,16 @@
     header.rootCatOffset = PHYSFS_swapULE32(header.rootCatOffset);
     header.version = PHYSFS_swapULE32(header.version);
 
-    BAIL_IF_MACRO(header.version != 0x50, PHYSFS_ERR_UNSUPPORTED, NULL);
+    BAIL_IF(header.version != 0x50, PHYSFS_ERR_UNSUPPORTED, NULL);
 
     if ((memcmp(header.signature, VDF_SIGNATURE_G1, VDF_HEADER_SIGNATURE_LENGTH) != 0) &&
         (memcmp(header.signature, VDF_SIGNATURE_G2, VDF_HEADER_SIGNATURE_LENGTH) != 0))
     {
-        BAIL_MACRO(PHYSFS_ERR_UNSUPPORTED, NULL);
+        BAIL(PHYSFS_ERR_UNSUPPORTED, NULL);
     } /* if */
 
     record = vdfLoadRecord(io, header);
-    BAIL_IF_MACRO(!record, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!record, NULL);
     record->io = io;
     return record;
 } /* VDF_openArchive */
@@ -464,16 +464,16 @@
     VdfRecord *record = (VdfRecord *)opaque;
     VdfFileinfo *finfo = NULL;
     VdfEntryInfo entry;
-    GOTO_IF_MACRO(!vdfFindFile(record, name, &entry), PHYSFS_ERR_NOT_FOUND, VDF_openRead_failed);
+    GOTO_IF(!vdfFindFile(record, name, &entry), PHYSFS_ERR_NOT_FOUND, VDF_openRead_failed);
 
     retval = (PHYSFS_Io *)allocator.Malloc(sizeof(PHYSFS_Io));
-    GOTO_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, VDF_openRead_failed);
+    GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, VDF_openRead_failed);
 
     finfo = (VdfFileinfo *)allocator.Malloc(sizeof(VdfFileinfo));
-    GOTO_IF_MACRO(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, VDF_openRead_failed);
+    GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, VDF_openRead_failed);
 
     finfo->io = record->io->duplicate(record->io);
-    GOTO_IF_MACRO(!finfo->io, ERRPASS, VDF_openRead_failed);
+    GOTO_IF_ERRPASS(!finfo->io, VDF_openRead_failed);
 
     if (!finfo->io->seek(finfo->io, entry.jump))
         goto VDF_openRead_failed;
@@ -481,7 +481,7 @@
     finfo->curPos = 0;
 
     finfo->entry = (VdfEntryInfo *)allocator.Malloc(sizeof(VdfEntryInfo));
-    GOTO_IF_MACRO(!finfo->entry, PHYSFS_ERR_OUT_OF_MEMORY, VDF_openRead_failed);
+    GOTO_IF(!finfo->entry, PHYSFS_ERR_OUT_OF_MEMORY, VDF_openRead_failed);
     memcpy(finfo->entry, &entry, sizeof(VdfEntryInfo));
 
     memcpy(retval, &VDF_Io, sizeof(*retval));
--- a/src/archiver_wad.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_wad.c	Thu Jul 06 11:51:41 2017 -0400
@@ -53,13 +53,13 @@
     UNPKentry *entries = NULL;
     UNPKentry *entry = NULL;
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &directoryOffset, 4), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &directoryOffset, 4), 0);
     directoryOffset = PHYSFS_swapULE32(directoryOffset);
 
-    BAIL_IF_MACRO(!io->seek(io, directoryOffset), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!io->seek(io, directoryOffset), 0);
 
     entries = (UNPKentry *) allocator.Malloc(sizeof (UNPKentry) * fileCount);
-    BAIL_IF_MACRO(!entries, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!entries, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     for (entry = entries; fileCount > 0; fileCount--, entry++)
     {
@@ -88,16 +88,16 @@
 
     assert(io != NULL);  /* shouldn't ever happen. */
 
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, buf, sizeof (buf)), ERRPASS, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, buf, sizeof (buf)), NULL);
     if ((memcmp(buf, "IWAD", 4) != 0) && (memcmp(buf, "PWAD", 4) != 0))
-        BAIL_MACRO(PHYSFS_ERR_UNSUPPORTED, NULL);
+        BAIL(PHYSFS_ERR_UNSUPPORTED, NULL);
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &count, sizeof (count)), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &count, sizeof (count)), NULL);
     count = PHYSFS_swapULE32(count);
 
     entries = wadLoadEntries(io, count);
-    BAIL_IF_MACRO(!entries, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!entries, NULL);
     return UNPK_openArchive(io, entries, count);
 } /* WAD_openArchive */
 
--- a/src/archiver_zip.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_zip.c	Thu Jul 06 11:51:41 2017 -0400
@@ -210,7 +210,7 @@
 
     /* you have a 1/256 chance of passing this test incorrectly. :/ */
     if (finalbyte != verifier)
-        BAIL_MACRO(PHYSFS_ERR_BAD_PASSWORD, 0);
+        BAIL(PHYSFS_ERR_BAD_PASSWORD, 0);
 
     /* save the initial vector for seeking purposes. Not secure!! */
     memcpy(finfo->initial_crypto_keys, finfo->crypto_keys, 12);
@@ -283,7 +283,7 @@
 static int readui64(PHYSFS_Io *io, PHYSFS_uint64 *val)
 {
     PHYSFS_uint64 v;
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &v, sizeof (v)), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0);
     *val = PHYSFS_swapULE64(v);
     return 1;
 } /* readui64 */
@@ -294,7 +294,7 @@
 static int readui32(PHYSFS_Io *io, PHYSFS_uint32 *val)
 {
     PHYSFS_uint32 v;
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &v, sizeof (v)), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0);
     *val = PHYSFS_swapULE32(v);
     return 1;
 } /* readui32 */
@@ -306,7 +306,7 @@
 static int readui16(PHYSFS_Io *io, PHYSFS_uint16 *val)
 {
     PHYSFS_uint16 v;
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &v, sizeof (v)), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0);
     *val = PHYSFS_swapULE16(v);
     return 1;
 } /* readui16 */
@@ -324,7 +324,7 @@
     if (avail < maxread)
         maxread = avail;
 
-    BAIL_IF_MACRO(maxread == 0, ERRPASS, 0);    /* quick rejection. */
+    BAIL_IF_ERRPASS(maxread == 0, 0);    /* quick rejection. */
 
     if (entry->compression_method == COMPMETH_NONE)
         retval = zip_read_decrypt(finfo, buf, maxread);
@@ -375,7 +375,7 @@
 
 static PHYSFS_sint64 ZIP_write(PHYSFS_Io *io, const void *b, PHYSFS_uint64 len)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, -1);
+    BAIL(PHYSFS_ERR_READ_ONLY, -1);
 } /* ZIP_write */
 
 
@@ -392,12 +392,12 @@
     PHYSFS_Io *io = finfo->io;
     const int encrypted = zip_entry_is_tradional_crypto(entry);
 
-    BAIL_IF_MACRO(offset > entry->uncompressed_size, PHYSFS_ERR_PAST_EOF, 0);
+    BAIL_IF(offset > entry->uncompressed_size, PHYSFS_ERR_PAST_EOF, 0);
 
     if (!encrypted && (entry->compression_method == COMPMETH_NONE))
     {
         PHYSFS_sint64 newpos = offset + entry->offset;
-        BAIL_IF_MACRO(!io->seek(io, newpos), ERRPASS, 0);
+        BAIL_IF_ERRPASS(!io->seek(io, newpos), 0);
         finfo->uncompressed_position = (PHYSFS_uint32) offset;
     } /* if */
 
@@ -460,18 +460,18 @@
     ZIPfileinfo *origfinfo = (ZIPfileinfo *) io->opaque;
     PHYSFS_Io *retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io));
     ZIPfileinfo *finfo = (ZIPfileinfo *) allocator.Malloc(sizeof (ZIPfileinfo));
-    GOTO_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, failed);
-    GOTO_IF_MACRO(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, failed);
+    GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, failed);
+    GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, failed);
     memset(finfo, '\0', sizeof (*finfo));
 
     finfo->entry = origfinfo->entry;
     finfo->io = zip_get_io(origfinfo->io, NULL, finfo->entry);
-    GOTO_IF_MACRO(!finfo->io, ERRPASS, failed);
+    GOTO_IF_ERRPASS(!finfo->io, failed);
 
     if (finfo->entry->compression_method != COMPMETH_NONE)
     {
         finfo->buffer = (PHYSFS_uint8 *) allocator.Malloc(ZIP_READBUFSIZE);
-        GOTO_IF_MACRO(!finfo->buffer, PHYSFS_ERR_OUT_OF_MEMORY, failed);
+        GOTO_IF(!finfo->buffer, PHYSFS_ERR_OUT_OF_MEMORY, failed);
         if (zlib_err(inflateInit2(&finfo->stream, -MAX_WBITS)) != Z_OK)
             goto failed;
     } /* if */
@@ -546,7 +546,7 @@
     int found = 0;
 
     filelen = io->length(io);
-    BAIL_IF_MACRO(filelen == -1, ERRPASS, -1);
+    BAIL_IF_ERRPASS(filelen == -1, -1);
 
     /*
      * Jump to the end of the file and start reading backwards.
@@ -573,7 +573,7 @@
 
     while ((totalread < filelen) && (totalread < 65557))
     {
-        BAIL_IF_MACRO(!io->seek(io, filepos), ERRPASS, -1);
+        BAIL_IF_ERRPASS(!io->seek(io, filepos), -1);
 
         /* make sure we catch a signature between buffers. */
         if (totalread != 0)
@@ -612,7 +612,7 @@
             filepos = 0;
     } /* while */
 
-    BAIL_IF_MACRO(!found, PHYSFS_ERR_UNSUPPORTED, -1);
+    BAIL_IF(!found, PHYSFS_ERR_UNSUPPORTED, -1);
 
     if (len != NULL)
         *len = filelen;
@@ -676,7 +676,7 @@
         prev = retval;
     } /* for */
 
-    BAIL_MACRO(PHYSFS_ERR_NOT_FOUND, NULL);
+    BAIL(PHYSFS_ERR_NOT_FOUND, NULL);
 } /* zip_find_entry */
 
 
@@ -796,10 +796,10 @@
      *  follow it.
      */
 
-    BAIL_IF_MACRO(!io->seek(io, entry->offset), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!io->seek(io, entry->offset), 0);
 
     path = (char *) __PHYSFS_smallAlloc(size + 1);
-    BAIL_IF_MACRO(!path, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    BAIL_IF(!path, PHYSFS_ERR_OUT_OF_MEMORY, 0);
     
     if (entry->compression_method == COMPMETH_NONE)
         rc = __PHYSFS_readAll(io, path, size);
@@ -867,28 +867,28 @@
        !!! FIXME:  which is probably true for Jar files, fwiw, but we don't
        !!! FIXME:  care about these values anyhow. */
 
-    BAIL_IF_MACRO(!io->seek(io, entry->offset), ERRPASS, 0);
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
-    BAIL_IF_MACRO(ui32 != ZIP_LOCAL_FILE_SIG, PHYSFS_ERR_CORRUPT, 0);
-    BAIL_IF_MACRO(!readui16(io, &ui16), ERRPASS, 0);
-    BAIL_IF_MACRO(ui16 != entry->version_needed, PHYSFS_ERR_CORRUPT, 0);
-    BAIL_IF_MACRO(!readui16(io, &ui16), ERRPASS, 0);  /* general bits. */
-    BAIL_IF_MACRO(!readui16(io, &ui16), ERRPASS, 0);
-    BAIL_IF_MACRO(ui16 != entry->compression_method, PHYSFS_ERR_CORRUPT, 0);
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);  /* date/time */
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
-    BAIL_IF_MACRO(ui32 && (ui32 != entry->crc), PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!io->seek(io, entry->offset), 0);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
+    BAIL_IF(ui32 != ZIP_LOCAL_FILE_SIG, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui16(io, &ui16), 0);
+    BAIL_IF(ui16 != entry->version_needed, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui16(io, &ui16), 0);  /* general bits. */
+    BAIL_IF_ERRPASS(!readui16(io, &ui16), 0);
+    BAIL_IF(ui16 != entry->compression_method, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);  /* date/time */
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
+    BAIL_IF(ui32 && (ui32 != entry->crc), PHYSFS_ERR_CORRUPT, 0);
 
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
-    BAIL_IF_MACRO(ui32 && (ui32 != 0xFFFFFFFF) &&
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
+    BAIL_IF(ui32 && (ui32 != 0xFFFFFFFF) &&
                   (ui32 != entry->compressed_size), PHYSFS_ERR_CORRUPT, 0);
 
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
-    BAIL_IF_MACRO(ui32 && (ui32 != 0xFFFFFFFF) &&
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
+    BAIL_IF(ui32 && (ui32 != 0xFFFFFFFF) &&
                  (ui32 != entry->uncompressed_size), PHYSFS_ERR_CORRUPT, 0);
 
-    BAIL_IF_MACRO(!readui16(io, &fnamelen), ERRPASS, 0);
-    BAIL_IF_MACRO(!readui16(io, &extralen), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui16(io, &fnamelen), 0);
+    BAIL_IF_ERRPASS(!readui16(io, &extralen), 0);
 
     entry->offset += fnamelen + extralen + 30;
     return 1;
@@ -904,11 +904,11 @@
         return 1;   /* we're good. */
 
     /* Don't bother if we've failed to resolve this entry before. */
-    BAIL_IF_MACRO(resolve_type == ZIP_BROKEN_FILE, PHYSFS_ERR_CORRUPT, 0);
-    BAIL_IF_MACRO(resolve_type == ZIP_BROKEN_SYMLINK, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF(resolve_type == ZIP_BROKEN_FILE, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF(resolve_type == ZIP_BROKEN_SYMLINK, PHYSFS_ERR_CORRUPT, 0);
 
     /* uhoh...infinite symlink loop! */
-    BAIL_IF_MACRO(resolve_type == ZIP_RESOLVING, PHYSFS_ERR_SYMLINK_LOOP, 0);
+    BAIL_IF(resolve_type == ZIP_RESOLVING, PHYSFS_ERR_SYMLINK_LOOP, 0);
 
     /*
      * We fix up the offset to point to the actual data on the
@@ -962,13 +962,13 @@
         if (retval != NULL)
         {
             if (retval->resolved != ZIP_DIRECTORY)
-                BAIL_MACRO(PHYSFS_ERR_CORRUPT, NULL);
+                BAIL(PHYSFS_ERR_CORRUPT, NULL);
             return retval;  /* already hashed. */
         } /* if */
 
         /* okay, this is a new dir. Build and hash us. */
         retval = (ZIPentry *) allocator.Malloc(sizeof (ZIPentry) + namelen);
-        BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
         memset(retval, '\0', sizeof (*retval));
         retval->name = ((char *) retval) + sizeof (ZIPentry);
         memcpy(retval->name, name, namelen);
@@ -1098,7 +1098,7 @@
 
     /* sanity check with central directory signature... */
     if (!readui32(io, &ui32)) return NULL;
-    BAIL_IF_MACRO(ui32 != ZIP_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, NULL);
+    BAIL_IF(ui32 != ZIP_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, NULL);
 
     /* Get the pertinent parts of the record... */
     if (!readui16(io, &entry.version)) return NULL;
@@ -1123,7 +1123,7 @@
     offset = (PHYSFS_uint64) ui32;
 
     retval = (ZIPentry *) allocator.Malloc(sizeof (ZIPentry) + fnamelen + 1);
-    BAIL_IF_MACRO(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    BAIL_IF(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, 0);
     memcpy(retval, &entry, sizeof (*retval));
     retval->name = ((char *) retval) + sizeof (ZIPentry);
 
@@ -1182,11 +1182,11 @@
             break;
         } /* while */
 
-        GOTO_IF_MACRO(!found, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
+        GOTO_IF(!found, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
 
         if (retval->uncompressed_size == 0xFFFFFFFF)
         {
-            GOTO_IF_MACRO(len < 8, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
+            GOTO_IF(len < 8, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
             if (!readui64(io, &retval->uncompressed_size))
                 goto zip_load_entry_puked;
             len -= 8;
@@ -1194,7 +1194,7 @@
 
         if (retval->compressed_size == 0xFFFFFFFF)
         {
-            GOTO_IF_MACRO(len < 8, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
+            GOTO_IF(len < 8, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
             if (!readui64(io, &retval->compressed_size))
                 goto zip_load_entry_puked;
             len -= 8;
@@ -1202,7 +1202,7 @@
 
         if (offset == 0xFFFFFFFF)
         {
-            GOTO_IF_MACRO(len < 8, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
+            GOTO_IF(len < 8, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
             if (!readui64(io, &offset))
                 goto zip_load_entry_puked;
             len -= 8;
@@ -1210,16 +1210,16 @@
 
         if (starting_disk == 0xFFFFFFFF)
         {
-            GOTO_IF_MACRO(len < 8, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
+            GOTO_IF(len < 8, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
             if (!readui32(io, &starting_disk))
                 goto zip_load_entry_puked;
             len -= 4;
         } /* if */
 
-        GOTO_IF_MACRO(len != 0, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
+        GOTO_IF(len != 0, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
     } /* if */
 
-    GOTO_IF_MACRO(starting_disk != 0, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
+    GOTO_IF(starting_disk != 0, PHYSFS_ERR_CORRUPT, zip_load_entry_puked);
 
     retval->offset = offset + ofs_fixup;
 
@@ -1262,7 +1262,7 @@
             if (find->last_mod_time != 0)  /* duplicate? */
             {
                 allocator.Free(entry);
-                BAIL_MACRO(PHYSFS_ERR_CORRUPT, 0);
+                BAIL(PHYSFS_ERR_CORRUPT, 0);
             } /* if */
             else  /* we filled this in as a placeholder. Update it. */
             {
@@ -1319,8 +1319,8 @@
 
     /* Try offset specified in the Zip64 end of central directory locator. */
     /* This works if the entire PHYSFS_Io is the zip file. */
-    BAIL_IF_MACRO(!io->seek(io, offset), ERRPASS, -1);
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, -1);
+    BAIL_IF_ERRPASS(!io->seek(io, offset), -1);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), -1);
     if (ui32 == ZIP64_END_OF_CENTRAL_DIR_SIG)
         return offset;
 
@@ -1328,8 +1328,8 @@
     /* This works if the record isn't variable length and is version 1. */
     if (pos > 56)
     {
-        BAIL_IF_MACRO(!io->seek(io, pos-56), ERRPASS, -1);
-        BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, -1);
+        BAIL_IF_ERRPASS(!io->seek(io, pos-56), -1);
+        BAIL_IF_ERRPASS(!readui32(io, &ui32), -1);
         if (ui32 == ZIP64_END_OF_CENTRAL_DIR_SIG)
             return pos-56;
     } /* if */
@@ -1338,8 +1338,8 @@
     /* This works if the record isn't variable length and is version 2. */
     if (pos > 84)
     {
-        BAIL_IF_MACRO(!io->seek(io, pos-84), ERRPASS, -1);
-        BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, -1);
+        BAIL_IF_ERRPASS(!io->seek(io, pos-84), -1);
+        BAIL_IF_ERRPASS(!readui32(io, &ui32), -1);
         if (ui32 == ZIP64_END_OF_CENTRAL_DIR_SIG)
             return pos-84;
     } /* if */
@@ -1357,7 +1357,7 @@
             len = maxbuflen;
 
         buf = (PHYSFS_uint8 *) __PHYSFS_smallAlloc(len);
-        BAIL_IF_MACRO(!buf, PHYSFS_ERR_OUT_OF_MEMORY, -1);
+        BAIL_IF(!buf, PHYSFS_ERR_OUT_OF_MEMORY, -1);
 
         if (!io->seek(io, pos - len) || !__PHYSFS_readAll(io, buf, len))
         {
@@ -1378,7 +1378,7 @@
         __PHYSFS_smallFree(buf);
     } /* if */
 
-    BAIL_MACRO(PHYSFS_ERR_CORRUPT, -1);  /* didn't find it. */
+    BAIL(PHYSFS_ERR_CORRUPT, -1);  /* didn't find it. */
 } /* zip64_find_end_of_central_dir */
 
 
@@ -1398,22 +1398,22 @@
     if ((pos < 0) || (!io->seek(io, pos)))
         return 0;
 
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
     if (ui32 != ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR_SIG)
         return -1;  /* it's not a Zip64 archive. Not an error, though! */
 
     info->zip64 = 1;
 
     /* number of the disk with the start of the central directory. */
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
-    BAIL_IF_MACRO(ui32 != 0, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
+    BAIL_IF(ui32 != 0, PHYSFS_ERR_CORRUPT, 0);
 
     /* offset of Zip64 end of central directory record. */
-    BAIL_IF_MACRO(!readui64(io, &ui64), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui64(io, &ui64), 0);
 
     /* total number of disks */
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
-    BAIL_IF_MACRO(ui32 != 1, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
+    BAIL_IF(ui32 != 1, PHYSFS_ERR_CORRUPT, 0);
 
     pos = zip64_find_end_of_central_dir(io, pos, ui64);
     if (pos < 0)
@@ -1429,41 +1429,41 @@
     assert(((PHYSFS_uint64) pos) >= ui64);
     *data_start = ((PHYSFS_uint64) pos) - ui64;
 
-    BAIL_IF_MACRO(!io->seek(io, pos), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!io->seek(io, pos), 0);
 
     /* check signature again, just in case. */
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
-    BAIL_IF_MACRO(ui32 != ZIP64_END_OF_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
+    BAIL_IF(ui32 != ZIP64_END_OF_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, 0);
 
     /* size of Zip64 end of central directory record. */
-    BAIL_IF_MACRO(!readui64(io, &ui64), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui64(io, &ui64), 0);
 
     /* version made by. */
-    BAIL_IF_MACRO(!readui16(io, &ui16), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui16(io, &ui16), 0);
 
     /* version needed to extract. */
-    BAIL_IF_MACRO(!readui16(io, &ui16), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui16(io, &ui16), 0);
 
     /* number of this disk. */
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
-    BAIL_IF_MACRO(ui32 != 0, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
+    BAIL_IF(ui32 != 0, PHYSFS_ERR_CORRUPT, 0);
 
     /* number of disk with start of central directory record. */
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
-    BAIL_IF_MACRO(ui32 != 0, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
+    BAIL_IF(ui32 != 0, PHYSFS_ERR_CORRUPT, 0);
 
     /* total number of entries in the central dir on this disk */
-    BAIL_IF_MACRO(!readui64(io, &ui64), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui64(io, &ui64), 0);
 
     /* total number of entries in the central dir */
-    BAIL_IF_MACRO(!readui64(io, entry_count), ERRPASS, 0);
-    BAIL_IF_MACRO(ui64 != *entry_count, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui64(io, entry_count), 0);
+    BAIL_IF(ui64 != *entry_count, PHYSFS_ERR_CORRUPT, 0);
 
     /* size of the central directory */
-    BAIL_IF_MACRO(!readui64(io, &ui64), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui64(io, &ui64), 0);
 
     /* offset of central directory */
-    BAIL_IF_MACRO(!readui64(io, dir_ofs), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui64(io, dir_ofs), 0);
 
     /* Since we know the difference, fix up the central dir offset... */
     *dir_ofs += *data_start;
@@ -1493,12 +1493,12 @@
 
     /* find the end-of-central-dir record, and seek to it. */
     pos = zip_find_end_of_central_dir(io, &len);
-    BAIL_IF_MACRO(pos == -1, ERRPASS, 0);
-    BAIL_IF_MACRO(!io->seek(io, pos), ERRPASS, 0);
+    BAIL_IF_ERRPASS(pos == -1, 0);
+    BAIL_IF_ERRPASS(!io->seek(io, pos), 0);
 
     /* check signature again, just in case. */
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
-    BAIL_IF_MACRO(ui32 != ZIP_END_OF_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
+    BAIL_IF(ui32 != ZIP_END_OF_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, 0);
 
     /* Seek back to see if "Zip64 end of central directory locator" exists. */
     /* this record is 20 bytes before end-of-central-dir */
@@ -1512,32 +1512,32 @@
     assert(rc == -1);  /* no error, just not a Zip64 archive. */
 
     /* Not Zip64? Seek back to where we were and keep processing. */
-    BAIL_IF_MACRO(!io->seek(io, pos + 4), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!io->seek(io, pos + 4), 0);
 
     /* number of this disk */
-    BAIL_IF_MACRO(!readui16(io, &ui16), ERRPASS, 0);
-    BAIL_IF_MACRO(ui16 != 0, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui16(io, &ui16), 0);
+    BAIL_IF(ui16 != 0, PHYSFS_ERR_CORRUPT, 0);
 
     /* number of the disk with the start of the central directory */
-    BAIL_IF_MACRO(!readui16(io, &ui16), ERRPASS, 0);
-    BAIL_IF_MACRO(ui16 != 0, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui16(io, &ui16), 0);
+    BAIL_IF(ui16 != 0, PHYSFS_ERR_CORRUPT, 0);
 
     /* total number of entries in the central dir on this disk */
-    BAIL_IF_MACRO(!readui16(io, &ui16), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui16(io, &ui16), 0);
 
     /* total number of entries in the central dir */
-    BAIL_IF_MACRO(!readui16(io, &entryCount16), ERRPASS, 0);
-    BAIL_IF_MACRO(ui16 != entryCount16, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF_ERRPASS(!readui16(io, &entryCount16), 0);
+    BAIL_IF(ui16 != entryCount16, PHYSFS_ERR_CORRUPT, 0);
 
     *entry_count = entryCount16;
 
     /* size of the central directory */
-    BAIL_IF_MACRO(!readui32(io, &ui32), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui32(io, &ui32), 0);
 
     /* offset of central directory */
-    BAIL_IF_MACRO(!readui32(io, &offset32), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui32(io, &offset32), 0);
     *dir_ofs = (PHYSFS_uint64) offset32;
-    BAIL_IF_MACRO(pos < (*dir_ofs + ui32), PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF(pos < (*dir_ofs + ui32), PHYSFS_ERR_CORRUPT, 0);
 
     /*
      * For self-extracting archives, etc, there's crapola in the file
@@ -1553,14 +1553,14 @@
     *dir_ofs += *data_start;
 
     /* zipfile comment length */
-    BAIL_IF_MACRO(!readui16(io, &ui16), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!readui16(io, &ui16), 0);
 
     /*
      * Make sure that the comment length matches to the end of file...
      *  If it doesn't, we're either in the wrong part of the file, or the
      *  file is corrupted, but we give up either way.
      */
-    BAIL_IF_MACRO((pos + 22 + ui16) != len, PHYSFS_ERR_CORRUPT, 0);
+    BAIL_IF((pos + 22 + ui16) != len, PHYSFS_ERR_CORRUPT, 0);
 
     return 1;  /* made it. */
 } /* zip_parse_end_of_central_dir */
@@ -1576,7 +1576,7 @@
 
     alloclen = info->hashBuckets * sizeof (ZIPentry *);
     info->hash = (ZIPentry **) allocator.Malloc(alloclen);
-    BAIL_IF_MACRO(!info->hash, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    BAIL_IF(!info->hash, PHYSFS_ERR_OUT_OF_MEMORY, 0);
     memset(info->hash, '\0', alloclen);
 
     return 1;
@@ -1593,11 +1593,11 @@
 
     assert(io != NULL);  /* shouldn't ever happen. */
 
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
-    BAIL_IF_MACRO(!isZip(io), ERRPASS, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF_ERRPASS(!isZip(io), NULL);
 
     info = (ZIPinfo *) allocator.Malloc(sizeof (ZIPinfo));
-    BAIL_IF_MACRO(!info, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     memset(info, '\0', sizeof (ZIPinfo));
     info->root.resolved = ZIP_DIRECTORY;
     info->io = io;
@@ -1640,7 +1640,7 @@
 {
     int success;
     PHYSFS_Io *retval = io->duplicate(io);
-    BAIL_IF_MACRO(!retval, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!retval, NULL);
 
     /* !!! FIXME: if you open a dir here, it should bail ERR_NOT_A_FILE */
 
@@ -1680,7 +1680,7 @@
         {
             const PHYSFS_uint64 len = (PHYSFS_uint64) (ptr - filename);
             char *str = (char *) __PHYSFS_smallAlloc(len + 1);
-            BAIL_IF_MACRO(!str, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+            BAIL_IF(!str, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
             memcpy(str, filename, len);
             str[len] = '\0';
             entry = zip_find_entry(info, str);
@@ -1689,17 +1689,17 @@
         } /* if */
     } /* if */
 
-    BAIL_IF_MACRO(!entry, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!entry, NULL);
 
     retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io));
-    GOTO_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed);
+    GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed);
 
     finfo = (ZIPfileinfo *) allocator.Malloc(sizeof (ZIPfileinfo));
-    GOTO_IF_MACRO(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed);
+    GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed);
     memset(finfo, '\0', sizeof (ZIPfileinfo));
 
     io = zip_get_io(info->io, info, entry);
-    GOTO_IF_MACRO(!io, ERRPASS, ZIP_openRead_failed);
+    GOTO_IF_ERRPASS(!io, ZIP_openRead_failed);
     finfo->io = io;
     finfo->entry = ((entry->symlink != NULL) ? entry->symlink : entry);
     initializeZStream(&finfo->stream);
@@ -1708,17 +1708,17 @@
     {
         finfo->buffer = (PHYSFS_uint8 *) allocator.Malloc(ZIP_READBUFSIZE);
         if (!finfo->buffer)
-            GOTO_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed);
+            GOTO(PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed);
         else if (zlib_err(inflateInit2(&finfo->stream, -MAX_WBITS)) != Z_OK)
             goto ZIP_openRead_failed;
     } /* if */
 
     if (!zip_entry_is_tradional_crypto(entry))
-        GOTO_IF_MACRO(password != NULL, PHYSFS_ERR_BAD_PASSWORD, ZIP_openRead_failed);
+        GOTO_IF(password != NULL, PHYSFS_ERR_BAD_PASSWORD, ZIP_openRead_failed);
     else
     {
         PHYSFS_uint8 crypto_header[12];
-        GOTO_IF_MACRO(password == NULL, PHYSFS_ERR_BAD_PASSWORD, ZIP_openRead_failed);
+        GOTO_IF(password == NULL, PHYSFS_ERR_BAD_PASSWORD, ZIP_openRead_failed);
         if (io->read(io, crypto_header, 12) != 12)
             goto ZIP_openRead_failed;
         else if (!zip_prep_crypto_keys(finfo, crypto_header, password))
@@ -1754,13 +1754,13 @@
 
 static PHYSFS_Io *ZIP_openWrite(void *opaque, const char *filename)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL(PHYSFS_ERR_READ_ONLY, NULL);
 } /* ZIP_openWrite */
 
 
 static PHYSFS_Io *ZIP_openAppend(void *opaque, const char *filename)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL(PHYSFS_ERR_READ_ONLY, NULL);
 } /* ZIP_openAppend */
 
 
@@ -1799,13 +1799,13 @@
 
 static int ZIP_remove(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
+    BAIL(PHYSFS_ERR_READ_ONLY, 0);
 } /* ZIP_remove */
 
 
 static int ZIP_mkdir(void *opaque, const char *name)
 {
-    BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
+    BAIL(PHYSFS_ERR_READ_ONLY, 0);
 } /* ZIP_mkdir */
 
 
--- a/src/physfs.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/physfs.c	Thu Jul 06 11:51:41 2017 -0400
@@ -154,11 +154,11 @@
     assert((mode == 'r') || (mode == 'w') || (mode == 'a'));
 
     io = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io));
-    GOTO_IF_MACRO(!io, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed);
+    GOTO_IF(!io, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed);
     info = (NativeIoInfo *) allocator.Malloc(sizeof (NativeIoInfo));
-    GOTO_IF_MACRO(!info, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed);
+    GOTO_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed);
     pathdup = (char *) allocator.Malloc(strlen(path) + 1);
-    GOTO_IF_MACRO(!pathdup, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed);
+    GOTO_IF(!pathdup, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed);
 
     if (mode == 'r')
         handle = __PHYSFS_platformOpenRead(path);
@@ -167,7 +167,7 @@
     else if (mode == 'a')
         handle = __PHYSFS_platformOpenAppend(path);
 
-    GOTO_IF_MACRO(!handle, ERRPASS, createNativeIo_failed);
+    GOTO_IF_ERRPASS(!handle, createNativeIo_failed);
 
     strcpy(pathdup, path);
     info->handle = handle;
@@ -218,13 +218,13 @@
 static PHYSFS_sint64 memoryIo_write(PHYSFS_Io *io, const void *buffer,
                                     PHYSFS_uint64 len)
 {
-    BAIL_MACRO(PHYSFS_ERR_OPEN_FOR_READING, -1);
+    BAIL(PHYSFS_ERR_OPEN_FOR_READING, -1);
 } /* memoryIo_write */
 
 static int memoryIo_seek(PHYSFS_Io *io, PHYSFS_uint64 offset)
 {
     MemoryIoInfo *info = (MemoryIoInfo *) io->opaque;
-    BAIL_IF_MACRO(offset > info->len, PHYSFS_ERR_PAST_EOF, 0);
+    BAIL_IF(offset > info->len, PHYSFS_ERR_PAST_EOF, 0);
     info->pos = offset;
     return 1;
 } /* memoryIo_seek */
@@ -258,12 +258,12 @@
     /* we're the parent. */
 
     retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io));
-    BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     newinfo = (MemoryIoInfo *) allocator.Malloc(sizeof (MemoryIoInfo));
     if (!newinfo)
     {
         allocator.Free(retval);
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     } /* if */
 
     /* !!! FIXME: want lockless atomic increment. */
@@ -346,9 +346,9 @@
     MemoryIoInfo *info = NULL;
 
     io = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io));
-    GOTO_IF_MACRO(!io, PHYSFS_ERR_OUT_OF_MEMORY, createMemoryIo_failed);
+    GOTO_IF(!io, PHYSFS_ERR_OUT_OF_MEMORY, createMemoryIo_failed);
     info = (MemoryIoInfo *) allocator.Malloc(sizeof (MemoryIoInfo));
-    GOTO_IF_MACRO(!info, PHYSFS_ERR_OUT_OF_MEMORY, createMemoryIo_failed);
+    GOTO_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, createMemoryIo_failed);
 
     memset(info, '\0', sizeof (*info));
     info->buf = (const PHYSFS_uint8 *) buf;
@@ -407,24 +407,24 @@
     FileHandle *newfh = (FileHandle *) allocator.Malloc(sizeof (FileHandle));
     PHYSFS_Io *retval = NULL;
 
-    GOTO_IF_MACRO(!newfh, PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed);
+    GOTO_IF(!newfh, PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed);
     memset(newfh, '\0', sizeof (*newfh));
 
     retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io));
-    GOTO_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed);
+    GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed);
 
 #if 0  /* we don't buffer the duplicate, at least not at the moment. */
     if (origfh->buffer != NULL)
     {
         newfh->buffer = (PHYSFS_uint8 *) allocator.Malloc(origfh->bufsize);
         if (!newfh->buffer)
-            GOTO_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed);
+            GOTO(PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed);
         newfh->bufsize = origfh->bufsize;
     } /* if */
 #endif
 
     newfh->io = origfh->io->duplicate(origfh->io);
-    GOTO_IF_MACRO(!newfh->io, ERRPASS, handleIo_dupe_failed);
+    GOTO_IF_ERRPASS(!newfh->io, handleIo_dupe_failed);
 
     newfh->forReading = origfh->forReading;
     newfh->dirHandle = origfh->dirHandle;
@@ -485,7 +485,7 @@
 static PHYSFS_Io *__PHYSFS_createHandleIo(PHYSFS_File *f)
 {
     PHYSFS_Io *io = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io));
-    BAIL_IF_MACRO(!io, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!io, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     memcpy(io, &__PHYSFS_handleIoInterface, sizeof (*io));
     io->opaque = f;
     return io;
@@ -534,7 +534,7 @@
     EnumStringListCallbackData ecd;
     memset(&ecd, '\0', sizeof (ecd));
     ecd.list = (char **) allocator.Malloc(sizeof (char *));
-    BAIL_IF_MACRO(!ecd.list, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!ecd.list, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     func(enumStringListCallback, &ecd);
 
     if (ecd.errcode)
@@ -803,7 +803,7 @@
     void *opaque = NULL;
 
     if (io != NULL)
-        BAIL_IF_MACRO(!io->seek(io, 0), ERRPASS, NULL);
+        BAIL_IF_ERRPASS(!io->seek(io, 0), NULL);
 
     opaque = funcs->openArchive(io, d, forWriting);
     if (opaque != NULL)
@@ -842,7 +842,7 @@
             return retval;
 
         io = __PHYSFS_createNativeIo(d, forWriting ? 'w' : 'r');
-        BAIL_IF_MACRO(!io, ERRPASS, 0);
+        BAIL_IF_ERRPASS(!io, 0);
         created_io = 1;
     } /* if */
 
@@ -873,7 +873,7 @@
     if ((!retval) && (created_io))
         io->destroy(io);
 
-    BAIL_IF_MACRO(!retval, PHYSFS_ERR_UNSUPPORTED, NULL);
+    BAIL_IF(!retval, PHYSFS_ERR_UNSUPPORTED, NULL);
     return retval;
 } /* openDirectory */
 
@@ -900,13 +900,13 @@
         ch = *(src++);
 
         if ((ch == ':') || (ch == '\\'))  /* illegal chars in a physfs path. */
-            BAIL_MACRO(PHYSFS_ERR_BAD_FILENAME, 0);
+            BAIL(PHYSFS_ERR_BAD_FILENAME, 0);
 
         if (ch == '/')   /* path separator. */
         {
             *dst = '\0';  /* "." and ".." are illegal pathnames. */
             if ((strcmp(prev, ".") == 0) || (strcmp(prev, "..") == 0))
-                BAIL_MACRO(PHYSFS_ERR_BAD_FILENAME, 0);
+                BAIL(PHYSFS_ERR_BAD_FILENAME, 0);
 
             while (*src == '/')   /* chop out doubles... */
                 src++;
@@ -972,14 +972,14 @@
     {
         const size_t len = strlen(mountPoint) + 1;
         tmpmntpnt = (char *) __PHYSFS_smallAlloc(len);
-        GOTO_IF_MACRO(!tmpmntpnt, PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle);
+        GOTO_IF(!tmpmntpnt, PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle);
         if (!sanitizePlatformIndependentPath(mountPoint, tmpmntpnt))
             goto badDirHandle;
         mountPoint = tmpmntpnt;  /* sanitized version. */
     } /* if */
 
     dirHandle = openDirectory(io, newDir, forWriting);
-    GOTO_IF_MACRO(!dirHandle, ERRPASS, badDirHandle);
+    GOTO_IF_ERRPASS(!dirHandle, badDirHandle);
 
     if (newDir == NULL)
         dirHandle->dirName = NULL;
@@ -987,7 +987,7 @@
     {
         dirHandle->dirName = (char *) allocator.Malloc(strlen(newDir) + 1);
         if (!dirHandle->dirName)
-            GOTO_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle);
+            GOTO(PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle);
         strcpy(dirHandle->dirName, newDir);
     } /* else */
 
@@ -995,7 +995,7 @@
     {
         dirHandle->mountPoint = (char *)allocator.Malloc(strlen(mountPoint)+2);
         if (!dirHandle->mountPoint)
-            GOTO_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle);
+            GOTO(PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle);
         strcpy(dirHandle->mountPoint, mountPoint);
         strcat(dirHandle->mountPoint, "/");
     } /* if */
@@ -1026,7 +1026,7 @@
         return 1;
 
     for (i = openList; i != NULL; i = i->next)
-        BAIL_IF_MACRO(i->dirHandle == dh, PHYSFS_ERR_FILES_STILL_OPEN, 0);
+        BAIL_IF(i->dirHandle == dh, PHYSFS_ERR_FILES_STILL_OPEN, 0);
 
     dh->funcs->closeArchive(dh->opaque);
     allocator.Free(dh->dirName);
@@ -1048,21 +1048,21 @@
         return retval;
 
     /* We need argv0 to go on. */
-    BAIL_IF_MACRO(argv0 == NULL, PHYSFS_ERR_ARGV0_IS_NULL, NULL);
+    BAIL_IF(argv0 == NULL, PHYSFS_ERR_ARGV0_IS_NULL, NULL);
 
     ptr = strrchr(argv0, dirsep);
     if (ptr != NULL)
     {
         const size_t size = ((size_t) (ptr - argv0)) + 1;
         retval = (char *) allocator.Malloc(size + 1);
-        BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
         memcpy(retval, argv0, size);
         retval[size] = '\0';
         return retval;
     } /* if */
 
     /* argv0 wasn't helpful. */
-    BAIL_MACRO(PHYSFS_ERR_INVALID_ARGUMENT, NULL);
+    BAIL(PHYSFS_ERR_INVALID_ARGUMENT, NULL);
 } /* calculateBaseDir */
 
 
@@ -1143,7 +1143,7 @@
 
 int PHYSFS_init(const char *argv0)
 {
-    BAIL_IF_MACRO(initialized, PHYSFS_ERR_IS_INITIALIZED, 0);
+    BAIL_IF(initialized, PHYSFS_ERR_IS_INITIALIZED, 0);
 
     if (!externalAllocator)
         setDefaultAllocator();
@@ -1254,7 +1254,7 @@
 
     /* make sure nothing is still using this archiver */
     if (archiverInUse(arc, searchPath) || archiverInUse(arc, writeDir))
-        BAIL_MACRO(PHYSFS_ERR_FILES_STILL_OPEN, 0);
+        BAIL(PHYSFS_ERR_FILES_STILL_OPEN, 0);
 
     allocator.Free((void *) info->extension);
     allocator.Free((void *) info->description);
@@ -1291,7 +1291,7 @@
 static int doDeinit(void)
 {
     closeFileHandleList(&openWriteList);
-    BAIL_IF_MACRO(!PHYSFS_setWriteDir(NULL), PHYSFS_ERR_FILES_STILL_OPEN, 0);
+    BAIL_IF(!PHYSFS_setWriteDir(NULL), PHYSFS_ERR_FILES_STILL_OPEN, 0);
 
     freeSearchPath();
     freeArchivers();
@@ -1339,7 +1339,7 @@
     errorLock = stateLock = NULL;
 
     /* !!! FIXME: what on earth are you supposed to do if this fails? */
-    BAIL_IF_MACRO(!__PHYSFS_platformDeinit(), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!__PHYSFS_platformDeinit(), 0);
 
     return 1;
 } /* doDeinit */
@@ -1347,7 +1347,7 @@
 
 int PHYSFS_deinit(void)
 {
-    BAIL_IF_MACRO(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0);
+    BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0);
     return doDeinit();
 } /* PHYSFS_deinit */
 
@@ -1387,32 +1387,32 @@
     void *ptr = NULL;
     size_t i;
 
-    BAIL_IF_MACRO(!_archiver, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(_archiver->version > maxver, PHYSFS_ERR_UNSUPPORTED, 0);
-    BAIL_IF_MACRO(!_archiver->info.extension, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->info.description, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->info.author, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->info.url, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->openArchive, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->enumerateFiles, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->openRead, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->openWrite, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->openAppend, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->remove, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->mkdir, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->closeArchive, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!_archiver->stat, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(_archiver->version > maxver, PHYSFS_ERR_UNSUPPORTED, 0);
+    BAIL_IF(!_archiver->info.extension, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->info.description, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->info.author, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->info.url, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->openArchive, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->enumerateFiles, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->openRead, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->openWrite, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->openAppend, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->remove, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->mkdir, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->closeArchive, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_archiver->stat, PHYSFS_ERR_INVALID_ARGUMENT, 0);
 
     ext = _archiver->info.extension;
     for (i = 0; i < numArchivers; i++)
     {
         if (__PHYSFS_utf8stricmp(archiveInfo[i]->extension, ext) == 0)
-            BAIL_MACRO(PHYSFS_ERR_DUPLICATE, 0);  /* !!! FIXME: better error? ERR_IN_USE? */
+            BAIL(PHYSFS_ERR_DUPLICATE, 0);  /* !!! FIXME: better error? ERR_IN_USE? */
     } /* for */
 
     /* make a copy of the data. */
     archiver = (PHYSFS_Archiver *) allocator.Malloc(sizeof (*archiver));
-    GOTO_IF_MACRO(!archiver, PHYSFS_ERR_OUT_OF_MEMORY, regfailed);
+    GOTO_IF(!archiver, PHYSFS_ERR_OUT_OF_MEMORY, regfailed);
 
     /* Must copy sizeof (OLD_VERSION_OF_STRUCT) when version changes! */
     memcpy(archiver, _archiver, sizeof (*archiver));
@@ -1421,7 +1421,7 @@
     memset(info, '\0', sizeof (*info));  /* NULL in case an alloc fails. */
     #define CPYSTR(item) \
         info->item = __PHYSFS_strdup(_archiver->info.item); \
-        GOTO_IF_MACRO(!info->item, PHYSFS_ERR_OUT_OF_MEMORY, regfailed);
+        GOTO_IF(!info->item, PHYSFS_ERR_OUT_OF_MEMORY, regfailed);
     CPYSTR(extension);
     CPYSTR(description);
     CPYSTR(author);
@@ -1430,11 +1430,11 @@
     #undef CPYSTR
 
     ptr = allocator.Realloc(archiveInfo, len);
-    GOTO_IF_MACRO(!ptr, PHYSFS_ERR_OUT_OF_MEMORY, regfailed);
+    GOTO_IF(!ptr, PHYSFS_ERR_OUT_OF_MEMORY, regfailed);
     archiveInfo = (const PHYSFS_ArchiveInfo **) ptr;
 
     ptr = allocator.Realloc(archivers, len);
-    GOTO_IF_MACRO(!ptr, PHYSFS_ERR_OUT_OF_MEMORY, regfailed);
+    GOTO_IF(!ptr, PHYSFS_ERR_OUT_OF_MEMORY, regfailed);
     archivers = (const PHYSFS_Archiver **) ptr;
 
     archiveInfo[numArchivers] = info;
@@ -1464,7 +1464,7 @@
 int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver)
 {
     int retval;
-    BAIL_IF_MACRO(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0);
+    BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0);
     __PHYSFS_platformGrabMutex(stateLock);
     retval = doRegisterArchiver(archiver);
     __PHYSFS_platformReleaseMutex(stateLock);
@@ -1476,8 +1476,8 @@
 {
     size_t i;
 
-    BAIL_IF_MACRO(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0);
-    BAIL_IF_MACRO(!ext, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0);
+    BAIL_IF(!ext, PHYSFS_ERR_INVALID_ARGUMENT, 0);
 
     __PHYSFS_platformGrabMutex(stateLock);
     for (i = 0; i < numArchivers; i++)
@@ -1491,13 +1491,13 @@
     } /* for */
     __PHYSFS_platformReleaseMutex(stateLock);
 
-    BAIL_MACRO(PHYSFS_ERR_NOT_FOUND, 0);
+    BAIL(PHYSFS_ERR_NOT_FOUND, 0);
 } /* PHYSFS_deregisterArchiver */
 
 
 const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void)
 {
-    BAIL_IF_MACRO(!initialized, PHYSFS_ERR_NOT_INITIALIZED, NULL);
+    BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, NULL);
     return archiveInfo;
 } /* PHYSFS_supportedArchiveTypes */
 
@@ -1541,15 +1541,15 @@
     char *ptr = NULL;
     char *endstr = NULL;
 
-    BAIL_IF_MACRO(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0);
-    BAIL_IF_MACRO(!org, PHYSFS_ERR_INVALID_ARGUMENT, NULL);
-    BAIL_IF_MACRO(*org == '\0', PHYSFS_ERR_INVALID_ARGUMENT, NULL);
-    BAIL_IF_MACRO(!app, PHYSFS_ERR_INVALID_ARGUMENT, NULL);
-    BAIL_IF_MACRO(*app == '\0', PHYSFS_ERR_INVALID_ARGUMENT, NULL);
+    BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0);
+    BAIL_IF(!org, PHYSFS_ERR_INVALID_ARGUMENT, NULL);
+    BAIL_IF(*org == '\0', PHYSFS_ERR_INVALID_ARGUMENT, NULL);
+    BAIL_IF(!app, PHYSFS_ERR_INVALID_ARGUMENT, NULL);
+    BAIL_IF(*app == '\0', PHYSFS_ERR_INVALID_ARGUMENT, NULL);
 
     allocator.Free(prefDir);
     prefDir = __PHYSFS_platformCalcPrefDir(org, app);
-    BAIL_IF_MACRO(!prefDir, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!prefDir, NULL);
 
     assert(strlen(prefDir) > 0);
     endstr = prefDir + (strlen(prefDir) - 1);
@@ -1617,7 +1617,7 @@
 
     if (writeDir != NULL)
     {
-        BAIL_IF_MACRO_MUTEX(!freeDirHandle(writeDir, openWriteList), ERRPASS,
+        BAIL_IF_MUTEX_ERRPASS(!freeDirHandle(writeDir, openWriteList),
                             stateLock, 0);
         writeDir = NULL;
     } /* if */
@@ -1653,13 +1653,13 @@
         {
             /* already in search path? */
             if ((i->dirName != NULL) && (strcmp(fname, i->dirName) == 0))
-                BAIL_MACRO_MUTEX(ERRPASS, stateLock, 1);
+                BAIL_MUTEX_ERRPASS(stateLock, 1);
             prev = i;
         } /* for */
     } /* if */
 
     dh = createDirHandle(io, fname, mountPoint, 0);
-    BAIL_IF_MACRO_MUTEX(!dh, ERRPASS, stateLock, 0);
+    BAIL_IF_MUTEX_ERRPASS(!dh, stateLock, 0);
 
     if (appendToPath)
     {
@@ -1682,8 +1682,8 @@
 int PHYSFS_mountIo(PHYSFS_Io *io, const char *fname,
                    const char *mountPoint, int appendToPath)
 {
-    BAIL_IF_MACRO(!io, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(io->version != 0, PHYSFS_ERR_UNSUPPORTED, 0);
+    BAIL_IF(!io, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(io->version != 0, PHYSFS_ERR_UNSUPPORTED, 0);
     return doMount(io, fname, mountPoint, appendToPath);
 } /* PHYSFS_mountIo */
 
@@ -1695,10 +1695,10 @@
     int retval = 0;
     PHYSFS_Io *io = NULL;
 
-    BAIL_IF_MACRO(!buf, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!buf, PHYSFS_ERR_INVALID_ARGUMENT, 0);
 
     io = __PHYSFS_createMemoryIo(buf, len, del);
-    BAIL_IF_MACRO(!io, ERRPASS, 0);
+    BAIL_IF_ERRPASS(!io, 0);
     retval = doMount(io, fname, mountPoint, appendToPath);
     if (!retval)
     {
@@ -1718,10 +1718,10 @@
     int retval = 0;
     PHYSFS_Io *io = NULL;
 
-    BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(file == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0);
 
     io = __PHYSFS_createHandleIo(file);
-    BAIL_IF_MACRO(!io, ERRPASS, 0);
+    BAIL_IF_ERRPASS(!io, 0);
     retval = doMount(io, fname, mountPoint, appendToPath);
     if (!retval)
     {
@@ -1736,7 +1736,7 @@
 
 int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath)
 {
-    BAIL_IF_MACRO(!newDir, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!newDir, PHYSFS_ERR_INVALID_ARGUMENT, 0);
     return doMount(NULL, newDir, mountPoint, appendToPath);
 } /* PHYSFS_mount */
 
@@ -1759,7 +1759,7 @@
     DirHandle *prev = NULL;
     DirHandle *next = NULL;
 
-    BAIL_IF_MACRO(oldDir == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(oldDir == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0);
 
     __PHYSFS_platformGrabMutex(stateLock);
     for (i = searchPath; i != NULL; i = i->next)
@@ -1767,7 +1767,7 @@
         if (strcmp(i->dirName, oldDir) == 0)
         {
             next = i->next;
-            BAIL_IF_MACRO_MUTEX(!freeDirHandle(i, openReadList), ERRPASS,
+            BAIL_IF_MUTEX_ERRPASS(!freeDirHandle(i, openReadList),
                                 stateLock, 0);
 
             if (prev == NULL)
@@ -1775,12 +1775,12 @@
             else
                 prev->next = next;
 
-            BAIL_MACRO_MUTEX(ERRPASS, stateLock, 1);
+            BAIL_MUTEX_ERRPASS(stateLock, 1);
         } /* if */
         prev = i;
     } /* for */
 
-    BAIL_MACRO_MUTEX(PHYSFS_ERR_NOT_MOUNTED, stateLock, 0);
+    BAIL_MUTEX(PHYSFS_ERR_NOT_MOUNTED, stateLock, 0);
 } /* PHYSFS_unmount */
 
 
@@ -1805,7 +1805,7 @@
     } /* for */
     __PHYSFS_platformReleaseMutex(stateLock);
 
-    BAIL_MACRO(PHYSFS_ERR_NOT_MOUNTED, NULL);
+    BAIL(PHYSFS_ERR_NOT_MOUNTED, NULL);
 } /* PHYSFS_getMountPoint */
 
 
@@ -1846,15 +1846,15 @@
     const char *basedir;
     const char *prefdir;
 
-    BAIL_IF_MACRO(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0);
+    BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0);
 
     prefdir = PHYSFS_getPrefDir(organization, appName);
-    BAIL_IF_MACRO(!prefdir, ERRPASS, 0);
+    BAIL_IF_ERRPASS(!prefdir, 0);
 
     basedir = PHYSFS_getBaseDir();
-    BAIL_IF_MACRO(!basedir, ERRPASS, 0);
-
-    BAIL_IF_MACRO(!PHYSFS_setWriteDir(prefdir), PHYSFS_ERR_NO_WRITE_DIR, 0);
+    BAIL_IF_ERRPASS(!basedir, 0);
+
+    BAIL_IF(!PHYSFS_setWriteDir(prefdir), PHYSFS_ERR_NO_WRITE_DIR, 0);
 
     /* Put write dir first in search path... */
     PHYSFS_mount(prefdir, NULL, 0);
@@ -1947,12 +1947,12 @@
         size_t len = strlen(fname);
         assert(mntpntlen > 1); /* root mount points should be NULL. */
         /* not under the mountpoint, so skip this archive. */
-        BAIL_IF_MACRO(len < mntpntlen-1, PHYSFS_ERR_NOT_FOUND, 0);
+        BAIL_IF(len < mntpntlen-1, PHYSFS_ERR_NOT_FOUND, 0);
         /* !!! FIXME: Case insensitive? */
         retval = strncmp(h->mountPoint, fname, mntpntlen-1);
-        BAIL_IF_MACRO(retval != 0, PHYSFS_ERR_NOT_FOUND, 0);
+        BAIL_IF(retval != 0, PHYSFS_ERR_NOT_FOUND, 0);
         if (len > mntpntlen-1)  /* corner case... */
-            BAIL_IF_MACRO(fname[mntpntlen-1]!='/', PHYSFS_ERR_NOT_FOUND, 0);
+            BAIL_IF(fname[mntpntlen-1]!='/', PHYSFS_ERR_NOT_FOUND, 0);
         fname += mntpntlen-1;  /* move to start of actual archive path. */
         if (*fname == '/')
             fname++;
@@ -1979,7 +1979,7 @@
             if (end != NULL) *end = '/';
 
             /* insecure path (has a disallowed symlink in it)? */
-            BAIL_IF_MACRO(rc, PHYSFS_ERR_SYMLINK_FORBIDDEN, 0);
+            BAIL_IF(rc, PHYSFS_ERR_SYMLINK_FORBIDDEN, 0);
 
             /* break out early if path element is missing. */
             if (!retval)
@@ -2013,12 +2013,12 @@
     int retval = 0;
     int exists = 1;  /* force existance check on first path element. */
 
-    BAIL_IF_MACRO(!sanitizePlatformIndependentPath(_dname, dname), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!sanitizePlatformIndependentPath(_dname, dname), 0);
 
     __PHYSFS_platformGrabMutex(stateLock);
-    BAIL_IF_MACRO_MUTEX(!writeDir, PHYSFS_ERR_NO_WRITE_DIR, stateLock, 0);
+    BAIL_IF_MUTEX(!writeDir, PHYSFS_ERR_NO_WRITE_DIR, stateLock, 0);
     h = writeDir;
-    BAIL_IF_MACRO_MUTEX(!verifyPath(h, &dname, 1), ERRPASS, stateLock, 0);
+    BAIL_IF_MUTEX_ERRPASS(!verifyPath(h, &dname, 1), stateLock, 0);
 
     start = dname;
     while (1)
@@ -2061,10 +2061,10 @@
     char *dname;
     size_t len;
 
-    BAIL_IF_MACRO(!_dname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_dname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
     len = strlen(_dname) + 1;
     dname = (char *) __PHYSFS_smallAlloc(len);
-    BAIL_IF_MACRO(!dname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    BAIL_IF(!dname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
     retval = doMkdir(_dname, dname);
     __PHYSFS_smallFree(dname);
     return retval;
@@ -2075,13 +2075,13 @@
 {
     int retval;
     DirHandle *h;
-    BAIL_IF_MACRO(!sanitizePlatformIndependentPath(_fname, fname), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!sanitizePlatformIndependentPath(_fname, fname), 0);
 
     __PHYSFS_platformGrabMutex(stateLock);
 
-    BAIL_IF_MACRO_MUTEX(!writeDir, PHYSFS_ERR_NO_WRITE_DIR, stateLock, 0);
+    BAIL_IF_MUTEX(!writeDir, PHYSFS_ERR_NO_WRITE_DIR, stateLock, 0);
     h = writeDir;
-    BAIL_IF_MACRO_MUTEX(!verifyPath(h, &fname, 0), ERRPASS, stateLock, 0);
+    BAIL_IF_MUTEX_ERRPASS(!verifyPath(h, &fname, 0), stateLock, 0);
     retval = h->funcs->remove(h->opaque, fname);
 
     __PHYSFS_platformReleaseMutex(stateLock);
@@ -2095,10 +2095,10 @@
     char *fname;
     size_t len;
 
-    BAIL_IF_MACRO(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
     len = strlen(_fname) + 1;
     fname = (char *) __PHYSFS_smallAlloc(len);
-    BAIL_IF_MACRO(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
     retval = doDelete(_fname, fname);
     __PHYSFS_smallFree(fname);
     return retval;
@@ -2111,10 +2111,10 @@
     char *fname = NULL;
     size_t len;
 
-    BAIL_IF_MACRO(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, NULL);
+    BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, NULL);
     len = strlen(_fname) + 1;
     fname = __PHYSFS_smallAlloc(len);
-    BAIL_IF_MACRO(!fname, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     if (sanitizePlatformIndependentPath(_fname, fname))
     {
         DirHandle *i;
@@ -2218,7 +2218,7 @@
     EnumStringListCallbackData ecd;
     memset(&ecd, '\0', sizeof (ecd));
     ecd.list = (char **) allocator.Malloc(sizeof (char *));
-    BAIL_IF_MACRO(!ecd.list, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!ecd.list, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     PHYSFS_enumerateFilesCallback(path, enumFilesCallback, &ecd);
     ecd.list[ecd.size] = NULL;
     return ecd.list;
@@ -2293,12 +2293,12 @@
     size_t len;
     char *fname;
 
-    BAIL_IF_MACRO(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, ) /*0*/;
-    BAIL_IF_MACRO(!callback, PHYSFS_ERR_INVALID_ARGUMENT, ) /*0*/;
+    BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, ) /*0*/;
+    BAIL_IF(!callback, PHYSFS_ERR_INVALID_ARGUMENT, ) /*0*/;
 
     len = strlen(_fname) + 1;
     fname = (char *) __PHYSFS_smallAlloc(len);
-    BAIL_IF_MACRO(!fname, PHYSFS_ERR_OUT_OF_MEMORY, ) /*0*/;
+    BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, ) /*0*/;
 
     if (sanitizePlatformIndependentPath(_fname, fname))
     {
@@ -2352,7 +2352,7 @@
 PHYSFS_sint64 PHYSFS_getLastModTime(const char *fname)
 {
     PHYSFS_Stat statbuf;
-    BAIL_IF_MACRO(!PHYSFS_stat(fname, &statbuf), ERRPASS, -1);
+    BAIL_IF_ERRPASS(!PHYSFS_stat(fname, &statbuf), -1);
     return statbuf.modtime;
 } /* PHYSFS_getLastModTime */
 
@@ -2360,7 +2360,7 @@
 int PHYSFS_isDirectory(const char *fname)
 {
     PHYSFS_Stat statbuf;
-    BAIL_IF_MACRO(!PHYSFS_stat(fname, &statbuf), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!PHYSFS_stat(fname, &statbuf), 0);
     return (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY);
 } /* PHYSFS_isDirectory */
 
@@ -2368,7 +2368,7 @@
 int PHYSFS_isSymbolicLink(const char *fname)
 {
     PHYSFS_Stat statbuf;
-    BAIL_IF_MACRO(!PHYSFS_stat(fname, &statbuf), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!PHYSFS_stat(fname, &statbuf), 0);
     return (statbuf.filetype == PHYSFS_FILETYPE_SYMLINK);
 } /* PHYSFS_isSymbolicLink */
 
@@ -2379,10 +2379,10 @@
     size_t len;
     char *fname;
 
-    BAIL_IF_MACRO(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
     len = strlen(_fname) + 1;
     fname = (char *) __PHYSFS_smallAlloc(len);
-    BAIL_IF_MACRO(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
 
     if (sanitizePlatformIndependentPath(_fname, fname))
     {
@@ -2392,10 +2392,10 @@
 
         __PHYSFS_platformGrabMutex(stateLock);
 
-        GOTO_IF_MACRO(!writeDir, PHYSFS_ERR_NO_WRITE_DIR, doOpenWriteEnd);
+        GOTO_IF(!writeDir, PHYSFS_ERR_NO_WRITE_DIR, doOpenWriteEnd);
 
         h = writeDir;
-        GOTO_IF_MACRO(!verifyPath(h, &fname, 0), ERRPASS, doOpenWriteEnd);
+        GOTO_IF_ERRPASS(!verifyPath(h, &fname, 0), doOpenWriteEnd);
 
         f = h->funcs;
         if (appending)
@@ -2403,13 +2403,13 @@
         else
             io = f->openWrite(h->opaque, fname);
 
-        GOTO_IF_MACRO(!io, ERRPASS, doOpenWriteEnd);
+        GOTO_IF_ERRPASS(!io, doOpenWriteEnd);
 
         fh = (FileHandle *) allocator.Malloc(sizeof (FileHandle));
         if (fh == NULL)
         {
             io->destroy(io);
-            GOTO_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, doOpenWriteEnd);
+            GOTO(PHYSFS_ERR_OUT_OF_MEMORY, doOpenWriteEnd);
         } /* if */
         else
         {
@@ -2447,10 +2447,10 @@
     char *fname;
     size_t len;
 
-    BAIL_IF_MACRO(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
     len = strlen(_fname) + 1;
     fname = (char *) __PHYSFS_smallAlloc(len);
-    BAIL_IF_MACRO(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
 
     if (sanitizePlatformIndependentPath(_fname, fname))
     {
@@ -2459,7 +2459,7 @@
 
         __PHYSFS_platformGrabMutex(stateLock);
 
-        GOTO_IF_MACRO(!searchPath, PHYSFS_ERR_NOT_FOUND, openReadEnd);
+        GOTO_IF(!searchPath, PHYSFS_ERR_NOT_FOUND, openReadEnd);
 
         for (i = searchPath; i != NULL; i = i->next)
         {
@@ -2472,13 +2472,13 @@
             } /* if */
         } /* for */
 
-        GOTO_IF_MACRO(!io, ERRPASS, openReadEnd);
+        GOTO_IF_ERRPASS(!io, openReadEnd);
 
         fh = (FileHandle *) allocator.Malloc(sizeof (FileHandle));
         if (fh == NULL)
         {
             io->destroy(io);
-            GOTO_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, openReadEnd);
+            GOTO(PHYSFS_ERR_OUT_OF_MEMORY, openReadEnd);
         } /* if */
 
         memset(fh, '\0', sizeof (FileHandle));
@@ -2541,15 +2541,15 @@
 
     /* -1 == close failure. 0 == not found. 1 == success. */
     rc = closeHandleInOpenList(&openReadList, handle);
-    BAIL_IF_MACRO_MUTEX(rc == -1, ERRPASS, stateLock, 0);
+    BAIL_IF_MUTEX_ERRPASS(rc == -1, stateLock, 0);
     if (!rc)
     {
         rc = closeHandleInOpenList(&openWriteList, handle);
-        BAIL_IF_MACRO_MUTEX(rc == -1, ERRPASS, stateLock, 0);
+        BAIL_IF_MUTEX_ERRPASS(rc == -1, stateLock, 0);
     } /* if */
 
     __PHYSFS_platformReleaseMutex(stateLock);
-    BAIL_IF_MACRO(!rc, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!rc, PHYSFS_ERR_INVALID_ARGUMENT, 0);
     return 1;
 } /* PHYSFS_close */
 
@@ -2632,11 +2632,11 @@
 #endif
 
     if (!__PHYSFS_ui64FitsAddressSpace(len))
-        BAIL_MACRO(PHYSFS_ERR_INVALID_ARGUMENT, -1);
-
-    BAIL_IF_MACRO(len > maxlen, PHYSFS_ERR_INVALID_ARGUMENT, -1);
-    BAIL_IF_MACRO(!fh->forReading, PHYSFS_ERR_OPEN_FOR_WRITING, -1);
-    BAIL_IF_MACRO(len == 0, ERRPASS, 0);
+        BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1);
+
+    BAIL_IF(len > maxlen, PHYSFS_ERR_INVALID_ARGUMENT, -1);
+    BAIL_IF(!fh->forReading, PHYSFS_ERR_OPEN_FOR_WRITING, -1);
+    BAIL_IF_ERRPASS(len == 0, 0);
     if (fh->buffer)
         return doBufferedRead(fh, buffer, len);
 
@@ -2658,7 +2658,7 @@
     } /* if */
 
     /* would overflow buffer. Flush and then write the new objects, too. */
-    BAIL_IF_MACRO(!PHYSFS_flush(handle), ERRPASS, -1);
+    BAIL_IF_ERRPASS(!PHYSFS_flush(handle), -1);
     return fh->io->write(fh->io, buffer, len);
 } /* doBufferedWrite */
 
@@ -2684,11 +2684,11 @@
 #endif
 
     if (!__PHYSFS_ui64FitsAddressSpace(len))
-        BAIL_MACRO(PHYSFS_ERR_INVALID_ARGUMENT, -1);
-
-    BAIL_IF_MACRO(len > maxlen, PHYSFS_ERR_INVALID_ARGUMENT, -1);
-    BAIL_IF_MACRO(fh->forReading, PHYSFS_ERR_OPEN_FOR_READING, -1);
-    BAIL_IF_MACRO(len == 0, ERRPASS, 0);
+        BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1);
+
+    BAIL_IF(len > maxlen, PHYSFS_ERR_INVALID_ARGUMENT, -1);
+    BAIL_IF(fh->forReading, PHYSFS_ERR_OPEN_FOR_READING, -1);
+    BAIL_IF_ERRPASS(len == 0, 0);
     if (fh->buffer)
         return doBufferedWrite(handle, buffer, len);
 
@@ -2733,7 +2733,7 @@
 int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos)
 {
     FileHandle *fh = (FileHandle *) handle;
-    BAIL_IF_MACRO(!PHYSFS_flush(handle), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!PHYSFS_flush(handle), 0);
 
     if (fh->buffer && fh->forReading)
     {
@@ -2767,11 +2767,11 @@
     PHYSFS_uint32 bufsize;
 
     /* !!! FIXME: actually, why use 32 bits here? */
-    /*BAIL_IF_MACRO(_bufsize > 0xFFFFFFFF, "buffer must fit in 32-bits", 0);*/
-    BAIL_IF_MACRO(_bufsize > __PHYSFS_UI64(0xFFFFFFFF), PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    /*BAIL_IF(_bufsize > 0xFFFFFFFF, "buffer must fit in 32-bits", 0);*/
+    BAIL_IF(_bufsize > __PHYSFS_UI64(0xFFFFFFFF), PHYSFS_ERR_INVALID_ARGUMENT, 0);
     bufsize = (PHYSFS_uint32) _bufsize;
 
-    BAIL_IF_MACRO(!PHYSFS_flush(handle), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!PHYSFS_flush(handle), 0);
 
     /*
      * For reads, we need to move the file pointer to where it would be
@@ -2782,9 +2782,9 @@
     {
         PHYSFS_uint64 pos;
         const PHYSFS_sint64 curpos = fh->io->tell(fh->io);
-        BAIL_IF_MACRO(curpos == -1, ERRPASS, 0);
+        BAIL_IF_ERRPASS(curpos == -1, 0);
         pos = ((curpos - fh->buffill) + fh->bufpos);
-        BAIL_IF_MACRO(!fh->io->seek(fh->io, pos), ERRPASS, 0);
+        BAIL_IF_ERRPASS(!fh->io->seek(fh->io, pos), 0);
     } /* if */
 
     if (bufsize == 0)  /* delete existing buffer. */
@@ -2800,7 +2800,7 @@
     {
         PHYSFS_uint8 *newbuf;
         newbuf = (PHYSFS_uint8 *) allocator.Realloc(fh->buffer, bufsize);
-        BAIL_IF_MACRO(!newbuf, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+        BAIL_IF(!newbuf, PHYSFS_ERR_OUT_OF_MEMORY, 0);
         fh->buffer = newbuf;
     } /* else */
 
@@ -2822,7 +2822,7 @@
     /* dump buffer to disk. */
     io = fh->io;
     rc = io->write(io, fh->buffer + fh->bufpos, fh->buffill - fh->bufpos);
-    BAIL_IF_MACRO(rc <= 0, ERRPASS, 0);
+    BAIL_IF_ERRPASS(rc <= 0, 0);
     fh->bufpos = fh->buffill = 0;
     return io->flush ? io->flush(io) : 1;
 } /* PHYSFS_flush */
@@ -2834,11 +2834,11 @@
     char *fname;
     size_t len;
 
-    BAIL_IF_MACRO(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(!stat, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF(!stat, PHYSFS_ERR_INVALID_ARGUMENT, 0);
     len = strlen(_fname) + 1;
     fname = (char *) __PHYSFS_smallAlloc(len);
-    BAIL_IF_MACRO(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
 
     /* set some sane defaults... */
     stat->filesize = -1;
@@ -2930,7 +2930,7 @@
 
 int PHYSFS_setAllocator(const PHYSFS_Allocator *a)
 {
-    BAIL_IF_MACRO(initialized, PHYSFS_ERR_IS_INITIALIZED, 0);
+    BAIL_IF(initialized, PHYSFS_ERR_IS_INITIALIZED, 0);
     externalAllocator = (a != NULL);
     if (externalAllocator)
         memcpy(&allocator, a, sizeof (PHYSFS_Allocator));
@@ -2941,7 +2941,7 @@
 
 const PHYSFS_Allocator *PHYSFS_getAllocator(void)
 {
-    BAIL_IF_MACRO(!initialized, PHYSFS_ERR_NOT_INITIALIZED, NULL);
+    BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, NULL);
     return &allocator;
 } /* PHYSFS_getAllocator */
 
@@ -2949,7 +2949,7 @@
 static void *mallocAllocatorMalloc(PHYSFS_uint64 s)
 {
     if (!__PHYSFS_ui64FitsAddressSpace(s))
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     #undef malloc
     return malloc((size_t) s);
 } /* mallocAllocatorMalloc */
@@ -2958,7 +2958,7 @@
 static void *mallocAllocatorRealloc(void *ptr, PHYSFS_uint64 s)
 {
     if (!__PHYSFS_ui64FitsAddressSpace(s))
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     #undef realloc
     return realloc(ptr, (size_t) s);
 } /* mallocAllocatorRealloc */
--- a/src/physfs_byteorder.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/physfs_byteorder.c	Thu Jul 06 11:51:41 2017 -0400
@@ -88,8 +88,8 @@
 #define PHYSFS_BYTEORDER_READ(datatype, swaptype) \
     int PHYSFS_read##swaptype(PHYSFS_File *file, PHYSFS_##datatype *val) { \
         PHYSFS_##datatype in; \
-        BAIL_IF_MACRO(val == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0); \
-        BAIL_IF_MACRO(!readAll(file, &in, sizeof (in)), ERRPASS, 0); \
+        BAIL_IF(val == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0); \
+        BAIL_IF_ERRPASS(!readAll(file, &in, sizeof (in)), 0); \
         *val = PHYSFS_swap##swaptype(in); \
         return 1; \
     }
@@ -116,7 +116,7 @@
 #define PHYSFS_BYTEORDER_WRITE(datatype, swaptype) \
     int PHYSFS_write##swaptype(PHYSFS_File *file, PHYSFS_##datatype val) { \
         const PHYSFS_##datatype out = PHYSFS_swap##swaptype(val); \
-        BAIL_IF_MACRO(!writeAll(file, &out, sizeof (out)), ERRPASS, 0); \
+        BAIL_IF_ERRPASS(!writeAll(file, &out, sizeof (out)), 0); \
         return 1; \
     }
 
--- a/src/physfs_internal.h	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/physfs_internal.h	Thu Jul 06 11:51:41 2017 -0400
@@ -172,21 +172,25 @@
                    int (*cmpfn)(void *, size_t, size_t),
                    void (*swapfn)(void *, size_t, size_t));
 
-/*
- * This isn't a formal error code, it's just for BAIL_MACRO.
- *  It means: there was an error, but someone else already set it for us.
- */
-#define ERRPASS PHYSFS_ERR_OK
-
 /* These get used all over for lessening code clutter. */
-#define BAIL_MACRO(e, r) do { if (e) PHYSFS_setErrorCode(e); return r; } while (0)
-#define BAIL_IF_MACRO(c, e, r) do { if (c) { if (e) PHYSFS_setErrorCode(e); return r; } } while (0)
-#define BAIL_MACRO_MUTEX(e, m, r) do { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); return r; } while (0)
-#define BAIL_IF_MACRO_MUTEX(c, e, m, r) do { if (c) { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); return r; } } while (0)
-#define GOTO_MACRO(e, g) do { if (e) PHYSFS_setErrorCode(e); goto g; } while (0)
-#define GOTO_IF_MACRO(c, e, g) do { if (c) { if (e) PHYSFS_setErrorCode(e); goto g; } } while (0)
-#define GOTO_MACRO_MUTEX(e, m, g) do { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); goto g; } while (0)
-#define GOTO_IF_MACRO_MUTEX(c, e, m, g) do { if (c) { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); goto g; } } while (0)
+/* "ERRPASS" means "something else just set the error state for us" and is
+    just to make it clear where the responsibility for the error state lays. */
+#define BAIL(e, r) do { if (e) PHYSFS_setErrorCode(e); return r; } while (0)
+#define BAIL_ERRPASS(r) do { return r; } while (0)
+#define BAIL_IF(c, e, r) do { if (c) { if (e) PHYSFS_setErrorCode(e); return r; } } while (0)
+#define BAIL_IF_ERRPASS(c, r) do { if (c) { return r; } } while (0)
+#define BAIL_MUTEX(e, m, r) do { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); return r; } while (0)
+#define BAIL_MUTEX_ERRPASS(m, r) do { __PHYSFS_platformReleaseMutex(m); return r; } while (0)
+#define BAIL_IF_MUTEX(c, e, m, r) do { if (c) { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); return r; } } while (0)
+#define BAIL_IF_MUTEX_ERRPASS(c, m, r) do { if (c) { __PHYSFS_platformReleaseMutex(m); return r; } } while (0)
+#define GOTO(e, g) do { if (e) PHYSFS_setErrorCode(e); goto g; } while (0)
+#define GOTO_ERRPASS(g) do { goto g; } while (0)
+#define GOTO_IF(c, e, g) do { if (c) { if (e) PHYSFS_setErrorCode(e); goto g; } } while (0)
+#define GOTO_IF_ERRPASS(c, g) do { if (c) { goto g; } } while (0)
+#define GOTO_MUTEX(e, m, g) do { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); goto g; } while (0)
+#define GOTO_MUTEX_ERRPASS(m, g) do { __PHYSFS_platformReleaseMutex(m); goto g; } while (0)
+#define GOTO_IF_MUTEX(c, e, m, g) do { if (c) { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); goto g; } } while (0)
+#define GOTO_IF_MUTEX_ERRPASS(c, m, g) do { if (c) { __PHYSFS_platformReleaseMutex(m); goto g; } } while (0)
 
 #define __PHYSFS_ARRAYLEN(x) ( (sizeof (x)) / (sizeof (x[0])) )
 
--- a/src/platform_beos.cpp	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/platform_beos.cpp	Thu Jul 06 11:51:41 2017 -0400
@@ -178,7 +178,7 @@
     assert(str != NULL);
     const size_t len = strlen(str);
     char *retval = (char *) allocator.Malloc(len + 2);
-    BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     strcpy(retval, str);
     retval[len] = '/';
     retval[len+1] = '\0';
@@ -192,7 +192,7 @@
     const char *append = "config/settings/";
     const size_t len = strlen(userdir) + strlen(append) + strlen(app) + 2;
     char *retval = allocator.Malloc(len);
-    BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     snprintf(retval, len, "%s%s%s/", userdir, append, app);
     return retval;
 } /* __PHYSFS_platformCalcPrefDir */
--- a/src/platform_macosx.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/platform_macosx.c	Thu Jul 06 11:51:41 2017 -0400
@@ -70,7 +70,7 @@
     ctx.reallocate = cfallocRealloc;
     ctx.deallocate = cfallocFree;
     cfallocator = CFAllocatorCreate(kCFAllocatorUseContext, &ctx);
-    BAIL_IF_MACRO(!cfallocator, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    BAIL_IF(!cfallocator, PHYSFS_ERR_OUT_OF_MEMORY, 0);
     return 1;  /* success. */
 } /* __PHYSFS_platformInit */
 
@@ -180,7 +180,7 @@
     int i, mounts;
 
     if (IOMasterPort(MACH_PORT_NULL, &masterPort) != KERN_SUCCESS)
-        BAIL_MACRO(PHYSFS_ERR_OS_ERROR, ) /*return void*/;
+        BAIL(PHYSFS_ERR_OS_ERROR, ) /*return void*/;
 
     mounts = getmntinfo(&mntbufp, MNT_WAIT);  /* NOT THREAD SAFE! */
     for (i = 0; i < mounts; i++)
@@ -203,7 +203,7 @@
     CFIndex len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr),
                                                     kCFStringEncodingUTF8) + 1;
     char *retval = (char *) allocator.Malloc(len);
-    BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     if (CFStringGetCString(cfstr, retval, len, kCFStringEncodingUTF8))
     {
@@ -220,7 +220,7 @@
     else  /* probably shouldn't fail, but just in case... */
     {
         allocator.Free(retval);
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     } /* else */
 
     return retval;
@@ -235,13 +235,13 @@
     char *retval = NULL;
 
     cfurl = CFBundleCopyBundleURL(CFBundleGetMainBundle());
-    BAIL_IF_MACRO(cfurl == NULL, PHYSFS_ERR_OS_ERROR, NULL);
+    BAIL_IF(cfurl == NULL, PHYSFS_ERR_OS_ERROR, NULL);
     cfstr = CFURLCopyFileSystemPath(cfurl, kCFURLPOSIXPathStyle);
     CFRelease(cfurl);
-    BAIL_IF_MACRO(!cfstr, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!cfstr, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     cfmutstr = CFStringCreateMutableCopy(cfallocator, 0, cfstr);
     CFRelease(cfstr);
-    BAIL_IF_MACRO(!cfmutstr, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!cfmutstr, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     CFStringAppendCString(cfmutstr, "/", kCFStringEncodingUTF8);
     retval = convertCFString(cfmutstr);
     CFRelease(cfmutstr);
@@ -257,7 +257,7 @@
     const char *append = "Library/Application Support/";
     const size_t len = strlen(userdir) + strlen(append) + strlen(app) + 2;
     char *retval = allocator.Malloc(len);
-    BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     snprintf(retval, len, "%s%s%s/", userdir, append, app);
     return retval;
 } /* __PHYSFS_platformCalcPrefDir */
@@ -291,7 +291,7 @@
 static void *macosxAllocatorMalloc(PHYSFS_uint64 s)
 {
     if (!__PHYSFS_ui64FitsAddressSpace(s))
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     return CFAllocatorAllocate(cfallocdef, (CFIndex) s, 0);
 } /* macosxAllocatorMalloc */
 
@@ -299,7 +299,7 @@
 static void *macosxAllocatorRealloc(void *ptr, PHYSFS_uint64 s)
 {
     if (!__PHYSFS_ui64FitsAddressSpace(s))
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     return CFAllocatorReallocate(cfallocdef, ptr, (CFIndex) s, 0);
 } /* macosxAllocatorRealloc */
 
--- a/src/platform_os2.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/platform_os2.c	Thu Jul 06 11:51:41 2017 -0400
@@ -205,7 +205,7 @@
     ULONG drivemap = 0;
     ULONG i, bit;
     const APIRET rc = DosQueryCurrentDisk(&dummy, &drivemap);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc),);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc),);
 
     for (i = 0, bit = 1; i < 26; i++, bit <<= 1)
     {
@@ -232,9 +232,9 @@
     PHYSFS_sint32 len;
 
     rc = DosGetInfoBlocks(&ptib, &ppib);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
     rc = DosQueryModuleName(ppib->pib_hmte, sizeof (buf), (PCHAR) buf);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
 
     /* chop off filename, leave path. */
     for (len = strlen(buf) - 1; len >= 0; len--)
@@ -252,7 +252,7 @@
     cvt_path_to_correct_case(buf);
 
     retval = (char *) allocator.Malloc(len + 1);
-    BAIL_IF_MACRO(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     strcpy(retval, buf);
     return retval;
 } /* __PHYSFS_platformCalcBaseDir */
@@ -285,7 +285,7 @@
     char *retval = allocator.Malloc(len);
     char *p;
 
-    BAIL_IF_MACRO(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     if (prepend)
         strcpy(retval, prepend);
@@ -315,7 +315,7 @@
     ULONG count = 1;
     APIRET rc;
 
-    BAIL_IF_MACRO(strlen(dirname) > sizeof (spec) - 5, PHYSFS_ERR_BAD_FILENAME,);
+    BAIL_IF(strlen(dirname) > sizeof (spec) - 5, PHYSFS_ERR_BAD_FILENAME,);
 
     strcpy(spec, dirname);
     strcat(spec, (spec[strlen(spec) - 1] != '\\') ? "\\*.*" : "*.*");
@@ -325,7 +325,7 @@
                       FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM,
                       &fb, sizeof (fb), &count, FIL_STANDARD);
 
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc),);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc),);
 
     while (count == 1)
     {
@@ -349,20 +349,20 @@
     BYTE byte;
 
     rc = DosQueryCurrentDisk(&currentDisk, &dummy);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
 
     /* The first call just tells us how much space we need for the string. */
     rc = DosQueryCurrentDir(currentDisk, &byte, &pathSize);
     pathSize++; /* Add space for null terminator. */
     retval = (char *) allocator.Malloc(pathSize + 3);  /* plus "x:\\" */
-    BAIL_IF_MACRO(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     /* Actually get the string this time. */
     rc = DosQueryCurrentDir(currentDisk, (PBYTE) (retval + 3), &pathSize);
     if (rc != NO_ERROR)
     {
         allocator.Free(retval);
-        BAIL_MACRO(errcodeFromAPIRET(rc), NULL);
+        BAIL(errcodeFromAPIRET(rc), NULL);
     } /* if */
 
     retval[0] = ('A' + (currentDisk - 1));
@@ -378,9 +378,9 @@
     char buf[CCHMAXPATH];
     char *retval;
     APIRET rc = DosQueryPathInfo(path, FIL_QUERYFULLNAME, buf, sizeof (buf));
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
     retval = (char *) allocator.Malloc(strlen(buf) + 1);
-    BAIL_IF_MACRO(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     strcpy(retval, buf);
     return retval;
 } /* __PHYSFS_platformRealPath */
@@ -390,7 +390,7 @@
 {
     const unsigned char *filename = (const unsigned char *) _filename;
     const APIRET rc = DosCreateDir(filename, NULL);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
     return 1;
 } /* __PHYSFS_platformMkDir */
 
@@ -410,7 +410,7 @@
                    OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_LOCALITY |
                    OPEN_FLAGS_NOINHERIT | OPEN_SHARE_DENYWRITE |
                    OPEN_ACCESS_READONLY, NULL);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
 
     return ((void *) hfile);
 } /* __PHYSFS_platformOpenRead */
@@ -431,7 +431,7 @@
                    OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_LOCALITY |
                    OPEN_FLAGS_NOINHERIT | OPEN_SHARE_DENYWRITE |
                    OPEN_ACCESS_READWRITE, NULL);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
 
     return ((void *) hfile);
 } /* __PHYSFS_platformOpenWrite */
@@ -454,13 +454,13 @@
                    OPEN_FLAGS_NOINHERIT | OPEN_SHARE_DENYWRITE |
                    OPEN_ACCESS_READWRITE, NULL);
 
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
 
     rc = DosSetFilePtr(hfile, 0, FILE_END, &dummy);
     if (rc != NO_ERROR)
     {
         DosClose(hfile);
-        BAIL_MACRO(errcodeFromAPIRET(rc), NULL);
+        BAIL(errcodeFromAPIRET(rc), NULL);
     } /* if */
 
     return ((void *) hfile);
@@ -471,9 +471,9 @@
 {
     ULONG br = 0;
     APIRET rc;
-    BAIL_IF_MACRO(!__PHYSFS_ui64FitsAddressSpace(len),PHYSFS_ERR_INVALID_ARGUMENT,-1);
+    BAIL_IF(!__PHYSFS_ui64FitsAddressSpace(len),PHYSFS_ERR_INVALID_ARGUMENT,-1);
     rc = DosRead((HFILE) opaque, buf, (ULONG) len, &br);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), (br > 0) ? ((PHYSFS_sint64) br) : -1);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), (br > 0) ? ((PHYSFS_sint64) br) : -1);
     return (PHYSFS_sint64) br;
 } /* __PHYSFS_platformRead */
 
@@ -483,9 +483,9 @@
 {
     ULONG bw = 0;
     APIRET rc;
-    BAIL_IF_MACRO(!__PHYSFS_ui64FitsAddressSpace(len),PHYSFS_ERR_INVALID_ARGUMENT,-1);
+    BAIL_IF(!__PHYSFS_ui64FitsAddressSpace(len),PHYSFS_ERR_INVALID_ARGUMENT,-1);
     rc = DosWrite((HFILE) opaque, (void *) buf, (ULONG) len, &bw);    
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), (bw > 0) ? ((PHYSFS_sint64) bw) : -1);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), (bw > 0) ? ((PHYSFS_sint64) bw) : -1);
     return (PHYSFS_sint64) bw;
 } /* __PHYSFS_platformWrite */
 
@@ -498,9 +498,9 @@
     APIRET rc;
 
     /* hooray for 32-bit filesystem limits!  :) */
-    BAIL_IF_MACRO((PHYSFS_uint64) dist != pos, PHYSFS_ERR_INVALID_ARGUMENT, 0);
+    BAIL_IF((PHYSFS_uint64) dist != pos, PHYSFS_ERR_INVALID_ARGUMENT, 0);
     rc = DosSetFilePtr(hfile, dist, FILE_BEGIN, &dummy);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
     return 1;
 } /* __PHYSFS_platformSeek */
 
@@ -510,7 +510,7 @@
     ULONG pos;
     HFILE hfile = (HFILE) opaque;
     const APIRET rc = DosSetFilePtr(hfile, 0, FILE_CURRENT, &pos);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), -1);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), -1);
     return ((PHYSFS_sint64) pos);
 } /* __PHYSFS_platformTell */
 
@@ -520,7 +520,7 @@
     FILESTATUS3 fs;
     HFILE hfile = (HFILE) opaque;
     const APIRET rc = DosQueryFileInfo(hfile, FIL_STANDARD, &fs, sizeof (fs));
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), -1);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), -1);
     return ((PHYSFS_sint64) fs.cbFile);
 } /* __PHYSFS_platformFileLength */
 
@@ -528,7 +528,7 @@
 int __PHYSFS_platformFlush(void *opaque)
 {
     const APIRET rc = DosResetBuffer((HFILE) opaque);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
     return 1;
 } /* __PHYSFS_platformFlush */
 
@@ -544,9 +544,9 @@
     FILESTATUS3 fs;
     const unsigned char *path = (const unsigned char *) _path;
     APIRET rc = DosQueryPathInfo(path, FIL_STANDARD, &fs, sizeof (fs));
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
     rc = (fs.attrFile & FILE_DIRECTORY) ? DosDeleteDir(path) : DosDelete(path);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
     return 1;
 } /* __PHYSFS_platformDelete */
 
@@ -575,7 +575,7 @@
     FILESTATUS3 fs;
     const unsigned char *fname = (const unsigned char *) filename;
     const APIRET rc = DosQueryPathInfo(fname, FIL_STANDARD, &fs, sizeof (fs));
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
 
     if (fs.attrFile & FILE_DIRECTORY)
     {
@@ -616,7 +616,7 @@
      *  default value (zero might as well do) if it does.
      */
     const APIRET rc = DosGetInfoBlocks(&ptib, &ppib);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0);
     return ((void *) ptib->tib_ordinal);
 } /* __PHYSFS_platformGetThreadID */
 
@@ -625,7 +625,7 @@
 {
     HMTX hmtx = NULLHANDLE;
     const APIRET rc = DosCreateMutexSem(NULL, &hmtx, 0, 0);
-    BAIL_IF_MACRO(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
+    BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL);
     return ((void *) hmtx);
 } /* __PHYSFS_platformCreateMutex */
 
--- a/src/platform_posix.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/platform_posix.c	Thu Jul 06 11:51:41 2017 -0400
@@ -156,7 +156,7 @@
 int __PHYSFS_platformMkDir(const char *path)
 {
     const int rc = mkdir(path, S_IRWXU);
-    BAIL_IF_MACRO(rc == -1, errcodeFromErrno(), 0);
+    BAIL_IF(rc == -1, errcodeFromErrno(), 0);
     return 1;
 } /* __PHYSFS_platformMkDir */
 
@@ -172,7 +172,7 @@
     mode &= ~O_APPEND;
 
     fd = open(filename, mode, S_IRUSR | S_IWUSR);
-    BAIL_IF_MACRO(fd < 0, errcodeFromErrno(), NULL);
+    BAIL_IF(fd < 0, errcodeFromErrno(), NULL);
 
     if (appending)
     {
@@ -180,7 +180,7 @@
         {
             const int err = errno;
             close(fd);
-            BAIL_MACRO(errcodeFromErrnoError(err), NULL);
+            BAIL(errcodeFromErrnoError(err), NULL);
         } /* if */
     } /* if */
 
@@ -188,7 +188,7 @@
     if (!retval)
     {
         close(fd);
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     } /* if */
 
     *retval = fd;
@@ -221,10 +221,10 @@
     ssize_t rc = 0;
 
     if (!__PHYSFS_ui64FitsAddressSpace(len))
-        BAIL_MACRO(PHYSFS_ERR_INVALID_ARGUMENT, -1);
+        BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1);
 
     rc = read(fd, buffer, (size_t) len);
-    BAIL_IF_MACRO(rc == -1, errcodeFromErrno(), -1);
+    BAIL_IF(rc == -1, errcodeFromErrno(), -1);
     assert(rc >= 0);
     assert(rc <= len);
     return (PHYSFS_sint64) rc;
@@ -238,10 +238,10 @@
     ssize_t rc = 0;
 
     if (!__PHYSFS_ui64FitsAddressSpace(len))
-        BAIL_MACRO(PHYSFS_ERR_INVALID_ARGUMENT, -1);
+        BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1);
 
     rc = write(fd, (void *) buffer, (size_t) len);
-    BAIL_IF_MACRO(rc == -1, errcodeFromErrno(), rc);
+    BAIL_IF(rc == -1, errcodeFromErrno(), rc);
     assert(rc >= 0);
     assert(rc <= len);
     return (PHYSFS_sint64) rc;
@@ -252,7 +252,7 @@
 {
     const int fd = *((int *) opaque);
     const int rc = lseek(fd, (off_t) pos, SEEK_SET);
-    BAIL_IF_MACRO(rc == -1, errcodeFromErrno(), 0);
+    BAIL_IF(rc == -1, errcodeFromErrno(), 0);
     return 1;
 } /* __PHYSFS_platformSeek */
 
@@ -262,7 +262,7 @@
     const int fd = *((int *) opaque);
     PHYSFS_sint64 retval;
     retval = (PHYSFS_sint64) lseek(fd, 0, SEEK_CUR);
-    BAIL_IF_MACRO(retval == -1, errcodeFromErrno(), -1);
+    BAIL_IF(retval == -1, errcodeFromErrno(), -1);
     return retval;
 } /* __PHYSFS_platformTell */
 
@@ -271,7 +271,7 @@
 {
     const int fd = *((int *) opaque);
     struct stat statbuf;
-    BAIL_IF_MACRO(fstat(fd, &statbuf) == -1, errcodeFromErrno(), -1);
+    BAIL_IF(fstat(fd, &statbuf) == -1, errcodeFromErrno(), -1);
     return ((PHYSFS_sint64) statbuf.st_size);
 } /* __PHYSFS_platformFileLength */
 
@@ -280,7 +280,7 @@
 {
     const int fd = *((int *) opaque);
     if ((fcntl(fd, F_GETFL) & O_ACCMODE) != O_RDONLY)
-        BAIL_IF_MACRO(fsync(fd) == -1, errcodeFromErrno(), 0);
+        BAIL_IF(fsync(fd) == -1, errcodeFromErrno(), 0);
     return 1;
 } /* __PHYSFS_platformFlush */
 
@@ -295,7 +295,7 @@
 
 int __PHYSFS_platformDelete(const char *path)
 {
-    BAIL_IF_MACRO(remove(path) == -1, errcodeFromErrno(), 0);
+    BAIL_IF(remove(path) == -1, errcodeFromErrno(), 0);
     return 1;
 } /* __PHYSFS_platformDelete */
 
@@ -304,7 +304,7 @@
 {
     struct stat statbuf;
 
-    BAIL_IF_MACRO(lstat(filename, &statbuf) == -1, errcodeFromErrno(), 0);
+    BAIL_IF(lstat(filename, &statbuf) == -1, errcodeFromErrno(), 0);
 
     if (S_ISREG(statbuf.st_mode))
     {
@@ -369,12 +369,12 @@
 {
     int rc;
     PthreadMutex *m = (PthreadMutex *) allocator.Malloc(sizeof (PthreadMutex));
-    BAIL_IF_MACRO(!m, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!m, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     rc = pthread_mutex_init(&m->mutex, NULL);
     if (rc != 0)
     {
         allocator.Free(m);
-        BAIL_MACRO(PHYSFS_ERR_OS_ERROR, NULL);
+        BAIL(PHYSFS_ERR_OS_ERROR, NULL);
     } /* if */
 
     m->count = 0;
--- a/src/platform_unix.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/platform_unix.c	Thu Jul 06 11:51:41 2017 -0400
@@ -92,7 +92,7 @@
     struct mntent *ent = NULL;
 
     mounts = setmntent("/etc/mtab", "r");
-    BAIL_IF_MACRO(mounts == NULL, PHYSFS_ERR_IO, /*return void*/);
+    BAIL_IF(mounts == NULL, PHYSFS_ERR_IO, /*return void*/);
 
     while ( (ent = getmntent(mounts)) != NULL )
     {
@@ -122,7 +122,7 @@
     FILE *mounts = fopen(MNTTAB, "r");
     struct mnttab ent;
 
-    BAIL_IF_MACRO(mounts == NULL, PHYSFS_ERR_IO, /*return void*/);
+    BAIL_IF(mounts == NULL, PHYSFS_ERR_IO, /*return void*/);
     while (getmntent(mounts, &ent) == 0)
     {
         int add_it = 0;
@@ -180,7 +180,7 @@
             {
                 if (exe != NULL)
                     allocator.Free(exe);
-                BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+                BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
             } /* if */
 
             alloc_size = size;
@@ -311,7 +311,7 @@
         if (envr != NULL)
         {
             char *path = (char *) __PHYSFS_smallAlloc(strlen(envr) + 1);
-            BAIL_IF_MACRO(!path, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+            BAIL_IF(!path, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
             strcpy(path, envr);
             retval = findBinaryInPath(argv0, path);
             __PHYSFS_smallFree(path);
@@ -348,13 +348,13 @@
     {
         /* You end up with "$HOME/.local/share/Game Name 2" */
         envr = __PHYSFS_getUserDir();
-        BAIL_IF_MACRO(!envr, ERRPASS, NULL);  /* oh well. */
+        BAIL_IF_ERRPASS(!envr, NULL);  /* oh well. */
         append = ".local/share/";
     } /* if */
 
     len = strlen(envr) + strlen(append) + strlen(app) + 2;
     retval = (char *) allocator.Malloc(len);
-    BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     snprintf(retval, len, "%s%s%s/", envr, append, app);
     return retval;
 } /* __PHYSFS_platformCalcPrefDir */
--- a/src/platform_windows.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/platform_windows.c	Thu Jul 06 11:51:41 2017 -0400
@@ -45,7 +45,7 @@
 #define PHYSFS_IO_REPARSE_TAG_SYMLINK    0xA000000C
 
 
-#define UTF8_TO_UNICODE_STACK_MACRO(w_assignto, str) { \
+#define UTF8_TO_UNICODE_STACK(w_assignto, str) { \
     if (str == NULL) \
         w_assignto = NULL; \
     else { \
@@ -73,7 +73,7 @@
         void *ptr = NULL;
         const PHYSFS_uint64 len = (wStrLen(w_str) * 4) + 1;
         retval = allocator.Malloc(len);
-        BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
         PHYSFS_utf8FromUtf16((const PHYSFS_uint16 *) w_str, retval, len);
         ptr = allocator.Realloc(retval, strlen(retval) + 1); /* shrink. */
         if (ptr != NULL)
@@ -339,7 +339,7 @@
         if ( (ptr = allocator.Realloc(modpath, buflen*sizeof(WCHAR))) == NULL )
         {
             allocator.Free(modpath);
-            BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+            BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
         } /* if */
         modpath = (LPWSTR) ptr;
 
@@ -347,7 +347,7 @@
         if (rc == 0)
         {
             allocator.Free(modpath);
-            BAIL_MACRO(errcodeFromWinApi(), NULL);
+            BAIL(errcodeFromWinApi(), NULL);
         } /* if */
 
         if (rc < buflen)
@@ -400,16 +400,16 @@
 
     if (!SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE,
                                    NULL, 0, path)))
-        BAIL_MACRO(PHYSFS_ERR_OS_ERROR, NULL);
+        BAIL(PHYSFS_ERR_OS_ERROR, NULL);
 
     utf8 = unicodeToUtf8Heap(path);
-    BAIL_IF_MACRO(!utf8, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!utf8, NULL);
     len = strlen(utf8) + strlen(org) + strlen(app) + 4;
     retval = allocator.Malloc(len);
     if (!retval)
     {
         allocator.Free(utf8);
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     } /* if */
 
     sprintf(retval, "%s\\%s\\%s\\", utf8, org, app);
@@ -427,12 +427,12 @@
     char *retval = NULL;
 
     lib = LoadLibraryA("userenv.dll");
-    BAIL_IF_MACRO(!lib, errcodeFromWinApi(), NULL);
+    BAIL_IF(!lib, errcodeFromWinApi(), NULL);
     pGetDir=(fnGetUserProfDirW) GetProcAddress(lib,"GetUserProfileDirectoryW");
-    GOTO_IF_MACRO(!pGetDir, errcodeFromWinApi(), done);
+    GOTO_IF(!pGetDir, errcodeFromWinApi(), done);
 
     if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &accessToken))
-        GOTO_MACRO(errcodeFromWinApi(), done);
+        GOTO(errcodeFromWinApi(), done);
     else
     {
         DWORD psize = 0;
@@ -509,7 +509,7 @@
     /* Append the "*" to the end of the string */
     strcat(searchPath, "*");
 
-    UTF8_TO_UNICODE_STACK_MACRO(wSearchPath, searchPath);
+    UTF8_TO_UNICODE_STACK(wSearchPath, searchPath);
     if (!wSearchPath)
         return;  /* oh well. */
 
@@ -546,10 +546,10 @@
 {
     WCHAR *wpath;
     DWORD rc;
-    UTF8_TO_UNICODE_STACK_MACRO(wpath, path);
+    UTF8_TO_UNICODE_STACK(wpath, path);
     rc = CreateDirectoryW(wpath, NULL);
     __PHYSFS_smallFree(wpath);
-    BAIL_IF_MACRO(rc == 0, errcodeFromWinApi(), 0);
+    BAIL_IF(rc == 0, errcodeFromWinApi(), 0);
     return 1;
 } /* __PHYSFS_platformMkDir */
 
@@ -582,19 +582,19 @@
     WinApiFile *retval;
     WCHAR *wfname;
 
-    UTF8_TO_UNICODE_STACK_MACRO(wfname, fname);
-    BAIL_IF_MACRO(!wfname, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    UTF8_TO_UNICODE_STACK(wfname, fname);
+    BAIL_IF(!wfname, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     fileh = CreateFileW(wfname, mode, FILE_SHARE_READ | FILE_SHARE_WRITE,
                              NULL, creation, FILE_ATTRIBUTE_NORMAL, NULL);
     __PHYSFS_smallFree(wfname);
 
-    BAIL_IF_MACRO(fileh == INVALID_HANDLE_VALUE,errcodeFromWinApi(), NULL);
+    BAIL_IF(fileh == INVALID_HANDLE_VALUE,errcodeFromWinApi(), NULL);
 
     retval = (WinApiFile *) allocator.Malloc(sizeof (WinApiFile));
     if (!retval)
     {
         CloseHandle(fileh);
-        BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+        BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     } /* if */
 
     retval->readonly = rdonly;
@@ -627,7 +627,7 @@
             const PHYSFS_ErrorCode err = errcodeFromWinApi();
             CloseHandle(h);
             allocator.Free(retval);
-            BAIL_MACRO(err, NULL);
+            BAIL(err, NULL);
         } /* if */
     } /* if */
 
@@ -641,14 +641,14 @@
     PHYSFS_sint64 totalRead = 0;
 
     if (!__PHYSFS_ui64FitsAddressSpace(len))
-        BAIL_MACRO(PHYSFS_ERR_INVALID_ARGUMENT, -1);
+        BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1);
 
     while (len > 0)
     {
         const DWORD thislen = (len > 0xFFFFFFFF) ? 0xFFFFFFFF : (DWORD) len;
         DWORD numRead = 0;
         if (!ReadFile(Handle, buf, thislen, &numRead, NULL))
-            BAIL_MACRO(errcodeFromWinApi(), -1);
+            BAIL(errcodeFromWinApi(), -1);
         len -= (PHYSFS_uint64) numRead;
         totalRead += (PHYSFS_sint64) numRead;
         if (numRead != thislen)
@@ -666,14 +666,14 @@
     PHYSFS_sint64 totalWritten = 0;
 
     if (!__PHYSFS_ui64FitsAddressSpace(len))
-        BAIL_MACRO(PHYSFS_ERR_INVALID_ARGUMENT, -1);
+        BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1);
 
     while (len > 0)
     {
         const DWORD thislen = (len > 0xFFFFFFFF) ? 0xFFFFFFFF : (DWORD) len;
         DWORD numWritten = 0;
         if (!WriteFile(Handle, buffer, thislen, &numWritten, NULL))
-            BAIL_MACRO(errcodeFromWinApi(), -1);
+            BAIL(errcodeFromWinApi(), -1);
         len -= (PHYSFS_uint64) numWritten;
         totalWritten += (PHYSFS_sint64) numWritten;
         if (numWritten != thislen)
@@ -707,7 +707,7 @@
     if ( (rc == PHYSFS_INVALID_SET_FILE_POINTER) &&
          (GetLastError() != NO_ERROR) )
     {
-        BAIL_MACRO(errcodeFromWinApi(), 0);
+        BAIL(errcodeFromWinApi(), 0);
     } /* if */
     
     return 1;  /* No error occured */
@@ -726,7 +726,7 @@
     if ( (LowPos == PHYSFS_INVALID_SET_FILE_POINTER) &&
          (GetLastError() != NO_ERROR) )
     {
-        BAIL_MACRO(errcodeFromWinApi(), -1);
+        BAIL(errcodeFromWinApi(), -1);
     } /* if */
     else
     {
@@ -750,7 +750,7 @@
     if ( (SizeLow == PHYSFS_INVALID_SET_FILE_POINTER) &&
          (GetLastError() != NO_ERROR) )
     {
-        BAIL_MACRO(errcodeFromWinApi(), -1);
+        BAIL(errcodeFromWinApi(), -1);
     } /* if */
     else
     {
@@ -767,7 +767,7 @@
 {
     WinApiFile *fh = ((WinApiFile *) opaque);
     if (!fh->readonly)
-        BAIL_IF_MACRO(!FlushFileBuffers(fh->handle), errcodeFromWinApi(), 0);
+        BAIL_IF(!FlushFileBuffers(fh->handle), errcodeFromWinApi(), 0);
 
     return 1;
 } /* __PHYSFS_platformFlush */
@@ -785,7 +785,7 @@
 {
     const int isdir = (GetFileAttributesW(wpath) & FILE_ATTRIBUTE_DIRECTORY);
     const BOOL rc = (isdir) ? RemoveDirectoryW(wpath) : DeleteFileW(wpath);
-    BAIL_IF_MACRO(!rc, errcodeFromWinApi(), 0);
+    BAIL_IF(!rc, errcodeFromWinApi(), 0);
     return 1;   /* if you made it here, it worked. */
 } /* doPlatformDelete */
 
@@ -794,8 +794,8 @@
 {
     int retval = 0;
     LPWSTR wpath = NULL;
-    UTF8_TO_UNICODE_STACK_MACRO(wpath, path);
-    BAIL_IF_MACRO(!wpath, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    UTF8_TO_UNICODE_STACK(wpath, path);
+    BAIL_IF(!wpath, PHYSFS_ERR_OUT_OF_MEMORY, 0);
     retval = doPlatformDelete(wpath);
     __PHYSFS_smallFree(wpath);
     return retval;
@@ -806,7 +806,7 @@
 {
     LPCRITICAL_SECTION lpcs;
     lpcs = (LPCRITICAL_SECTION) allocator.Malloc(sizeof (CRITICAL_SECTION));
-    BAIL_IF_MACRO(!lpcs, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!lpcs, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
     InitializeCriticalSection(lpcs);
     return lpcs;
 } /* __PHYSFS_platformCreateMutex */
@@ -842,11 +842,11 @@
     struct tm tm;
     BOOL rc;
 
-    BAIL_IF_MACRO(!FileTimeToSystemTime(ft, &st_utc), errcodeFromWinApi(), -1);
+    BAIL_IF(!FileTimeToSystemTime(ft, &st_utc), errcodeFromWinApi(), -1);
     tzid = GetTimeZoneInformation(&tzi);
-    BAIL_IF_MACRO(tzid == TIME_ZONE_ID_INVALID, errcodeFromWinApi(), -1);
+    BAIL_IF(tzid == TIME_ZONE_ID_INVALID, errcodeFromWinApi(), -1);
     rc = SystemTimeToTzSpecificLocalTime(&tzi, &st_utc, &st_localtz);
-    BAIL_IF_MACRO(!rc, errcodeFromWinApi(), -1);
+    BAIL_IF(!rc, errcodeFromWinApi(), -1);
 
     /* Convert to a format that mktime() can grok... */
     tm.tm_sec = st_localtz.wSecond;
@@ -861,7 +861,7 @@
 
     /* Convert to a format PhysicsFS can grok... */
     retval = (PHYSFS_sint64) mktime(&tm);
-    BAIL_IF_MACRO(retval == -1, PHYSFS_ERR_OS_ERROR, -1);
+    BAIL_IF(retval == -1, PHYSFS_ERR_OS_ERROR, -1);
     return retval;
 } /* FileTimeToPhysfsTime */
 
@@ -873,12 +873,12 @@
     DWORD err = 0;
     BOOL rc = 0;
 
-    UTF8_TO_UNICODE_STACK_MACRO(wstr, filename);
-    BAIL_IF_MACRO(!wstr, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+    UTF8_TO_UNICODE_STACK(wstr, filename);
+    BAIL_IF(!wstr, PHYSFS_ERR_OUT_OF_MEMORY, 0);
     rc = GetFileAttributesExW(wstr, GetFileExInfoStandard, &winstat);
     err = (!rc) ? GetLastError() : 0;
     __PHYSFS_smallFree(wstr);
-    BAIL_IF_MACRO(!rc, errcodeFromWinApiError(err), 0);
+    BAIL_IF(!rc, errcodeFromWinApiError(err), 0);
 
     st->modtime = FileTimeToPhysfsTime(&winstat.ftLastWriteTime);
     st->accesstime = FileTimeToPhysfsTime(&winstat.ftLastAccessTime);
--- a/src/platform_winrt.cpp	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/platform_winrt.cpp	Thu Jul 06 11:51:41 2017 -0400
@@ -68,7 +68,7 @@
 #define PHYSFS_IO_REPARSE_TAG_SYMLINK    0xA000000C
 
 
-#define UTF8_TO_UNICODE_STACK_MACRO(w_assignto, str) { \
+#define UTF8_TO_UNICODE_STACK(w_assignto, str) { \
     if (str == NULL) \
         w_assignto = NULL; \
     else { \
@@ -195,7 +195,7 @@
 		void *ptr = NULL;
 		const PHYSFS_uint64 len = (wStrLen(w_str) * 4) + 1;
 		retval = (char*)allocator.Malloc(len);
-		BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+		BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 		PHYSFS_utf8FromUtf16((const PHYSFS_uint16 *)w_str, retval, len);
 		ptr = allocator.Realloc(retval, strlen(retval) + 1); /* shrink. */
 		if (ptr != NULL)
@@ -274,7 +274,7 @@
 	/* Append the "*" to the end of the string */
 	strcat(searchPath, "*");
 
-	UTF8_TO_UNICODE_STACK_MACRO(wSearchPath, searchPath);
+	UTF8_TO_UNICODE_STACK(wSearchPath, searchPath);
 	if (!wSearchPath)
 		return;  /* oh well. */
 
@@ -314,10 +314,10 @@
 {
 	WCHAR *wpath;
 	DWORD rc;
-	UTF8_TO_UNICODE_STACK_MACRO(wpath, path);
+	UTF8_TO_UNICODE_STACK(wpath, path);
 	rc = CreateDirectoryW(wpath, NULL);
 	__PHYSFS_smallFree(wpath);
-	BAIL_IF_MACRO(rc == 0, errcodeFromWinApi(), 0);
+	BAIL_IF(rc == 0, errcodeFromWinApi(), 0);
 	return 1;
 } /* __PHYSFS_platformMkDir */
 
@@ -340,19 +340,19 @@
 	WinApiFile *retval;
 	WCHAR *wfname;
 
-	UTF8_TO_UNICODE_STACK_MACRO(wfname, fname);
-	BAIL_IF_MACRO(!wfname, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+	UTF8_TO_UNICODE_STACK(wfname, fname);
+	BAIL_IF(!wfname, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 	//fileh = CreateFileW(wfname, mode, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, creation, FILE_ATTRIBUTE_NORMAL, NULL);
 	fileh = CreateFile2(wfname, mode, FILE_SHARE_READ | FILE_SHARE_WRITE, creation, NULL);
 	__PHYSFS_smallFree(wfname);
 
-	BAIL_IF_MACRO(fileh == INVALID_HANDLE_VALUE, errcodeFromWinApi(), NULL);
+	BAIL_IF(fileh == INVALID_HANDLE_VALUE, errcodeFromWinApi(), NULL);
 
 	retval = (WinApiFile *)allocator.Malloc(sizeof(WinApiFile));
 	if (!retval)
 	{
 		CloseHandle(fileh);
-		BAIL_MACRO(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+		BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 	} /* if */
 
 	retval->readonly = rdonly;
@@ -387,7 +387,7 @@
 			const PHYSFS_ErrorCode err = errcodeFromWinApi();
 			CloseHandle(h);
 			allocator.Free(retval);
-			BAIL_MACRO(err, NULL);
+			BAIL(err, NULL);
 		} /* if */
 	} /* if */
 
@@ -401,14 +401,14 @@
 	PHYSFS_sint64 totalRead = 0;
 
 	if (!__PHYSFS_ui64FitsAddressSpace(len))
-		BAIL_MACRO(PHYSFS_ERR_INVALID_ARGUMENT, -1);
+		BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1);
 
 	while (len > 0)
 	{
 		const DWORD thislen = (len > 0xFFFFFFFF) ? 0xFFFFFFFF : (DWORD)len;
 		DWORD numRead = 0;
 		if (!ReadFile(Handle, buf, thislen, &numRead, NULL))
-			BAIL_MACRO(errcodeFromWinApi(), -1);
+			BAIL(errcodeFromWinApi(), -1);
 		len -= (PHYSFS_uint64)numRead;
 		totalRead += (PHYSFS_sint64)numRead;
 		if (numRead != thislen)
@@ -426,14 +426,14 @@
 	PHYSFS_sint64 totalWritten = 0;
 
 	if (!__PHYSFS_ui64FitsAddressSpace(len))
-		BAIL_MACRO(PHYSFS_ERR_INVALID_ARGUMENT, -1);
+		BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1);
 
 	while (len > 0)
 	{
 		const DWORD thislen = (len > 0xFFFFFFFF) ? 0xFFFFFFFF : (DWORD)len;
 		DWORD numWritten = 0;
 		if (!WriteFile(Handle, buffer, thislen, &numWritten, NULL))
-			BAIL_MACRO(errcodeFromWinApi(), -1);
+			BAIL(errcodeFromWinApi(), -1);
 		len -= (PHYSFS_uint64)numWritten;
 		totalWritten += (PHYSFS_sint64)numWritten;
 		if (numWritten != thislen)
@@ -457,7 +457,7 @@
 
 	if (!rc && (GetLastError() != NO_ERROR))
 	{
-		BAIL_MACRO(errcodeFromWinApi(), 0);
+		BAIL(errcodeFromWinApi(), 0);
 	} /* if */
 
 	return 1;  /* No error occured */
@@ -477,7 +477,7 @@
 	rc = SetFilePointerEx(Handle, zero, &out, FILE_CURRENT);
 	if (!rc)
 	{
-		BAIL_MACRO(errcodeFromWinApi(), -1);
+		BAIL(errcodeFromWinApi(), -1);
 	} /* if */
 	else
 	{
@@ -513,7 +513,7 @@
 {
 	WinApiFile *fh = ((WinApiFile *)opaque);
 	if (!fh->readonly)
-		BAIL_IF_MACRO(!FlushFileBuffers(fh->handle), errcodeFromWinApi(), 0);
+		BAIL_IF(!FlushFileBuffers(fh->handle), errcodeFromWinApi(), 0);
 
 	return 1;
 } /* __PHYSFS_platformFlush */
@@ -538,7 +538,7 @@
 	}
 
 	const BOOL rc = (isdir) ? RemoveDirectoryW(wpath) : DeleteFileW(wpath);
-	BAIL_IF_MACRO(!rc, errcodeFromWinApi(), 0);
+	BAIL_IF(!rc, errcodeFromWinApi(), 0);
 	return 1;   /* if you made it here, it worked. */
 } /* doPlatformDelete */
 
@@ -547,8 +547,8 @@
 {
 	int retval = 0;
 	LPWSTR wpath = NULL;
-	UTF8_TO_UNICODE_STACK_MACRO(wpath, path);
-	BAIL_IF_MACRO(!wpath, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+	UTF8_TO_UNICODE_STACK(wpath, path);
+	BAIL_IF(!wpath, PHYSFS_ERR_OUT_OF_MEMORY, 0);
 	retval = doPlatformDelete(wpath);
 	__PHYSFS_smallFree(wpath);
 	return retval;
@@ -559,7 +559,7 @@
 {
 	LPCRITICAL_SECTION lpcs;
 	lpcs = (LPCRITICAL_SECTION)allocator.Malloc(sizeof(CRITICAL_SECTION));
-	BAIL_IF_MACRO(!lpcs, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+	BAIL_IF(!lpcs, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 	//InitializeCriticalSection(lpcs);
 	InitializeCriticalSectionEx(lpcs, 2000, 0);
 	return lpcs;
@@ -596,11 +596,11 @@
 	struct tm tm;
 	BOOL rc;
 
-	BAIL_IF_MACRO(!FileTimeToSystemTime(ft, &st_utc), errcodeFromWinApi(), -1);
+	BAIL_IF(!FileTimeToSystemTime(ft, &st_utc), errcodeFromWinApi(), -1);
 	tzid = GetTimeZoneInformation(&tzi);
-	BAIL_IF_MACRO(tzid == TIME_ZONE_ID_INVALID, errcodeFromWinApi(), -1);
+	BAIL_IF(tzid == TIME_ZONE_ID_INVALID, errcodeFromWinApi(), -1);
 	rc = SystemTimeToTzSpecificLocalTime(&tzi, &st_utc, &st_localtz);
-	BAIL_IF_MACRO(!rc, errcodeFromWinApi(), -1);
+	BAIL_IF(!rc, errcodeFromWinApi(), -1);
 
 	/* Convert to a format that mktime() can grok... */
 	tm.tm_sec = st_localtz.wSecond;
@@ -615,7 +615,7 @@
 
 	/* Convert to a format PhysicsFS can grok... */
 	retval = (PHYSFS_sint64)mktime(&tm);
-	BAIL_IF_MACRO(retval == -1, PHYSFS_ERR_OS_ERROR, -1);
+	BAIL_IF(retval == -1, PHYSFS_ERR_OS_ERROR, -1);
 	return retval;
 } /* FileTimeToPhysfsTime */
 
@@ -627,12 +627,12 @@
 	DWORD err = 0;
 	BOOL rc = 0;
 
-	UTF8_TO_UNICODE_STACK_MACRO(wstr, filename);
-	BAIL_IF_MACRO(!wstr, PHYSFS_ERR_OUT_OF_MEMORY, 0);
+	UTF8_TO_UNICODE_STACK(wstr, filename);
+	BAIL_IF(!wstr, PHYSFS_ERR_OUT_OF_MEMORY, 0);
 	rc = GetFileAttributesExW(wstr, GetFileExInfoStandard, &winstat);
 	err = (!rc) ? GetLastError() : 0;
 	__PHYSFS_smallFree(wstr);
-	BAIL_IF_MACRO(!rc, errcodeFromWinApiError(err), 0);
+	BAIL_IF(!rc, errcodeFromWinApiError(err), 0);
 
 	st->modtime = FileTimeToPhysfsTime(&winstat.ftLastWriteTime);
 	st->accesstime = FileTimeToPhysfsTime(&winstat.ftLastAccessTime);